[Slackbuilds-users] What is the better way to have the linker look into additional paths to find shared objects and why?

B. Watson urchlay at slackware.uk
Sun May 5 19:35:38 UTC 2024



On Sun, 5 May 2024, Didier Spaier wrote:

> Hello,
>
> a very few SlackBuilds @ Sbo write config files including additional paths in
> /etc/ld.so.conf.d but a lot more export LD_LIBRARY_PATH with the additional path
> appended in as script stored in /etc/profile.d
>
> Which way is better and why?

/etc/ld.so.conf.d/ is a bad idea. sbopkglint will complain about it, and there's
a good reason for it.

Any library path mentioned in /etc/ld.so.conf.d/ will be used *before*
the standard paths or the ones in /etc/ld.so.conf. This means, if you
use it in a SBo package, and if that package includes a library that
lots of software uses, *everything else* on the system will use the
new library instead of the Slackware-provided one.

A concrete example: a while back we had a package that broke wget,
because wget (a stock Slackware package) was using a library in
/etc/ld.so.conf.d/ that was linked with systemd's libraries. Sorry
I can't remember the name of the build now, but sooner or later I
will...



More information about the SlackBuilds-users mailing list