Open sxa opened 6 years ago
@sxa555 Is this still an issue?
I believe @groeges has still been seeing issues with this.
@sxa555 Is this still an issue?
Not sure whether this is still a problem on the Adopt machines but I have been seeing issues on my local machine with running some of the JTReg tests. Setting LIBPATH and/or LD_LIBRARY_PATH didn't seem to resolve the issue, as the JTReg tests didn't see to pickup these environment variables. I had to either add -e:LIBPATH=/opt/freeware/lib64
to the JTReg command or add a symbolic link to the library ln -s /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/6.3.0/libgcc_s.a /usr/lib/libgcc_s.a
in order to get the tests to work.
Having checked with the AIX guys in SAP, it seems that on the systems I was using we've installed the wrong libraries. We shouldn't use dependencies which are compiled with GCC and therefore rely on libgcc. Mixing xlc-compiled libraries with gcc-compiled ones is usually not a good idea.
A change, for the special "libfontmanager" case, we could simply build with "--with-freetype=bundled" which will use a freetype version which is bundled with OpenJDK. "--with-freetype=bundled" was introduced in OpenJDK 11.
Having changed to use this option the tests that were failing are now working correctly, without the need to update JTreg command or to add a symbolic link.
@sxa555 Are you happy to close this in that case?
I'll need to do further verification, plus what @groeges is saying above seems to be a JDK11+ specific solution
At @sxa555: Thank you for documenting this error :smile::+1:
I'd like to ask whether this problem is or will be fixed in an upcoming AdoptOpenJDK Java 11 LTS AIX release? Or maybe is it already fixed in a nightly build?
My motivation for asking is the unfortunate fact that two of my company's customers running a web application on their AIX system reported that one of its features stopped working using
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.2+9)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.12.1, JRE 11 AIX ppc64-64-Bit Compressed References 20190204_121 (JIT enabled, AOT enabled)
OpenJ9 - 90dd8cb
OMR - d2f4534
JCL - 289c70b based on jdk-11.0.2+9)
reporting this error
java.lang.UnsatisfiedLinkError: fontmanager (Not found in com.ibm.oti.vm.bootstrap.library.path)
at java.base/java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1678)
at java.base/java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:1643)
at java.base/java.lang.System.loadLibrary(System.java:559)
at java.desktop/sun.font.FontManagerNativeLibrary$1.run(FontManagerNativeLibrary.java:57)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:647)
at java.desktop/sun.font.FontManagerNativeLibrary.<clinit>(FontManagerNativeLibrary.java:32)
at java.desktop/sun.font.SunFontManager$1.run(SunFontManager.java:270)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:647)
at java.desktop/sun.font.SunFontManager.<clinit>(SunFontManager.java:266)
at java.desktop/sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:265)
at java.desktop/sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:864)
Although I pointed them to this issue and asked them to setup the mentioned dependencies and environment variables this seems cumbersome (and may also prove "too difficult" for them to do :expressionless:).
So having an AdoptOpenJDK build which works "out-of-the-box" on an AIX system would definitely be desirable.
It would need to be tested first to ensure the problem no longer occurs.
Although most operations work ok without the GNU runtime library, it would appear that
libfontmanager.so
is built with a dependency onlibgcc_s.a
. The result of this is that any GUI application will fail unless thelibgcc
package is installed on the box and added to theLIBPATH
. This appears to affect all versions of the AdoptOpenJDK builds. IBM's AIX java does not have this dependency. I believe it's due to thelibfreetype
dependency. When thefreetype2
package is installed through IBM's version ofyum
for AIX, a symlink/usr/lib/libfreetype.a
is created to /opt/freeware/lib, so that is found correctly, however for thelibgcc
package, there is no such symlink so it is not in the default search PATH andLIBPATH
has to be set to include/opt/freeware/lib64
for GUI apps to work. I'm not sure if there's any obvious way around this, but I'm opening this issue to at least have it documented for now.AdoptOpenJDK8 (HotSpot)
AdoptOpenJDK8 with OpenJ9
AdoptOpenJDK9