-
Bug
-
Resolution: Fixed
-
P1
-
8
-
b113
-
os_x
-
Not verified
After JDK-8025715 was pushed, the native libraries on macosx are broken. This is caused by the link command line having changed from (for libjfr.dylib as example):
-Xlinker -install_name -Xlinker @rpath/libjfr.dylib
to:
-Xlinker -install_name -Xlinker /usr/local/lib/libJObjC.dylib
The reason for this change is a change of order of the compiled libraries. For the library libJObjc, there was a special hack added to keep the new and old build the same:
# Ugly hack to mimic behaviour in old build where this is built as an xcode project.
SET_SHARED_LIBRARY_NAME = -Xlinker -install_name -Xlinker /usr/local/lib/libJObjC.dylib
BeforeJDK-8025715, this was the last library in the file, so this override of the variable didn't affect other libraries. After the change, it's one of the first libraries to be built, leaving this hack in effect for all the rest.
I propose we just remove this hack, as it's actually just plain wrong in the first place and let libJObjc get the same automatic rpath-based install_name as all other libs.
-Xlinker -install_name -Xlinker @rpath/libjfr.dylib
to:
-Xlinker -install_name -Xlinker /usr/local/lib/libJObjC.dylib
The reason for this change is a change of order of the compiled libraries. For the library libJObjc, there was a special hack added to keep the new and old build the same:
# Ugly hack to mimic behaviour in old build where this is built as an xcode project.
SET_SHARED_LIBRARY_NAME = -Xlinker -install_name -Xlinker /usr/local/lib/libJObjC.dylib
Before
I propose we just remove this hack, as it's actually just plain wrong in the first place and let libJObjc get the same automatic rpath-based install_name as all other libs.