-
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
Installation prefix is wrong when using --prefix on meson or DESDIR in ninja #2535
Comments
meson --version |
|
I think this is largely a technicality; DESTDIR can also be the same as prefix, even if it may be nonsensical (the --prefix already would have been specified by the user). I like to think of DESTDIR as simply providing more flexibility for those users who may want to have it. The official description appears to reinforce that notation, for example: https://www.gnu.org/prep/standards/html_node/DESTDIR.html "Finally, it can be useful with tools such as stow, where code is installed in one place but made to appear to be installed somewhere else using symbolic links or special mount operations." E. g. a user to install into his $HOME directory, and/or for testing purposes. If I understood gadLinux correctly so, then his issue appears to be an automatic conversion towards names such as x86_64-linux-gnu etc... ? I do not know how meson solves this but I think that GNU autoconfigure allowed separate --prefix targets for target library paths too. |
By default, meson adds the build machine architecture for installation, see: mesonbuild/meson#2535 Use --libdir to override this default behavior Fixes: - http://autobuild.buildroot.net/results/aec/aec9f3de545a832b66cd00c217fbaa99246e1715 - http://autobuild.buildroot.net/results/07a/07adcba71106a2dca963e4071f4673791b41a603 - http://autobuild.buildroot.net/results/a27/a272a8e521863374901a5e3c0fb9da0b8daa4076 Signed-off-by: Fabrice Fontaine <[email protected]> Signed-off-by: Peter Korsgaard <[email protected]>
My workaround in configure. destdir handles the cross part
It is apparently the default value of libdir which is causing the problem. |
#4636 might be relevant |
FTR: since this is one of the first results for
|
https://mesonbuild.com/Installing.html |
It seems that both of them are adding the build machine architecture for installation.
Instead of using /usr/lib or /usr/local/lib it's using usr/lib/x86_64-linux-gnu and usr/local/lib/x86_64-linux-gnu.
This is because I'm compiling for ARM in a X86_64 machine. That's completely wrong. Even if the binary created and installed on that path is for ARM the path is wrong.
In my case:
/opt/VAL100/buildroot/buildroot-2015.05/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/local/lib/x86_64-linux-gnu/libsg64_core.so
I will also override the values for the prefix and DESTDIR in the cross-file so it can be safely changed when cross-compile in opposition of a normal target build on x86_64 architecture.
So something like this should work.
I can call meson with prefix:
meson --prefix /opt/VAL100/buildroot/buildroot-2015.05/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot . build-val100/ --cross-file val100-cross.txt
or I can install with DESTDIR:
DESTDIR=/opt/VAL100/buildroot/buildroot-2015.05/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot ninja install
But also if I use both. Both paths are added to the installation:
Installing src/libsg64_core.so to /opt/VAL100/buildroot/buildroot-2015.05/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/opt/VAL100/buildroot/buildroot-2015.05/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/lib/x86_64-linux-gnu/libsg64_core.so
So they are not compatible I think...
The text was updated successfully, but these errors were encountered: