#913806 libc-bin: parsing of ld.so.conf by ldconfig and ld differs

Package:
libc-bin
Source:
glibc
Description:
GNU C Library: Binaries
Submitter:
Andrej Shadura
Date:
2018-12-05 18:09:03 UTC
Severity:
normal
#913806#5
Date:
2018-11-15 14:35:22 UTC
From:
To:
According to the current code of ldconfig and ld, there's subtle
difference in parsing of /etc/ld.so.conf by these two tools:

* ldconfig interprets relative paths in includes relatively to the
  current directory it run in, and absolute path relatively to the
  current "chroot" directory, if set

* ld interprets relative paths in includes relatively to the directory
  the parsed file is in, and apparently ignores the --sysroot setting
  for absolute paths and does not relativise them to this sysroot.

dpkg-shlibdeps follows ldconfig, but always takes absolute paths
relatively to the absolute root.

Also, ldconfig's manpage doesn't mention include directive at all

#913806#12
Date:
2018-12-05 18:01:37 UTC
From:
To:
Given you reported the bug only to the glibc side, does it mean you
would like the glibc behaviour to be changed, and the binutils one to be
kept unchanged? We definitely want ldconfig to interpret paths relative
to the "chroot" directory (-r option), this is important to initialize a
cache without having to first chroot into the directory.

The manpage is provided by the manpages package and not by glibc.

Aurelien

#913806#17
Date:
2018-12-05 18:06:53 UTC
From:
To:
Hi,

Actually, I want both sides to change:

* ldconfig to interpret relative paths relatively to the directory the
including file is in
* ld to respect --sysroot when including (bugs with patches reported in
Debian and upstream).

Thanks, good to know, apparently, I need to file a bug against that package.