On Fri, 1 Sep 2023 12:54:45 GMT, Erik Joelsson <er...@openjdk.org> wrote:
>> After looking at the build results of a jdk22 build on RHEL 8.4 Linux >> ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 >> devkit we observed those unwanted paths in libsplashscreen.so . >> See those objdump and ldd output : >> >> objdump -x ./lib/libsplashscreen.so | grep PATH >> RUNPATH >> /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN >> >> >> ldd ./lib/libsplashscreen.so >> ldd: warning: you do not have execution permission for >> `./lib/libsplashscreen.so' >> . . . >> libX11.so.6 => >> /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 >> (0x00007fffa3920000) >> libXext.so.6 => >> /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 >> (0x00007fffa38e0000) >> . . . >> >> These paths were introduced by the '-R' setting, but it seems to be highly >> dependent on the environment. But the '-R' setting should better be avoided >> anyway when the devkit is used. > > make/autoconf/lib-x11.m4 line 90: > >> 88: fi >> 89: # Also remove the -R setting for devkit usage >> 90: if test "x$with_devkit" != "x" && test "x$with_devkit" != "xno"; then > > This should rather check if `$SYSROOT` has a value and should also check that > `$x_libraries` is `NONE` (see how it's done on line 64). A sysroot can be > configured without a devkit, and if we find the X libraries in the sysroot, > then we shouldn't add an -R path. If however a user needs to specifically > point out the x libraries, I think we need to trust the built in macros as > the user may have them in a non standard place. > > Can we combine the conditionals to avoid having to repeat the if body? Hi Erik, unfortunately `x_libraries` is already modified in the SYSROOT cases (see line 64 and below) , so can I check that `$x_libraries` is `NONE` or should I cache somehow the original value ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15534#discussion_r1313043724