Mailing List Archive

shared library problems in emerging packages
Hi,

My gentoo box has begun having problems emerging packages that want
dynamic loading of modules or, rather, my box has begun having problems
with dynamic loading of shared libraries and emerge just shows it
first. The problem usually manifests itself in messages like the
below (from emerge, runtime):

/bin/bash: error while loading shared libraries: /lib/libsandbox.so: undefined symbol: _dl_load_lock

I have gotten messages about _dl_load_lock from trying to build the
gettext and apache packages too. I cannot emerge libperl since the
perl config script does not believe the system supports shared libraries
(or something).

Coming back to the error message above, it seems to stem from the
fact that /usr/lib/libdl.a does not contain this symbol:

nm /usr/lib/libdl.a | grep U
U _dl_open
U _dlerror_run
U _dl_close
U _dlerror_run
U _dl_load_lock
U _dl_sym
U _dlerror_run
U _dl_load_lock
U _dl_vsym
U _dlerror_run
U __asprintf
U __dcgettext
U _dl_catch_error
U _libc_intl_domainname
U calloc
U free
U strerror
U _dl_addr
U _dl_addr
U _dl_rtld_di_serinfo
U _dl_signal_error
U _dlerror_run
U strcpy

..or at least I think that is the problem, I am a bit lost here (which
is why I write this). Interestingly, another gentoo system I have, which
does not have this problem, has /usr/lib/libdl.so. The sick system does
not... I have tried to reemerge glibc to see if that fixed this but no,
it does not. Manually creating this symlink to point to /lib/libdl.so.2
does not make things better so I guess this is just another symptom?

I could write loads more but I would just bore you :) and I am not sure
I am including the right information anyways. Find below output from
emerge info and equery uses glibc. Any response at all is appreciated
and thanks in advance.

emerge info
Portage 2.0.51-r2 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r2, 2.6.8 i686)
=================================================================
System uname: 2.6.8 i686 Pentium III (Katmai)
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.14.90.0.8-r1
Headers: sys-kernel/linux-headers-2.4.21-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer -ftracer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer -ftracer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks sandbox userpriv usersandbox"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.gentoo.skynet.be/pub/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/root/portage_overlays"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X apm avi berkdb bitmap-fonts crypt cscope cups curl encode exif f77 fam foomaticdb ftp gd gdbm gif gpm imagemagick imap imlib jpeg libwww mad maildir makecheck mbox mime mng mpeg ncurses nls nptl oggvorbis pam pcre pdflib perl php pic pie png ppds python quicktime readline samba sdl shared sharedmem slang snmp sockets spell spl ssl tcpd tiff truetype usb x86 xml2 xpm xprint zlib"


... equery uses glibc fails due to the above emerge shared lib problem...

Cheers,
Rasmus



--
gentoo-user@gentoo.org mailing list
Re: shared library problems in emerging packages [ In reply to ]
On Sun, Oct 24, 2004 at 06:32:27PM -0300, Francisco Ares wrote:
> Could you check your /etc/make.conf and /etc/profile to look for words
> like "static"?

There is none.

> Look also in your /usr/src/linux/.config
>
> If you can't see anything that you find strange, post those files to the
> list. Please clean the comment lines but not the lines of features not
> compiled to your kernel.

like the attached? BTW, /usr/src/linux points to 2.6.7, while
the running kernel is 2.6.8.1

Thanks for your answer.

Rasmus
Re: shared library problems in emerging packages [ In reply to ]
Could you check your /etc/make.conf and /etc/profile to look for words
like "static"?

Look also in your /usr/src/linux/.config

If you can't see anything that you find strange, post those files to the
list. Please clean the comment lines but not the lines of features not
compiled to your kernel.

Francisco


Rasmus Andersen wrote:

>Hi,
>
>My gentoo box has begun having problems emerging packages that want
>dynamic loading of modules or, rather, my box has begun having problems
>with dynamic loading of shared libraries and emerge just shows it
>first. The problem usually manifests itself in messages like the
>below (from emerge, runtime):
>
>/bin/bash: error while loading shared libraries: /lib/libsandbox.so: undefined symbol: _dl_load_lock
>
>I have gotten messages about _dl_load_lock from trying to build the
>gettext and apache packages too. I cannot emerge libperl since the
>perl config script does not believe the system supports shared libraries
>(or something).
>
>Coming back to the error message above, it seems to stem from the
>fact that /usr/lib/libdl.a does not contain this symbol:
>
> nm /usr/lib/libdl.a | grep U
> U _dl_open
> U _dlerror_run
> U _dl_close
> U _dlerror_run
> U _dl_load_lock
> U _dl_sym
> U _dlerror_run
> U _dl_load_lock
> U _dl_vsym
> U _dlerror_run
> U __asprintf
> U __dcgettext
> U _dl_catch_error
> U _libc_intl_domainname
> U calloc
> U free
> U strerror
> U _dl_addr
> U _dl_addr
> U _dl_rtld_di_serinfo
> U _dl_signal_error
> U _dlerror_run
> U strcpy
>
>..or at least I think that is the problem, I am a bit lost here (which
>is why I write this). Interestingly, another gentoo system I have, which
>does not have this problem, has /usr/lib/libdl.so. The sick system does
>not... I have tried to reemerge glibc to see if that fixed this but no,
>it does not. Manually creating this symlink to point to /lib/libdl.so.2
>does not make things better so I guess this is just another symptom?
>
>I could write loads more but I would just bore you :) and I am not sure
>I am including the right information anyways. Find below output from
>emerge info and equery uses glibc. Any response at all is appreciated
>and thanks in advance.
>
>emerge info
>Portage 2.0.51-r2 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r2, 2.6.8 i686)
>=================================================================
>System uname: 2.6.8 i686 Pentium III (Katmai)
>Gentoo Base System version 1.4.16
>Autoconf: sys-devel/autoconf-2.59-r5
>Automake: sys-devel/automake-1.8.5-r1
>Binutils: sys-devel/binutils-2.14.90.0.8-r1
>Headers: sys-kernel/linux-headers-2.4.21-r1
>Libtools: sys-devel/libtool-1.5.2-r5
>ACCEPT_KEYWORDS="x86"
>AUTOCLEAN="yes"
>CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer -ftracer"
>CHOST="i686-pc-linux-gnu"
>COMPILER=""
>CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
>CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
>CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer -ftracer"
>DISTDIR="/usr/portage/distfiles"
>FEATURES="autoaddcvs ccache distlocks sandbox userpriv usersandbox"
>GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.gentoo.skynet.be/pub/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
>MAKEOPTS="-j2"
>PKGDIR="/usr/portage/packages"
>PORTAGE_TMPDIR="/var/tmp"
>PORTDIR="/usr/portage"
>PORTDIR_OVERLAY="/root/portage_overlays"
>SYNC="rsync://rsync.gentoo.org/gentoo-portage"
>USE="X apm avi berkdb bitmap-fonts crypt cscope cups curl encode exif f77 fam foomaticdb ftp gd gdbm gif gpm imagemagick imap imlib jpeg libwww mad maildir makecheck mbox mime mng mpeg ncurses nls nptl oggvorbis pam pcre pdflib perl php pic pie png ppds python quicktime readline samba sdl shared sharedmem slang snmp sockets spell spl ssl tcpd tiff truetype usb x86 xml2 xpm xprint zlib"
>
>
>... equery uses glibc fails due to the above emerge shared lib problem...
>
>Cheers,
> Rasmus
>
>
>
>


--
gentoo-user@gentoo.org mailing list
Re: shared library problems in emerging packages [ In reply to ]
BTW, while I take a look at your .config file (I'm no kernel guru, but let's see what I can find), are you sure that the libraries are installed? Sorry to ask you this, but sometimes the programs look for symlinks and not the real library.

Look at your /lib directory, and you must see almost every library with one or two symlinks pointing to each library with a simplified name, e.g.:

lrwxrwxrwx 1 root root 12 Set 3 21:48 libuuid.so -> libuuid.so.1*
lrwxrwxrwx 1 root root 14 Set 3 21:48 libuuid.so.1 -> libuuid.so.1.2*
-rwxr-xr-x 1 root root 9,9K Jul 15 14:26 libuuid.so.1.2*
lrwxrwxrwx 1 root root 17 Set 3 21:48 libwrap.so -> /lib/libwrap.so.0*
lrwxrwxrwx 1 root root 21 Set 3 21:48 libwrap.so.0 -> /lib/libwrap.so.0.7.6*
-rwxr-xr-x 1 root root 29K Jul 15 14:35 libwrap.so.0.7.6*
lrwxrwxrwx 1 root root 13 Set 3 21:48 libz.so -> libz.so.1.2.1*
lrwxrwxrwx 1 root root 13 Set 3 21:48 libz.so.1 -> libz.so.1.2.1*
-rwxr-xr-x 1 root root 62K Ago 29 21:05 libz.so.1.2.1*

Perhaps your system has lost some of those symlinks (???)

Francisco


Rasmus Andersen wrote:
On Sun, Oct 24, 2004 at 06:32:27PM -0300, Francisco Ares wrote:
Could you check your /etc/make.conf and /etc/profile to look for words like "static"?
There is none.
Look also in your /usr/src/linux/.config If you can't see anything that you find strange, post those files to the list. Please clean the comment lines but not the lines of features not compiled to your kernel.
like the attached? BTW, /usr/src/linux points to 2.6.7, while the running kernel is 2.6.8.1 Thanks for your answer. Rasmus
snip.. -- gentoo-user@gentoo.org mailing list
Re: shared library problems in emerging packages [ In reply to ]
I'm sorry, Rasmus, I could not find anything that I think it could be
related to your problem, but there are some things that look strange to me:

>...
>CONFIG_EMBEDDED=y
>
>

Is it an embedded system you're working on? Maybe you should have set
CONFIG_CC_OPTIMIZE_FOR_SIZE

>...
># CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
>
>

>...
>CONFIG_MD=y
>CONFIG_BLK_DEV_MD=y
>CONFIG_MD_LINEAR=y
>CONFIG_MD_RAID0=y
>CONFIG_MD_RAID1=y
>CONFIG_MD_RAID5=y
># CONFIG_MD_RAID6 is not set
># CONFIG_MD_MULTIPATH is not set
>
>

As far as I know, this may cause you some problems. Just use this if you
really have and use RAID disks.


Check the files at /etc/portage and look for some unusual use-flags - if
there are any files in this directory.

Maybe a shot in the dark, but also try an "emerge -pvuDe world"
redirected to a file and look into it. There is a USE flag called
"static" that might be somehow enabled during an ebuild and the
libraries that should be separately be compiled were compiled to that
package.

Post your /etc/make.conf and /etc/profile .

Francisco

--
gentoo-user@gentoo.org mailing list
Re: shared library problems in emerging packages [ In reply to ]
On Sun, Oct 24, 2004 at 08:14:31PM -0300, Francisco Ares wrote:
> Perhaps your system has lost some of those symlinks (???)<br>

Yes, as I wrote in the original message, the symlink from
/usr/lib/libdl.so to /lib/libdl.so.2 seems to be missing. Manually
inserting it does not help subsequent emerges, however.

/usr/lib:
rasmus@firewall lib $ ls -l libdl.*
-rw-r--r-- 1 root root 11516 Oct 18 01:54 libdl.a

/lib
rasmus@firewall lib $ ls -l /lib/libdl.*
lrwxrwxrwx 1 root root 14 Oct 18 01:54 /lib/libdl.so.2 -> libdl-2.3.3.so

Cheers,
Rasmus

--
gentoo-user@gentoo.org mailing list
Re: shared library problems in emerging packages [ In reply to ]
On Sun, Oct 24, 2004 at 08:56:06PM -0300, Francisco Ares wrote:
> I'm sorry, Rasmus, I could not find anything that I think it could be
> related to your problem, but there are some things that look strange to me:

I agree that these look strange. But they come from the kernel I first
emerged as part of system setup. My current .config is much saner :)
but I am not sure I see the relevance of my kernel to this problem.
I am ready to be educated, though.

[...]

> Check the files at /etc/portage and look for some unusual use-flags - if
> there are any files in this directory.

There is none.

> redirected to a file and look into it. There is a USE flag called
> "static" that might be somehow enabled during an ebuild and the
> libraries that should be separately be compiled were compiled to that
> package.

aux_get(): (0) Error in sys-fs/udev-026-r1 ebuild. (1)
Check for syntax error or corruption in the ebuild. (--debug)

/bin/bash: error while loading shared libraries: /lib/libsandbox.so: undefined symbol: _dl_load_lock

aux_get(): (0) Error in sys-fs/udev-027 ebuild. (1)
Check for syntax error or corruption in the ebuild. (--debug)


> Post your /etc/make.conf and /etc/profile .

Attached.

Thanks,
Rasmus
Re: shared library problems in emerging packages [ In reply to ]
On Mon, Oct 25, 2004 at 10:59:32AM +0200, Rasmus Andersen wrote:
> > redirected to a file and look into it. There is a USE flag called
> > "static" that might be somehow enabled during an ebuild and the
> > libraries that should be separately be compiled were compiled to that
> > package.

OK, forgot the text here: If I run emerge -pDeuv world, I get this:

> aux_get(): (0) Error in sys-fs/udev-026-r1 ebuild. (1)
> Check for syntax error or corruption in the ebuild. (--debug)
>
> /bin/bash: error while loading shared libraries: /lib/libsandbox.so: undefined symbol: _dl_load_lock
>
> aux_get(): (0) Error in sys-fs/udev-027 ebuild. (1)
> Check for syntax error or corruption in the ebuild. (--debug)
>

but I also got a bit too whiny, since I can just do
FEATURES="-sandbox" emerge -pDeuv world and get the stuff. But looking
at the output there is no 'static' flags at all, only '-static' ones.

Rasmus

--
gentoo-user@gentoo.org mailing list
Re: shared library problems in emerging packages [ In reply to ]
On Mon, Oct 25, 2004 at 08:10:04AM -0300, Francisco Ares wrote:
> I'm sorry, Rasmus, I can't find any clue to the root of your problem.
>
> Do you have a live CD ? My only suggestion now is to try to emerge your
> missing libraries using a live CD.

I do have one. And I might try to emerge from the bottom up to try fix this.
But my problem is that a reemerge of glibc does not help. In other words,
I do not know what the problem is...

> Sorry for the very basic questions, for your files I see you are an
> experienced gentoo user.

No problem. I was nice getting feedback and sometimes you miss the
obvious.

> Francisco
>
> P.S.: I just saw a duplicate in your GENTOO_MIRRORS at the middle and at
> the bottom of your make.conf

Thanks.

Rasmus

--
gentoo-user@gentoo.org mailing list
Re: shared library problems in emerging packages [ In reply to ]
I'm sorry, Rasmus, I can't find any clue to the root of your problem.

Do you have a live CD ? My only suggestion now is to try to emerge your
missing libraries using a live CD.

Sorry for the very basic questions, for your files I see you are an
experienced gentoo user.

Francisco

P.S.: I just saw a duplicate in your GENTOO_MIRRORS at the middle and at
the bottom of your make.conf


Rasmus Andersen wrote:

>On Sun, Oct 24, 2004 at 08:56:06PM -0300, Francisco Ares wrote:
>
>
>>I'm sorry, Rasmus, I could not find anything that I think it could be
>>related to your problem, but there are some things that look strange to me:
>>
>>
>
>I agree that these look strange. But they come from the kernel I first
>emerged as part of system setup. My current .config is much saner :)
>but I am not sure I see the relevance of my kernel to this problem.
>I am ready to be educated, though.
>
>[...]
>
>
>
>>Check the files at /etc/portage and look for some unusual use-flags - if
>>there are any files in this directory.
>>
>>
>
>There is none.
>
>
>
>>redirected to a file and look into it. There is a USE flag called
>>"static" that might be somehow enabled during an ebuild and the
>>libraries that should be separately be compiled were compiled to that
>>package.
>>
>>
>
>aux_get(): (0) Error in sys-fs/udev-026-r1 ebuild. (1)
> Check for syntax error or corruption in the ebuild. (--debug)
>
>/bin/bash: error while loading shared libraries: /lib/libsandbox.so: undefined symbol: _dl_load_lock
>
>aux_get(): (0) Error in sys-fs/udev-027 ebuild. (1)
> Check for syntax error or corruption in the ebuild. (--debug)
>
>
>
>
>>Post your /etc/make.conf and /etc/profile .
>>
>>
>
>Attached.
>
>Thanks,
> Rasmus
>
>


--
gentoo-user@gentoo.org mailing list