[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1111805: ld.so.conf settings prefer /lib over /usr/lib (drop /lib from ld.so.conf entirely?)



Package: libc6
Version: 2.41-12
Severity: normal

Currently shipping /etc/ld.so.conf.d/*.conf prefers /lib over /usr/lib.
For example, /etc/ld.so.conf.d/x86_64-linux-gnu.conf has:

---
# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
---

Today, with merged-usr, where /lib is a symlink to /usr/lib, this is wrong.
In particular, it's problematic to find libraries listed by ldd with dpkg -S,
since ldd shows aliased /lib path instead of actual /usr/lib path:

$ ldd /usr/bin/true
	linux-vdso.so.1 (0x00007f67125e4000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f67123c5000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f67125e6000)
$ dpkg -S /lib/x86_64-linux-gnu/libc.so.6
dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libc.so.6

In /etc/ld.so.conf.d/x86_64-linux-gnu.conf, we should *at least*
have /lib after /usr/lib, like this:

---
# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
---

(this is how I modified this file onn my system).

And a similar change should be done in trixie too.

But there's a question: do we really need to keep /lib in there at all?
To me it feels like we don't, so it should be just dropped.  But I might
not know all the details here.

Thanks,

/mjt

/etc/ld.so.conf.d/x86_64-linux-gnu.conf changed:
/usr/local/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu


Reply to: