Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 80113 - libpthread.so (nptl) doesn't get removed during uninstall and leaves system borked
Summary: libpthread.so (nptl) doesn't get removed during uninstall and leaves system b...
Status: RESOLVED DUPLICATE of bug 87671
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High critical (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 85902 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-30 11:17 UTC by Thomas Raschbacher
Modified: 2005-07-16 11:05 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 Thomas Raschbacher gentoo-dev 2005-01-30 11:17:54 UTC
got those when trying to reemerge xscreensaver:
/lib/libpthread.so.0: undefined reference to `errno@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `__libc_dl_error_tsd@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `__resp@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `h_errno@GLIBC_PRIVATE'

also i had a problem when glibc couldn't be merged into / (had to use static busybox to restore old pkg)

with +nptlonly it worked (thanks to eradicator
Comment 1 Clemens Fruhwirth 2005-02-15 03:22:56 UTC
you might have some kind of libpthread leftover sitting in /lib.
I have had a libpthread-0.61.so, but the new glibc installed libpthread-0.10.so. Thus, ldconfig linked to libpthread-0.61 instead of the new 0.10. When gcc tried to link it got an old libpthread and a new libc, creating the problems you see.

Check the creation date to see which libpthread in /lib was built on the same day as the one in /lib/tls.
Comment 2 Jedi 2005-03-18 02:06:25 UTC
same error for me:

/lib/libpthread.so.0: undefined reference to `errno@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `__libc_dl_error_tsd@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `__resp@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `h_errno@GLIBC_PRIVATE'

that the situation:

-rwxr-xr-x  1 root root 141890 Mar 18 10:55 /lib/libpthread-0.10.so
-rwxr-xr-x  1 root root 161926 Dec  5 15:14 /lib/libpthread-2.3.4.so
lrwxrwxrwx  1 root root     19 Mar 18 10:59 /lib/libpthread.so.0 -> libpthread-2.3.4.so
phxl0007 linux # ll /lib/tls/libp*
-rwxr-xr-x  1 root root 158595 Mar 18 10:55 /lib/tls/libpthread-2.3.4.so
lrwxrwxrwx  1 root root     19 Mar 18 10:55 /lib/tls/libpthread.so.0 -> libpthread-2.3.4.so

what should I do?
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2005-03-18 08:01:20 UTC
What hardware this running on ?
Comment 4 Jedi 2005-03-18 10:45:52 UTC
Linux phxl0007 2.6.10-gentoo-r6 #3 Tue Feb 15 21:37:33 CET 2005 i686 Intel(R) Pentium(R) M processor 1600MHz GenuineIntel GNU/Linux

[ebuild   R   ] sys-libs/glibc-2.3.4.20041102-r1  -build -debug -erandom -hardened (-multilib) +nls -nomalloccheck +nptl -nptlonly -pic -userlocales 0 kB
Comment 5 Jedi 2005-03-18 16:36:24 UTC
using 
ln -s libpthread-0.10.so libpthread.so.0

first emerge works, then the link is automatically resetted to the old one

why the strange dates on the lib files??
Comment 6 Jeremy Huddleston (RETIRED) gentoo-dev 2005-03-18 16:44:19 UTC
Delete /lib/libpthread-2.3.4.so  That's the nptl one and should be in /lib/tls.  I don't know why it didn't get removed when you upgraded... that's odd.
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2005-03-19 00:32:12 UTC
I have seen this with libcrypt and other stuff as well that old versions are not removed.
Comment 8 Tom Verdaat 2005-03-19 01:37:35 UTC
experienced the same problem during the emerge of libperl and perl:

---------------------------------------------------------------------

Checking your choice of C compiler and flags for coherency...
I've tried to compile and run the following simple program:

#include <stdio.h>
int main() { printf("Ok\n"); return(0); }

I used the command:

        i686-pc-linux-gnu-gcc -o try -O2 -march=pentium4 -funroll-loops -pipe -fPIC -fforce-addr -ftracer -ffast-math -falign-functions=64 -mfpmath=sse,387 -msse2 -mmmx -msse2 -fmove-all-movables -fno-strict-aliasing -pipe -L/usr/local/lib try.c -lnsl -lndbm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
         ./try

and I got the following output:

/lib/libpthread.so.0: undefined reference to `errno@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `__libc_dl_error_tsd@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `__resp@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `h_errno@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
I can't compile the test program.
You have a BIG problem.  Shall I abort Configure [y]
Ok.  Stopping Configure.

!!! ERROR: sys-devel/libperl-5.8.6 failed.
!!! Function src_compile, Line 217, Exitcode 1
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

---------------------------------------------------------------------

[ebuild   R   ] sys-libs/glibc-2.3.4.20050125-r1  -build -debug -erandom -hardened (-multilib) +nls -nomalloccheck +nptl -nptlonly +pic -userlocales 0 kB

---------------------------------------------------------------------

rm /lib/libpthread-2.3.4.so /lib/libpthread.so.0
ln -s /lib/libpthread-0.10.so /lib/libpthread.so.0

this fixed the problem.
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2005-03-19 01:49:20 UTC
Do this please:

  # equery b /lib/libpthread-2.3.4.so
Comment 10 Gustavo Ribeiro Alves 2005-03-19 11:52:22 UTC
I have the same problem in my system.

The equery returned:

equery b /lib/libpthread-2.3.4.so
[ Searching for file(s) /lib/libpthread-2.3.4.so in *... ]
sys-libs/glibc-2.3.4.20040808-r1 (/lib/libpthread-2.3.4.so)
gustavo lib #
Comment 11 Gustavo Ribeiro Alves 2005-03-19 12:01:31 UTC
*** Bug 85902 has been marked as a duplicate of this bug. ***
Comment 12 cluon 2005-03-24 15:04:07 UTC
same problem, an epm -qa | grep glibc gives me:
glibc-2.3.4.20040808-r1
glibc-2.3.4.20041102-r1

just moved the symlink for libpthread.so.0 from libpthread-2.3.4.so to libpthread-0.10.so, and testing a build of mysql.. appears to have fixed it.
Comment 13 Tiago Vieira Machado 2005-03-29 06:17:46 UTC
I've got those when trying to emerge world:

morpheus root # emerge -uDav world

.. a lot of out put.. and them, at xorg-x11-6.8.2-r1 emerge:

rm -f Wraphelp.c
ln -s ../../lib/Xdmcp/Wraphelp.c Wraphelp.c
rm -f ks_tables.h makekeys makekeys.o
i686-pc-linux-gnu-gcc -o makekeys -Os -march=pentium4 -fno-strict-aliasing  -ansi -pedantic -Wno-return-type -w    -I../.. -I../../exports/include   -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L                          -D_POSIX_SOURCE -D_XOPEN_SOURCE                           -D_BSD_SOURCE -D_SVID_SOURCE                              -D_GNU_SOURCE                            -DFUNCPROTO=15 -DNARROWPROTO -DXTHREADS  -D_REENTRANT -DXUSE_MTSAFE_API    -DMALLOC_0_RETURNS_NULL  -DHAS_SNPRINTF -DLIBX11                      -DPOSTLOCALELIBDIR=\"lib\"   util/makekeys.c  -lpthread   -Wl,-rpath-link,../../exports/lib
/lib/libpthread.so.0: undefined reference to `errno@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `__libc_dl_error_tsd@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `__resp@GLIBC_PRIVATE'
/lib/libpthread.so.0: undefined reference to `h_errno@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
make[3]: [ks_tables.h] Error 1 (ignored)
./makekeys < ../../exports/include/X11/keysymdef.h > ks_tables_h
/bin/sh: line 1: ./makekeys: No such file or directory
make[3]: *** [ks_tables.h] Error 1
make[3]: Leaving directory `/var/tmp/portage/xorg-x11-6.8.2-r1/work/xc/lib/X11'
make[2]: *** [includes] Error 2
make[2]: Leaving directory `/var/tmp/portage/xorg-x11-6.8.2-r1/work/xc/lib'
make[1]: *** [includes] Error 2
make[1]: Leaving directory `/var/tmp/portage/xorg-x11-6.8.2-r1/work/xc'
make: *** [World] Error 2

!!! ERROR: x11-base/xorg-x11-6.8.2-r1 failed.
!!! Function build, Line 951, Exitcode 2
!!! make World failed
!!! If you need support, post the topmost build error, NOT this status message.

morpheus root # emerge info
Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20041102-r1,glibc-2.3.4.20040808-r1, 2.6.10-gentoo-r6 i686)
=================================================================
System uname: 2.6.10-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 1.70GHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 15 2005, 07:02:49)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.9.4, 1.6.3, 1.7.9-r1, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r1, 2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-Os -march=pentium4"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /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="-Os -march=pentium4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://ftp.las.ic.unicamp.br/gentoo http://mirrors.tds.net/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.osuosl.org/ ftp://gentoo.ccccom.com"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X Xaw3d aac aalib accessibility acpi acpi4linux alsa apache2 apm arts avi berkdb bitmap-fonts bonobo cddb cdr crypt cups curl divx divx4linux dmx dvd dvdread emacs emboss encode esd fam ffmpeg flac flash font-server foomaticdb fortran freetype gdbm gif gmail gphoto2 gpm gtk gtk2 gtkhtml guile icq imagemagick imlib ipv6 jabber java jpeg kde ldap libg++ libwww live lm_sensors mad md5sum mikmod mmap mmx mmx2 mng motif mp3 mpeg mpeg4 mplayer msn mysql ncurses nls nptl nvidia offensive oggvorbis opengl oss pam pdflib perl php png posix python qt quicktime readline real samba sdl snmp spell sse sse2 ssl svga tcpd tetex tiff truetype truetype-fonts type1-fonts unicode vidix wmf xfs xine xinerama xml xml2 xmms xscreensaver xv xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY

morpheus root #                                                                              
Comment 14 Jeff Shirley 2005-04-02 14:38:42 UTC
I had the same problem.

I looked at my /lib files, and I had a stale file /lib/libpthread-0.10.so in there. Judging from the date and the output of genlop -t glibc, I believe this file came from a build of glibc-2.3.2-r9 I did more than a year ago.

No idea why that stuck around, but deleting it and fixing the symlink so that it points to the new file fixed everything for me.
Comment 15 Jeremy Huddleston (RETIRED) gentoo-dev 2005-07-14 02:36:11 UTC
Not really sure what to do about this bug... if the system gets borked, postinst
doesn't run, so we can't do anything clever there...
Comment 16 Jeremy Huddleston (RETIRED) gentoo-dev 2005-07-15 14:21:25 UTC
I added logic to postinst on Apr 7 which has been in 2.3.4.20041102-r2 and
above.  I was under the impression that this logic was failing for some reason,
but the problem is that it wasn't added to 2.3.4.20041102-r1 like I thought it
was... so this bug will be solved by moving 2.3.5 into stable.

Also, most people that would be hit by this have already been hit since it is
mainly caused by going from USE="nptl" pre 2.3.4.20041102-r1 to USE="nptl
-nptlonly" on 2.3.4.20041102-r1 and beyond or switching from +/-nptlonly on the
newer ones.

And since this report and all comments predate when I added that logic, I'll
assume it is fixed.  If not, please reopen.

*** This bug has been marked as a duplicate of 87671 ***
Comment 17 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-16 11:05:04 UTC
Might be the same issue I had with cracklib .. user had prelink installed, and
ran it, but then uninstalled it .. thus portage could not use it to check if
checksum is valid ....