What to do about libraries being installed in /usr/local/lib? 08 September 2020, 23:59:42 When I compile some libraries from source, the libraries get installed into /usr/local/lib and compiling applications that use them from source produces binaries that can't find them. Nothing I install from pacman has ever gone to /usr/local/lib, and I've recently learned about LD_LIBRARY_PATH and stuff. My question is: is there something I should do on my system to support these applications, is it something I should do differently in the build process (in particular it's happened with sway/wlroots and ydotool), or is it something I should report to projects whose normal build steps install libraries there?
Re: What to do about libraries being installed in /usr/local/lib? Reply #1 – 09 September 2020, 00:15:44 If it uses configure, you'd something like ./configure --libdir=/usr/lib you can also look at ./configure --help to show all options
Re: What to do about libraries being installed in /usr/local/lib? Reply #2 – 09 September 2020, 04:11:26 This is just a build system thing. In the case of sway/wlroots (and anything else that uses meson to build), you can always just use the "arch-meson" wrapper which sets a bunch of arch-tailored configure options for you.
Re: What to do about libraries being installed in /usr/local/lib? Reply #3 – 09 September 2020, 16:46:34 If there's a PKGBUILD (look in the AUR, also binary packages are built from PKGBUILD's) you can use that with makepkg, possibly modifying it for the version of software, to avoid conflicts with other existing packages, and any other changes you need. Then it becomes a regular package you can manage with pacman. /usr/local is useful if, for example, you need alternate versions of things you have already. The PKGBUILD should be configured to put things in the regular places so might give some hints too, and it's written in a very simple easy to use format.If you're building independently of the package system you should generally try to avoid installing things outside /usr/local, /opt and /home if possible, as they might conflict with package operations and overwrite something or be overwritten.