-
Bug
-
Resolution: Fixed
-
P3
-
11
-
b20
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8206050 | 12 | Volker Simonis | P3 | Resolved | Fixed | team |
JDK-8206645 | 11.0.1 | Volker Simonis | P3 | Resolved | Fixed | b01 |
JDK-8223102 | openjdk8u222 | Volker Simonis | P3 | Resolved | Fixed | b01 |
JDK-8263849 | 8u291 | Erik Joelsson | P3 | Resolved | Fixed | b09 |
JDK-8264249 | emb-8u291 | Erik Joelsson | P3 | Resolved | Fixed | team |
The test jdk/tools/launcher/RunpathTest.java checks that the java launcher on Linux and Solaris has the correct RPATH path baked into the executable.
Unfortunately, the situation with RPATH is a little weird:
- in order to bake a runtime path into a dynamically linked library or executable one has to use the "-rpath <PATH>" linker option (from the C/C++ compiler this is usually available as "-Wl,-rpath,<path>").
- depending on the dynamic linker version and Linux distribution, the "-rpath" linker option adds either a "RPATH" entry (Ubuntu 16.04, RHEL 7.4) or a "RUNPATH" entry (SLES 12.1, SLES 15) or both entries together (SLES 11.3) to the dynamic section of the shared library/executable.
- the semantics of "RPATH" and "RUNPATH" are slightly different: "RPATH" is evaluated at runtime before LD_LIBRARY_PATH (if "RUNPATH" isn't present) while "RUNPATH" is evaluated after LD_LIBRARY_PATH (i.e. RUNPATH can be overridden at runtime by setting LD_LIBRARY_PATH).
- "RPATH" is considered obsolete and should be replaced by "RUNPATH" according to the man-page of "ld.so (8)".
- the linker option "--enable-new-dtags"/"--disable-new-dtags" (or the corresponding compiler flags "-Wl,--enable-new-dtags"/"-Wl,--disable-new-dtags") can be used to enforce the generation of "RUNPATH"/"RPATH" respectively (except for systems like SLES 11.3 where "--enable-new-dtags" generates both "RPATH" and "RUNPATH" while "--disable-new-dtags" only generates "RPATH").
But this issue is not about fixing the build so to cut a long story short - the test RunpathTest.java should be able to handle both runtime path variants equally well. This can be easily achieved by extending the match pattern from ".*RPATH.*\\$ORIGIN/../lib.*" to ".*R(UN)?PATH.*\\$ORIGIN/../lib.*"
Unfortunately, the situation with RPATH is a little weird:
- in order to bake a runtime path into a dynamically linked library or executable one has to use the "-rpath <PATH>" linker option (from the C/C++ compiler this is usually available as "-Wl,-rpath,<path>").
- depending on the dynamic linker version and Linux distribution, the "-rpath" linker option adds either a "RPATH" entry (Ubuntu 16.04, RHEL 7.4) or a "RUNPATH" entry (SLES 12.1, SLES 15) or both entries together (SLES 11.3) to the dynamic section of the shared library/executable.
- the semantics of "RPATH" and "RUNPATH" are slightly different: "RPATH" is evaluated at runtime before LD_LIBRARY_PATH (if "RUNPATH" isn't present) while "RUNPATH" is evaluated after LD_LIBRARY_PATH (i.e. RUNPATH can be overridden at runtime by setting LD_LIBRARY_PATH).
- "RPATH" is considered obsolete and should be replaced by "RUNPATH" according to the man-page of "ld.so (8)".
- the linker option "--enable-new-dtags"/"--disable-new-dtags" (or the corresponding compiler flags "-Wl,--enable-new-dtags"/"-Wl,--disable-new-dtags") can be used to enforce the generation of "RUNPATH"/"RPATH" respectively (except for systems like SLES 11.3 where "--enable-new-dtags" generates both "RPATH" and "RUNPATH" while "--disable-new-dtags" only generates "RPATH").
But this issue is not about fixing the build so to cut a long story short - the test RunpathTest.java should be able to handle both runtime path variants equally well. This can be easily achieved by extending the match pattern from ".*RPATH.*\\$ORIGIN/../lib.*" to ".*R(UN)?PATH.*\\$ORIGIN/../lib.*"
- backported by
-
JDK-8206050 [test] Fix jdk/tools/launcher/RunpathTest to handle both, RPATH and RUNPATH
- Resolved
-
JDK-8206645 [test] Fix jdk/tools/launcher/RunpathTest to handle both, RPATH and RUNPATH
- Resolved
-
JDK-8223102 [test] Fix jdk/tools/launcher/RunpathTest to handle both, RPATH and RUNPATH
- Resolved
-
JDK-8263849 [test] Fix jdk/tools/launcher/RunpathTest to handle both, RPATH and RUNPATH
- Resolved
-
JDK-8264249 [test] Fix jdk/tools/launcher/RunpathTest to handle both, RPATH and RUNPATH
- Resolved