-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDK8 OSX JIT - Unable to load j9jit29 #3496
Comments
@babsingh libstdc++ should be statically linked with the jit, this is how it works on other platforms. |
I think its a setting somewhere that needs to be enabled for the Mac builds. |
found #221 |
Reference: https://developer.apple.com/library/archive/qa/qa1118/_index.html |
Considering the other options then, I'm not sure what 3 means, and I don't think 1 is feasible in the short term (i.e. a lot of work to rewrite the jit code). I believe this was considered earlier and rejected in favor of statically linking. I'd pursue option 2. |
more details on point 3. things work after installing |
Also from the referenced page:
Does statically linking libstdc++ on macOS actually result in what apple considers a statically linked binary? I would have expected it to call dynamically into a libc equivalent rather than making kernel calls directly. EDIT: Are |
Refer to Nazim's comment above. The linker does not complain that it is an invalid option, but simply says that it was unused. |
@babsingh Any update on the progress using this approach? |
|
Downloaded XCode 9 from https://developer.apple.com. It took more than an hour. Xcode9 is a |
Update:
Changes to the build process: details.
Reference: ibmruntimes/openj9-openjdk-jdk8#147. The following environment variables won't work anymore:
|
Some updates regarding this issue... In order to succeed running the configure script and building OpenJDK8, we need to set the environment variable
JIT will no longer depend on libstdc++, and instead depend on libc++. |
For OpenJ9 JDK8 on OSX, the JIT can't be built with MACOSX_VERSION_MIN <= 10.8.0 using Xcode7. JIT needs libc++ which is only available when MACOSX_VERSION_MIN is set to 10.9.0 or greater. With MACOSX_VERSION_MIN <= 10.8.0, the Xcode7 build tools only provide stdlibc++, which can't be used to build the JIT. Thus, changing MACOSX_VERSION_MIN from 10.7.0 to 10.9.0 in order to support the JIT when building OpenJ9 JDK8. Closes: eclipse-openj9/openj9#3496 Signed-off-by: Babneet Singh <[email protected]>
For OpenJ9 JDK8 on OSX, the JIT can't be built with MACOSX_VERSION_MIN <= 10.8.0 using Xcode7. JIT needs libc++ which is only available when MACOSX_VERSION_MIN is set to 10.9.0 or greater. With MACOSX_VERSION_MIN <= 10.8.0, the Xcode7 build tools only provide stdlibc++, which can't be used to build the JIT. Thus, changing MACOSX_VERSION_MIN from 10.7.0 to 10.9.0 in order to support the JIT when building OpenJ9 JDK8. Closes: eclipse-openj9/openj9#3496 Signed-off-by: Babneet Singh [email protected]
For OpenJ9 JDK8 on OSX, the JIT can't be built with MACOSX_VERSION_MIN <= 10.8.0 using Xcode7. JIT needs libc++ which is only available when MACOSX_VERSION_MIN is set to 10.9.0 or greater. With MACOSX_VERSION_MIN <= 10.8.0, the Xcode7 build tools only provide stdlibc++, which can't be used to build the JIT. Thus, changing MACOSX_VERSION_MIN from 10.7.0 to 10.9.0 in order to support the JIT when building OpenJ9 JDK8. Closes: eclipse-openj9/openj9#3496 Signed-off-by: Babneet Singh [email protected]
For OpenJ9 JDK8 on OSX, the JIT can't be built with MACOSX_VERSION_MIN <= 10.8.0 using Xcode7. JIT needs libc++ which is only available when MACOSX_VERSION_MIN is set to 10.9.0 or greater. With MACOSX_VERSION_MIN <= 10.8.0, the Xcode7 build tools only provide stdlibc++, which can't be used to build the JIT. Thus, changing MACOSX_VERSION_MIN from 10.7.0 to 10.9.0 in order to support the JIT when building OpenJ9 JDK8. Closes: eclipse-openj9/openj9#3496 Signed-off-by: Babneet Singh <[email protected]>
The above manual work can be avoided if
|
@nbhuiyan opened #3629 to change runtime/compiler/makefile.ftl from:
to:
With #3629 and ibmruntimes/openj9-openjdk-jdk8#206, entire OpenJ9 can be built with Xcode7 and the default clang/clang++. This will remove the dependency on |
When running OpenJ9 JDK8 on OSX where
gcc49
is unavailable, the following issue is seen:JVMJ9VM011W Unable to load j9jit29: dlopen(/Users/[email protected]/Desktop/j2sdk-image/jre/lib/compressedrefs/libj9jit29.dylib, 2): Symbol not found: __ZNSt8__detail15_List_node_base7_M_hookEPS0_ Referenced from: /Users/[email protected]/Desktop/j2sdk-image/jre/lib/compressedrefs/libj9jit29.dylib Expected in: /usr/lib/libstdc++.6.0.9.dylib in /Users/[email protected]/Desktop/j2sdk-image/jre/lib/compressedrefs/libj9jit29.dylib
The JIT library can't be loaded.
The above error is seen because OpenJ9 JDK8 is built with
gcc49
and is dependent on thelibstdc++.6.0.9
library ingcc49
. OSX doesn't havegcc49
by default; this causes the above error. To resolve the above error,gcc49
needs to be installed on OSX:brew install gcc49
.How to remove the dependency on the
libstdc++.6.0.9
library ingcc49
when building OpenJ9 JDK8?Possible approaches:
libstdc++
.Can we compile withthis is infeasible.gcc49
so that the code works withgcc42
(default gcc compiler on OSX)?The text was updated successfully, but these errors were encountered: