Opened 14 years ago

Closed 14 years ago

#2719 closed task (wontfix)

toolchain ncurses ldconfig issue

Reported by: Gilles Espinasse Owned by: lfs-book@…
Priority: normal Milestone: 6.7
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

ncurses is the only toolchain package that use ldconfig without -n /tools/lib

For that reason, on jhalf, this happen

cd /tools/lib && (rm -f libcurses.so; ln -s libncurses.so.5.7 libcurses.so; )
test -z "" && /sbin/ldconfig
/sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
make[2]: [/tools/lib/libncurses.so.5.7] Error 1 (ignored)
cd /tools/lib && (rm -f libpanel.so.5; ln -s libpanel.so.5.7 libpanel.so.5; rm -f libpanel.so; ln -s libpanel.so.5 libpanel.so; )
test -z "" && /sbin/ldconfig
/sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
make[2]: [/tools/lib/libpanel.so.5.7] Error 1 (ignored)
cd /tools/lib && (rm -f libmenu.so.5; ln -s libmenu.so.5.7 libmenu.so.5; rm -f libmenu.so; ln -s libmenu.so.5 libmenu.so; )
test -z "" && /sbin/ldconfig
/sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
make[2]: [/tools/lib/libmenu.so.5.7] Error 1 (ignored)
cd /tools/lib && (rm -f libform.so.5; ln -s libform.so.5.7 libform.so.5; rm -f libform.so; ln -s libform.so.5 libform.so; )
test -z "" && /sbin/ldconfig
/sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
make[2]: [/tools/lib/libform.so.5.7] Error 1 (ignored)

A way to workaround that is to pass to configure LDCONFIG.

I tested this to work

LDCONFIG="/sbin/ldconfig -n /tools/lib" ./configure

The real fix should be that ncurses honor the information printed in Configuration summary, that libdir is in /tools/lib

Change History (5)

comment:1 by bdubbs@…, 14 years ago

For chapter 5, it doesn't make any difference. ldconfig is run later at file and will pick up all needed libraries there. The packages in Chapter 5 are only there to build the packages in chapter 6. It does that now.

comment:2 by Gilles Espinasse, 14 years ago

Not sure at all. bash is listed as depending of ncurses and is build just after ncurses

I checked that bash in chap 5 link to

-lbuiltins -lglob -lsh -lreadline -lhistory -lcurses -ltilde     -ldl

If you build as root (I know you should not), you may happily update host /etc/ld.so.cache

comment:3 by Matthew Burgess, 14 years ago

As Bruce said, this won't matter in chapter 5.

Note that binutils, gcc and file all use libtool to install their libraries, which is why they consistently do the right thing. Ncurses, instead, doesn't use libtool by default. It can be enabled by passing '--with-libtool' to configure, but that requires the host to have libtool installed (this is another bug in ncurses, it should include a means of generating the libtool script like binutils, gcc and file do). Even when the host has libtool and '--with-libtool' was passed, Ncurses doesn't call out to libtool for the installation of the libraries which means it still doesn't do 'ldconfig -n /tools/lib'!

Gilles, if you want to pass this report upstream, then feel free, but I don't think there's any point in us doing anything for what are just cosmetic warnings in the log files.

comment:4 by Gilles Espinasse, 14 years ago

I have the workaround for now and many tasks with more priority.

Once bash is compiled, it is run on the next step. So the libs that bash depend have to be registered in ld.so.cache. In the same time, there is no ld.so.cache under tools directory.

I should say I didn't have the understanding why it doesn't matter.

in reply to:  4 comment:5 by Matthew Burgess, 14 years ago

Resolution: wontfix
Status: newclosed

Replying to gespinasse:

I should say I didn't have the understanding why it doesn't matter.

It doesn't matter because you don't see any link errors from 'ld' or any runtime issues from bash within the chroot environment, hence the 'cosmetic warning' comment I made previously.

If I do an 'ldd' on /tools/bin/bash having set the environment correctly (i.e. PATH=/tools/bin:/bin:/usr/bin), it shows bash's requirement for ncurses will be satisfied by /tools/lib/libncurses.so.5. I'm of course assuming here that the run-time linker, 'ldd', will use the same rules as the build-time linker, 'ld', does for locating libraries.

Note: See TracTickets for help on using tickets.