Quantcast

RFR: JDK-8177634 Fix for 8175307 may cause linker errors on OS X 10.9

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RFR: JDK-8177634 Fix for 8175307 may cause linker errors on OS X 10.9

Magnus Ihse Bursie
Since JDK-8175307 was fixed we started seeing failures like this on OS X
10.9 systems:

dyld: Library not loaded: @rpath/libjvm.dylib
   Referenced from:
/opt/jprt/T/P1/144150.mgerdin/bundles/testBundle/hotspot/gtest/server/gtestLauncher

   Reason: image not found
make[2]: *** [hotspot_gtestserver] Trace/BPT trap: 5 (core dumped)

The reason was that JDK-8175307 replaced -Wl,-rpath,@loader_path/. with
-Wl,-rpath,@loader_path in some cases. This works well on modern macOS
but fails on OS X 10.9 and earlier.

This patch restores the old behavior of adding /. if no other path is given.

I have verified that it solves the problem on 10.9, and that is does not
break on newer macOS. I have also verified the fix on all platforms on JPRT.

I intend to get approval to push this into JDK9.

The final form of the patch was contributed by David DeHaven.

Bug: https://bugs.openjdk.java.net/browse/JDK-8177634
WebRev:
http://cr.openjdk.java.net/~ihse/JDK-8177634-fix-loader_path-on-macos/webrev.01

/Magnus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: JDK-8177634 Fix for 8175307 may cause linker errors on OS X 10.9

David Holmes
Hi Magnus,

This seems reasonable.

Thanks,
David H.

On 29/03/2017 6:33 PM, Magnus Ihse Bursie wrote:

> Since JDK-8175307 was fixed we started seeing failures like this on OS X
> 10.9 systems:
>
> dyld: Library not loaded: @rpath/libjvm.dylib
>   Referenced from:
> /opt/jprt/T/P1/144150.mgerdin/bundles/testBundle/hotspot/gtest/server/gtestLauncher
>
>   Reason: image not found
> make[2]: *** [hotspot_gtestserver] Trace/BPT trap: 5 (core dumped)
>
> The reason was that JDK-8175307 replaced -Wl,-rpath,@loader_path/. with
> -Wl,-rpath,@loader_path in some cases. This works well on modern macOS
> but fails on OS X 10.9 and earlier.
>
> This patch restores the old behavior of adding /. if no other path is
> given.
>
> I have verified that it solves the problem on 10.9, and that is does not
> break on newer macOS. I have also verified the fix on all platforms on
> JPRT.
>
> I intend to get approval to push this into JDK9.
>
> The final form of the patch was contributed by David DeHaven.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8177634
> WebRev:
> http://cr.openjdk.java.net/~ihse/JDK-8177634-fix-loader_path-on-macos/webrev.01
>
>
> /Magnus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: JDK-8177634 Fix for 8175307 may cause linker errors on OS X 10.9

Erik Joelsson
In reply to this post by Magnus Ihse Bursie
Looks good.

/Erik


On 2017-03-29 10:33, Magnus Ihse Bursie wrote:

> Since JDK-8175307 was fixed we started seeing failures like this on OS
> X 10.9 systems:
>
> dyld: Library not loaded: @rpath/libjvm.dylib
>   Referenced from:
> /opt/jprt/T/P1/144150.mgerdin/bundles/testBundle/hotspot/gtest/server/gtestLauncher
>
>   Reason: image not found
> make[2]: *** [hotspot_gtestserver] Trace/BPT trap: 5 (core dumped)
>
> The reason was that JDK-8175307 replaced -Wl,-rpath,@loader_path/.
> with -Wl,-rpath,@loader_path in some cases. This works well on modern
> macOS but fails on OS X 10.9 and earlier.
>
> This patch restores the old behavior of adding /. if no other path is
> given.
>
> I have verified that it solves the problem on 10.9, and that is does
> not break on newer macOS. I have also verified the fix on all
> platforms on JPRT.
>
> I intend to get approval to push this into JDK9.
>
> The final form of the patch was contributed by David DeHaven.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8177634
> WebRev:
> http://cr.openjdk.java.net/~ihse/JDK-8177634-fix-loader_path-on-macos/webrev.01
>
> /Magnus

Loading...