Ticket #2081 (closed defect: fixed)

Opened 1 year ago

Last modified 2 months ago

Chapter 5 Glibc looks at /etc/ld.so.preload

Reported by: alexander@linuxfromscratch.org Assigned to: dj@linuxfromscratch.org
Priority: high Milestone: 6.4
Component: Book Version: 6.3
Severity: normal Keywords:
Cc:

Description

The problem is that Chapter5 glibc looks into the /etc/ld.so.preload file instead of, e.g., /tools/etc/ld.so.preload.

Suppose that /etc/ld.so.preload contains one line: /usr/lib/libaoss.so.0 (I am sick and tired of OSS-only applications that by definition cannot respect the software-only ALSA PCM volume control on my Intel HD audio chip, and too lazy to change the .desktop files each time I upgrade these applications). Then, programs compiled against Chapter 5 glibc will not be able to run - the dynamic linker will attempt to load /usr/lib/libaoss.so.0 and notice that it depends upon libasound.so.2 which is not available in the default library search path.

Yes, I know that listing /usr/lib/libaoss.so.0 instead of just libaoss.so.0 is my user error, but it is still easy to change Chapter 5 Glibc so that it doesn't look at /etc/ld.so.preload. Just change the static const char preload_file[] initialization in elf/rtld.c.

The bug also applies to DIY Linux.

Change History

10/05/08 14:40:22 changed by bdubbs@linuxfromscratch.org

  • milestone changed from 7.0 to 6.4.

10/07/08 07:08:19 changed by randy@linuxfromscratch.org

  • priority changed from normal to high.

Again, something that needs to be put in sooner than later. It is altering the instructions for one of the toolchain packages (perhaps the most important one) in the Chapter 5 build.

Bumping the priority. I see the version is marked 6.3 but doesn't it also apply to SVN? If not, then it is errata material, and not something we need to do for the next release.

10/08/08 18:59:19 changed by dj@linuxfromscratch.org

  • owner changed from lfs-book@linuxfromscratch.org to dj@linuxfromscratch.org.
  • status changed from new to assigned.

I can drop this one in too and see what happens, but I seriously doubt that it'll cause any issues.

sed -i 's@/etc/ld.so.preload@/tools/etc/ld.so.preload@' elf/rtld.c

10/11/08 21:55:39 changed by dj@linuxfromscratch.org

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in r8645.