On 2017-08-28 23:33:03 +0200, Niels Möller wrote: > Vincent Lefevre <vinc...@vinc17.net> writes: > > This only works if the user is root. If a non-root user wants to > > install libraries in his home directory, the right solution is to > > use LD_LIBRARY_PATH (since GCC doesn't use a run path by default). > > You'd either use LD_LIBRARY_PATH, which is going to be a bit brittle > when a build system or other script depends on using LD_LIBRARY_PATH for > its own purposes,
They can preprend their own directories to $LD_LIBRARY_PATH. > or compile the stuff needing the libraries with something like. > > LDFLAGS='-L $HOME/lib/ -Wl,-rpath,$HOME/lib' which, in turn, may break things. For instance, MPFR uses LD_RUN_PATH temporarily in its configure script. But if the user uses -rpath, LD_RUN_PATH will be ignored. And I don't think we should re-implement all the libtool machinery for the configure script to guess what should work. > Neither option is entirely painless, unfortunately. > > In this particular case, it might work better if automake's test binary > magic did use LD_LIBRARY_PATH and *pre*pended the .lib directory, but I > guess it does things differently, either using -rpath or *a*ppending > .lib. That's more a libtool thing than an automake one, AFAIK. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) _______________________________________________ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs