AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

Java 8 libawt_xawt.so error on AIX - Missing module

  • 1.  Java 8 libawt_xawt.so error on AIX - Missing module

    Posted Mon June 25, 2018 06:10 PM

    Originally posted by: LeandroBM


    Hi everyone

    I'm running an Eclipse RCP application on AIX, but while trying to use it, I keep getting below error from JRE (using IBM JRE 8):

    Caused by: java.lang.UnsatisfiedLinkError: /opt/IBM/jre/lib/ppc64/libawt_xawt.so (       0509-022 Cannot load module /opt/IBM/jre/lib/ppc64/libawt_xawt.so.
            0509-150   Dependent module /opt/freeware/lib/libXrender.a(shr_64.o) could not be loaded.
            0509-152   Member shr_64.o is not found in archive
            0509-022 Cannot load module /opt/IBM/jre/lib/ppc64/libawt_xawt.so.
            0509-150   Dependent module /opt/IBM/jre/lib/ppc64/libawt_xawt.so could not be loaded.)
            at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1426)
            at java.lang.System.load(System.java:554)
            at java.lang.ClassLoader.loadLibraryWithPath(Native Method)
            at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1418)
            at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:1391)
            at java.lang.System.loadLibrary(System.java:567)
            at java.awt.Toolkit$3.run(Toolkit.java:1647)
            at java.awt.Toolkit$3.run(Toolkit.java:1645)
            at java.security.AccessController.doPrivileged(AccessController.java:638)
            at java.awt.Toolkit.loadLibraries(Toolkit.java:1644)
            at java.awt.Toolkit.<clinit>(Toolkit.java:1679)
            at java.awt.EventQueue.isDispatchThread(EventQueue.java:1054)
            at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1372)

     

    From what I've investigated so far, this "shr_64" object missing from libXrender may be due to the fact that 32-bit version of libXrender.a is being loaded. The only way I could make the application to work was setting LIBPATH variable, with the 1st path set to "/opt/freeware/lib". Setting anything different would case similar "missing module" error, but with "libXrender.so.1" object. Can't find anything related to libXrender for 32/64 bit specifically, at least I didn't see 2 separate packages available for install....

    I installed libXrender 0.9.8. I was previously using "xrender" package, but we upgraded our eclipse build to 4.6.1, which now requires some new GTK libs. LibXrender was a dependency for them, and replaced xrender into the system. Installing libXrender will only get the file "libXrender.a" deployed in /opt/freeware/lib. I'm also seeing a "libXrender.a" in /usr/lib, but that does not work with JRE 8 (complains about libXrender.so.1). I think the one in usr/lib may be from "xrender" package...

     

    Does anyone has a similar issue like this? Any help is greatly appreciated =)

     

    Best Regards



  • 2.  Re: Java 8 libawt_xawt.so error on AIX - Missing module

    Posted Tue June 26, 2018 05:46 AM

    Originally posted by: Nitish Mishra


    Hi !

     

    It's a known issue with eclipse and it will work only by setting LIBPATH=/opt/freeware/lib:/usr/lib.

    The libXrender.a in /usr/lib is from AIX base and it is quite old version, so for new GTK library dependency we have ported libXrender-0.9.8 which provides required object file by GTK.

    GTK is in-built to use all libraries from /opt/freeware/lib but I believe eclipse is somehow overriding it's own libpath. So, the issue. To know more about this issue refer below community question:

     

    https://www.eclipse.org/forums/index.php/m/1784819/#msg_1784819

     

    Regards.



  • 3.  Re: Java 8 libawt_xawt.so error on AIX - Missing module

    Posted Tue June 26, 2018 09:14 AM

    Originally posted by: LeandroBM


    Hi Nitish, thanks for the reply =)

     

    That's right, if I don't set the LIBPATH like this I will get the exact same issue from eclipse forum, but setting the LIBPATH exactly the way you set will get me the above "missing shr_64.o" object......

     

    I'm suspecting that "libXrender.a" from /opt/freeware/lib is 32bit only....or maybe eclipse somehow is still messing up the libraries even after setting LIBPATH?



  • 4.  Re: Java 8 libawt_xawt.so error on AIX - Missing module

    Posted Wed June 27, 2018 02:27 AM

    Originally posted by: Nitish Mishra


    Hi !

    So, what I understand is, that,  you have recently updated gtk and dependent libraries because eclipse 4.6 onwards requires an upgrade to gtk/dependent packages.

    You are seeing this issue because of missing shr_64.o object from /opt/freeware/lib/libXrender.a after setting LIBPATH as in previous reply.

    You can find this shr_64.o object in /usr/lib/libXrender.a

    This means that you have some libraries still installed which are built with /usr/lib/libXrender.a and that's why they require shr_64.o

    But, the fact is that we have removed any  /usr/lib/libXrender.a dependency from ALL gtk/dependent packages because new packages requires upgraded version of libXrender. The gtk packages which are right now available on Toolbox are built with /opt/freeware/lib/libXrender.a and thats why they require libXrender.so.1. So, this makes clear that why you are getting exact same error in eclipse forum when NOT setting LIBPATH.

    This also makes clear that some libraries you have missed to upgrade. Most probably cairo, pango or libXft.

    But to avoid any kind of mix-up for you, I am providing the full package list below which you can download from toolbox manually or you can use yum (if yum is configured in your system) and install/update.

     

    These are the minimum packages required for eclipse 4.6 onward to run from AIX toolbox:

    (Note: Install latest version/release of below packages, if available. Many of the packages in below list have HIGHER RELEASE NUMBER/VERSION available on toolbox).


    MANDATORY UPDATE OF GCC:

    gcc-6.3.0-1.aix7.1.ppc.rpm
    gcc-cplusplus-6.3.0-1.aix7.1.ppc.rpm
    gmp-6.1.2-1.aix6.1.ppc.rpm
    libgcc-6.3.0-1.aix7.1.ppc.rpm
    libmpc-1.0.3-1.aix6.1.ppc.rpm
    libstdcplusplus-6.3.0-1.aix7.1.ppc.rpm
    libstdcplusplus-devel-6.3.0-1.aix7.1.ppc.rpm
    mpfr-3.1.2-3.aix6.1.ppc.rpm
    gcc-cpp-6.3.0-1.aix7.1.ppc.rpm

     

    Required Dependencies of gtk and gtk itself:

    libffi-3.2.1-1.aix6.1.ppc.rpm
    glib2-2.52.2-1.aix6.1.ppc.rpm
    gettext-0.19.8.1-1.aix6.1.ppc.rpm
    ncurses-6.1-1.aix6.1.ppc.rpm
    libXrender-0.9.8-1waixX11.aix6.1.ppc.rpm
    fontconfig-2.11.95-3.aix6.1.ppc.rpm
    libXft-2.3.2-3waixX11.aix6.1.ppc.rpm
    atk-2.20.0-3.aix6.1.ppc.rpm
    libpng-1.6.27-2.aix6.1.ppc.rpm
    freetype2-2.8-1.aix6.1.ppc.rpm
    lzo-2.10-1.aix6.1.ppc.rpm
    pixman-0.34.0-1.aix6.1.ppc.rpm
    cairo-1.14.6-2waixX11.aix6.1.ppc.rpm
    harfbuzz-1.2.7-2.aix6.1.ppc.rpm
    pango-1.40.1-2waixX11.aix6.1.ppc.rpm
    intltool-0.51.0-2.aix6.1.noarch.rpm
    gdk-pixbuf-2.35.1-2waixX11.aix6.1.ppc.rpm
    rpm -ivh shared-mime-info-1.6-2.aix6.1.ppc.rpm
    libxcb-1.12-2waixX11.aix6.1.ppc.rpm
    xcb-proto-1.12-1.aix6.1.ppc.rpm

    gtk2-2.24.30-2waixX11.aix6.1.ppc.rpm

     

    Some package may be installed on system. After installing all the packages set the LIBPATH as:

    export LIBPATH=/opt/freeware/lib:/usr/lib

    and launch the eclipse based GUI application.

     

    This may require some effort from your side. But if everything is as per above collection and workaround. GTK/eclipse will work for sure.

    Hope it helps.

     

    Best Regards.

     



  • 5.  Re: Java 8 libawt_xawt.so error on AIX - Missing module

    Posted Thu June 28, 2018 09:49 AM

    Originally posted by: LeandroBM


    Thank you for the package list =)

     

    There was a few pkgs missing from my AIX that I just installed, but I still see the "shr_64.o" error....maybe I did something wrong during all these packages upgrades. Even firefox won't start anymore...lol

     

    If I use libXrender.a from /usr/lib, it will give me the same error as the one in eclipse forums (libXrender.so.1 missing) during app startup. If I set the LIBPATH with /opt/freeware/lib, I will get the "shr_64.o" error while using the app (there's an action where we show a progress dialog. During dialog init, JRE tries to load libawt_xawt.so, which fails). The lib from /opt/freeware/lib is able to at least run the app (not all of it due to this shr_64 error), although with a little bit funky GUI (images not showing, black stripes in some panels sections....very odd).

     

    I will try to reset/reinstall my AIX system to retry all these steps once more, this time using your pkg list (with all latest pkg versions). Will post here the results (will take some time to do it)

     

    Thank you for all your help so far!

     

    Regards