eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 721 forks source link

OSX 10.14 builds incompatible for 10.13 #5791

Open jdekonin opened 5 years ago

jdekonin commented 5 years ago

Using the latest shas, when I build on 10.14 using clang 9.1, the resulting binary does not work on 10.13. A binary built on the 10.13 system does work on the 10.14 system.

The error I get is

bash-3.2$ ./jdk/bin/java -version
dyld: Symbol not found: ___objc_personality_v0
  Referenced from: /private/tmp/./jdk/bin/java
  Expected in: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
 in /private/tmp/./jdk/bin/java
Abort trap: 6

fyi @babsingh

pshipton commented 5 years ago

Using the latest shas, when I build on 10.14 using clang 9.1, the resulting binary does not work on 10.13

Makes sense. Similar problems occur on Linux as well. i.e. you can't build on Ubuntu 16 and run the resulting JVM on CentOS 6.

babsingh commented 5 years ago

Makes sense. Similar problems occur on Linux as well. i.e. you can't build on Ubuntu 16 and run the resulting JVM on CentOS 6.

OpenJ9 built on OSX 10.14 should work till OSX 10.9 because the build scripts set MACOSX_DEPLOYMENT_TARGET (env. variable) to 10.9. Below are the specific details for the above issue.

ld: warning: ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libz.dylib) built for (unknown). Note: This will be an error in the future.URGENT: building for OSX, but linking against dylib (/usr/lib/libiconv.dylib) built for (unknown). Note: This will be an error in the future.

ld: warning: ld: warning: ld: warning: URGENT: building for OSX, but linking against dylib (/System/Library/Frameworks/Security.framework/Security) built for (unknown). Note: This will be an error in the future.URGENT: building for OSX, but linking against dylib (/System/Library/Frameworks/Foundation.framework/Foundation) built for (unknown). Note: This will be an error in the future.

72 errors similar to the above two sample errors are seen when building OpenJ9 JDK11 on OSX with XCode 9: linker_errors_osx_1014.log. The issue is related to the functioning of the linker on OSX 10.14 + Xcode 9.

Other projects have experienced similar issues; example: https://github.com/golang/go/issues/27095. In this project, some people were able to resolve the issue: update OS or upgrade XCode version or don't use homebrew to install dependencies. Someone will have to verify if these solutions can be used with OpenJ9.

I also noticed other setup differences between OSX 10.13 and 10.14: