-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPATHs to external libraries that aren't in the default library search path #3882
Comments
This is intentional. The only RPATHs Meson keeps is whatever is specified in the However, perhaps we should keep RPATHs pointed to all external libraries that aren't in the default linker path. There was an old issue about this, but I can't find it anymore. |
Just discovered this issue on NixOS where each library is installed to a different prefix. Libraries found with
while the ones found by
Since the first item in Perhaps |
BTW on my system:
so I think the subject change to "external libraries that aren't in the default library search path" isn't the bug I was originally reporting. Is there a way of globally switching this stripping off? (and not have to change every meson using package - I didn't have to for autotools...) |
The default library search path of ld.elf_so(1) in NetBSD is only /usr/lib, says the manual. If @prlw1 is running NetBSD, then none of /usr/pkg/lib, /usr/X11R7/lib, nor /lib would be in the default search path. Then "external libraries that aren't in the default library search path" might be a correct name for this bug. Some build systems -- at least autotools and CMake -- seem to be aware of the default path, and will add other directories to the rpath. For example, I installed lhasa into ~/prefix on OpenBSD; autotools added ~/prefix/lib to the rpath so lha can load liblhasa.so.0.0:
If lhasa used Meson, then /home/kernigh/prefix/lib would not be in the installed rpath, so /home/kernigh/prefix/bin/lha would not run; I don't know how to fix this, unless I edit meson.build to add The default path for the runtime linker can be different from the default path for the compiler. In OpenBSD, the path of ld.so(1) has /usr/lib, /usr/X11R6/lib, /usr/local/lib, and then any extra directories in shlib_dirs in rc.conf(8); the default shlib_dirs is empty. CMake's /usr/local/share/cmake/Modules/Platform/OpenBSD.cmake runs
One might teach Meson to assume that |
Thanks for the correction: I assumed that it was /lib:/usr/lib - that would explain /bin/ls having /lib (even though those libraries are linked from /usr/lib too, so in fact that isn't strictly necessary). |
In the meantime, we are using: http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/py-meson/patches/patch-mesonbuild_minstall.py The other patches in http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/py-meson/patches/ provide SunOS support. |
Please have a look at #7103 |
Tried using meson 78f1ef8 to build donf.
ninja generates the correct binary:
Then the RPATH disappears on install:
(running dconf-0.28.0/output/bin/dconf works)
The text was updated successfully, but these errors were encountered: