Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53854 - (glibc) symbolic link of libpthread.so.0 causes circular definition and crashes programs
Summary: (glibc) symbolic link of libpthread.so.0 causes circular definition and crash...
Status: VERIFIED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-13 21:50 UTC by John (EBo) David
Modified: 2005-01-28 13:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John (EBo) David 2004-06-13 21:50:19 UTC
Synopsys:
  During an upgrade of KDE (bug #52732), meinproc crashes with the error 
that /usr/lib/libpthread.so is not a recognised shared library.
Upon inspection it was discovered that /usr/lib/libpthread.so.0
is symbolically linked to /usr/lib/libpthread.so, and that file contains
the following definition:

    /* GNU ld script
       Use the shared library, but some functions are only in
       the static library, so try that secondarily.  */
    OUTPUT_FORMAT(elf32-i386)
    GROUP ( /lib/libpthread.so.0 /usr/lib/libpthread_nonshared.a )

This then triggers a weird circular dependency between libpthread.so.0 
and libpthread.so.  Upgrading glibc and gcc does not help because installation 
appears to either simply overwrite (and not rm {} ; cp {}), or the .so.0 
file is not built and installed.

Replication (assumes that KDE is installed):
  1) mkdir /usr/lib/pthread_save  # sanity check...
  2) cp /usr/lib/libpthread* /usr/lib/pthread_save  # save it just in case
  3) rm /usr/lib/libpthread.so.0
  4) ln -s /usr/lib/libpthread.so /usr/lib/libpthread.so.0
  5) meinproc 
        the above should cause the previously described error

  6) rm /usr/lib/libpthread*
        if you do not do this then the .so.0 will remain a problem

  7) emerge glibc (choose some recent version -- I installed glibc-2.3.4.20040605-r1.ebuild)
  
  8) ls -l /usr/lib/libpthread*
        no .so.0 ...
  9) meinproc
        works fine...
  10) rm -r /usr/lib/pthread_save  # clean up the mess left

Thoughts:

  The above may have been brought about by several factors and the best
solution may range from removing the original libs before installing new ones,
changing the .so definition to reflect the fact that there is no .so.0 
currently installed, or who knows what, but this bug is one of those that are likely caused from upgrading from a very specific glibc and is only likely to bite a couple of people...
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2004-06-13 23:52:33 UTC
reopen with output from emerge --info please.
Comment 2 John (EBo) David 2004-06-14 01:26:38 UTC
I am not sure if you wanted the original configuration or the one OI totially hacked, so here are both (first extracted from the #52732 bug report, and the second is the current status

================================================================= 
================================================================= 
================================================================= 
Emerge --info follows: 
 
Portage 2.0.50-r7 (default-x86-1.4, gcc-3.4.0, glibc-2.3.3_pre20040529-r0, 
2.6.3) 
================================================================= 
System uname: 2.6.3 i686 Celeron (Coppermine) 
Gentoo Base System version 1.4.10 
Autoconf: sys-devel/autoconf-2.59-r3 
Automake: sys-devel/automake-1.8.3 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-O3 -march=pentium3 -funroll-loops -fprefetch-loop-arrays -pipe" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O3 -march=pentium3 -funroll-loops -fprefetch-loop-arrays -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs ccache sandbox" 
GENTOO_MIRRORS="http://gentoo.oregonstate.edu 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="X Xaw3d acpi alsa apache2 apm arts avi berkdb bonobo crypt cups emacs 
encode esd foomaticdb gdbm gif gphoto2 gpm gtk gtk2 imap imlib java jpeg kde 
ldap libg++ libwww mad mikmod motif mozilla mpeg mpi ncurses nls oggvorbis 
opengl oss pam pcmcia pdflib perl plotutils pmeg png pnp python qt quicktime 
readline sdl slang spell ssl svga tcltk tcpd tetex truetype trusted usb 
wxwindows x86 xml2 xmms xv zlib"


================================================================= 
================================================================= 
================================================================= 
Emerge --info follows: 
 
Portage 2.0.50-r8 (default-x86-1.4, gcc-3.4.0, glibc-2.3.4.20040605-r1, 2.6.3)
=================================================================
System uname: 2.6.3 i686 Celeron (Coppermine)
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -funroll-loops -fprefetch-loop-arrays -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref:/usr/X11R6/lib/X11/xkb:/usr/kde/3.2/share/config:/usr/kde/3.1/share/config:/usr/share/texmf/tex/generic/config/ /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/:/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/gconf:/etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -funroll-loops -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d acpi alsa apache2 apm arts avi berkdb bonobo crypt cups emacs encode esd foomaticdb gdbm gif gphoto2 gpm gtk gtk2 imap imlib java jpeg kde ldap libg++ libwww mad mikmod motif mozilla mpeg mpi ncurses nls oggvorbis opengl oss pam pcmcia pdflib perl plotutils pmeg png pnp python qt quicktime readline sdl slang spell ssl svga tcltk tcpd tetex truetype trusted usb wxwindows x86 xml2 xmms xv zlib"
Comment 3 Travis Tilley (RETIRED) gentoo-dev 2004-06-15 13:50:39 UTC
your .so in /usr/lib says /lib/libpthread.so.0, which should exist and be used... i dont know why it would be attempting to access /usr/lib/libpthread.so.0 instead. but /lib/libpthread.so.0 does indeed exist, and on my system it points to /lib/libpthread-0.10.so. on an nptl system, it will point somewhere else. (0.61 i think?)
Comment 4 John (EBo) David 2004-06-15 15:28:36 UTC
Actually I do not have /lib/libpthread.so.0, /lib/libpthread-0.10.so, or anthing like that.  Which packages should install them? 


(now I wish there was some way to view the files that get installed from emerge -- maybe a new emerge option ;-)

Comment 5 Travis Tilley (RETIRED) gentoo-dev 2004-06-15 23:15:36 UTC
emerge gentoolkit

i get the following from it:

ayanami root # qpkg -f /lib/libpthread.so.0
sys-libs/glibc *
ayanami root # qpkg -f /lib/libpthread-0.10.so
sys-libs/glibc *
Comment 6 John (EBo) David 2004-06-18 12:52:48 UTC
Ahhh... 

There were both a /lib/libpthread.so.0 and a /usr/lib/libpthread.so.0; the latter being a symbolic link to /usr/lib/libpthread.so.  The latter is which caused all the problems.  Also note that a qpkg -l /usr/lib/libpthread.so.0 returns no result.  So I still question where the link came from 8-/

Thanks!
Comment 7 SpanKY gentoo-dev 2004-06-18 18:23:41 UTC
crazy
Comment 8 John (EBo) David 2004-06-18 22:17:26 UTC
At this point I this is closed unless someone else runs into this problem and can give more info where the rogue file  /usr/lib/libpthread.so.0 came from.  As a note, I have been running Gentoo 2.4 and 2.6 kernels on this machine for a few years and the link could have come from anywhere and anywhen...