-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Meson wraps installed libraries in architecture folder on Ubuntu 19.04 (and possibly other debian based systems) #5925
Comments
In the function
I just tried it on Debian 10 and Ubuntu 18.04, where The only workaround I see that doesn't require user interaction is to set |
Because it is the default when installing to |
Indeed, Also, I don't think that it is a good idea to use |
I created a simple test case over here.
This bug might relate to #1972 (possibly duplicate, I am not sure anymore :) )
Here is the build file:
When simply calling
meson build && cd build && sudo ninja install
i'd expect the library to be installed to/usr/local/lib
and the executable to/usr/local/bin
. The executable ends up in bin, but unfortunately the library ends up in/usr/local/lib/x86_64-linux-gnu
. Despite being odd default behavior, it is not a default library search path resulting in the library not being found when trying to run the installed binary, i.e. when runningHelloWorld
afterwards, I get:HelloWorld: error while loading shared libraries: libMyLib.so: cannot open shared object file: No such file or directory
Workarounds:
The only way to make this work right now is to explicitly set
libdir
to lib, i.e.meson --libdir=lib build
or to explicitly set theinstall_rpath
on the executable to point to the correct place, i.e. something like this:executable(..., install_rpath: join_paths(get_option('prefix'), get_option('libdir'))
, ...)`Please let me know if I am missing anything. Would love to find a fix for this!
The text was updated successfully, but these errors were encountered: