Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113042 - ldconfig creates weird libc.so.6 symlink pointing to libcrypto.so.4
Summary: ldconfig creates weird libc.so.6 symlink pointing to libcrypto.so.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-19 16:21 UTC by Peter Sorowka
Modified: 2005-11-20 03:51 UTC (History)
0 users

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


Attachments
Logfile created from ldconfig -n /usr/lib64 -v >& log (log,24.12 KB, text/plain)
2005-11-20 02:35 UTC, Peter Sorowka
Details
output of ls -l /usr/lib*/libcrypto.so* and readelf -d /usr/lib*/libcrypto.so* (log,11.67 KB, text/plain)
2005-11-20 03:13 UTC, Peter Sorowka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sorowka 2005-11-19 16:21:53 UTC
glibc-2.3.5-r2 with nptl support and the glibc-compat20 useflag enabled.
ldconfig creates a weird symlink in /usr/lib64: libc.so.6 -> libcrypto.so.4
which messes up some programs (vim, wget) and slowes down the whole system.
Everything runs flawlessly when I remove the symlink, but ldconfig keeps
recreating it. Snipped from strace ldconfig: 

stat("/usr/lib/libc.so.6", 0x7fffffee6e50) = -1 ENOENT (No such file or directory)
lstat("/usr/lib/libc.so.6", 0x7fffffee6dc0) = -1 ENOENT (No such file or directory)
symlink("libcrypto.so.4", "/usr/lib/libc.so.6") = 0

Why does ldconfig expect libc.so.6 to be there? It should ( and it is ) be
situated in /lib respecitvely /lib/tls.. even if I create the link manually as
follows: 
/usr/lib/libc.so.6 -> /lib/tls/libc.so.6 
ldconfig will change it to the weird one. Bug or administrative failure? 

cheers Peter

Reproducible: Always
Steps to Reproduce:
1. rm /usr/lib/libc.so.6
2. ldconfig

Actual Results:  
# ls -l /usr/lib64/libc.so.6
lrwxrwxrwx  1 root root 14 20. Nov 01:18 /usr/lib64/libc.so.6 -> libcrypto.so.4


Expected Results:  
nothing at all .. it should not create any symlink, cause everything works.

Portage 2.0.51.22-r3 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r2,
2.6.13-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.13-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3700+
Gentoo Base System version 1.6.13
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-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/lib64/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/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE"
LINGUAS="de"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aalib alsa arts audiofile avi berkdb bitmap-fonts bonobo bzip2 cdr
crypt cups curl directfb dvdr eds emboss encode esd exif expat fam ffmpeg flac
foomaticdb fortran gd gdbm ggi gif glut gnome gphoto2 gpm gstreamer gtk gtk2
gtkhtml guile idn imagemagick imlib ipv6 jack java jpeg junit kde lcms ldap
libwww lua lzw lzw-tiff mad mhash ming mng mp3 mpeg mysql ncurses nls nptl ogg
openal opengl pam pcre pdflib perl plotutils png postgres python qt quicktime
readline recode ruby samba sdl slang snmp speex spell sqlite ssl tcltk tcpd
tetex tiff truetype truetype-fonts type1-fonts udev usb userlocales vorbis xine
xml xml2 xmms xpm xv xvid zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, MAKEOPTS
Comment 1 SpanKY gentoo-dev 2005-11-19 22:50:24 UTC
there shouldnt be any libc.so.* symlinks in /usr/lib*/

what does this show on your system:
ls -l /lib*/libc.so* /usr/lib*/libc.so*
Comment 2 Peter Sorowka 2005-11-20 02:27:57 UTC
 # ls -l /lib*/libc.so* /usr/lib*/libc.so*
lrwxrwxrwx  1 root root  13 19. Nov 06:13 /lib32/libc.so.6 -> libc-2.3.5.so
lrwxrwxrwx  1 root root  13 19. Nov 06:13 /lib64/libc.so.6 -> libc-2.3.5.so
lrwxrwxrwx  1 root root  13 19. Nov 06:13 /lib/libc.so.6 -> libc-2.3.5.so
-rwxr-xr-x  1 root root 208 19. Nov 06:13 /usr/lib32/libc.so
-rwxr-xr-x  1 root root 210 19. Nov 06:13 /usr/lib64/libc.so
-rwxr-xr-x  1 root root 210 19. Nov 06:13 /usr/lib/libc.so

(where of course /lib64 -> /lib) 

and of course the one in /lib/tls:
lrwxrwxrwx  1 root root  13 19. Nov 06:13 /lib/tls/libc.so.6 -> libc-2.3.5.so
Comment 3 SpanKY gentoo-dev 2005-11-20 02:32:25 UTC
run `ldconfig -n /usr/lib64 -v >& log` and post the log file as an attachment
Comment 4 Peter Sorowka 2005-11-20 02:35:17 UTC
Created attachment 73216 [details]
Logfile created from ldconfig -n /usr/lib64 -v >& log
Comment 5 SpanKY gentoo-dev 2005-11-20 02:44:23 UTC
what does `readelf -d /usr/lib*/libcrypto.so* | grep SONAME` show ?
Comment 6 Peter Sorowka 2005-11-20 02:45:19 UTC
# readelf -d /usr/lib*/libcrypto.so* | grep SONAME
 0x000000000000000e (SONAME)             Library soname: [libcrypto.so.0.9.7]
 0x000000000000000e (SONAME)             Library soname: [libcrypto.so.0.9.7]
 0x000000000000000e (SONAME)             Library soname: [libcrypto.so.0.9.7]
 0x000000000000000e (SONAME)             Library soname: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libcrypto.so.0.9.7]
 0x000000000000000e (SONAME)             Library soname: [libcrypto.so.0.9.7]
 0x000000000000000e (SONAME)             Library soname: [libcrypto.so.0.9.7]
 0x000000000000000e (SONAME)             Library soname: [libc.so.6]
Comment 7 SpanKY gentoo-dev 2005-11-20 03:06:59 UTC
well that illustrates quite clearly what is broken ;)

run this and post the output as an attachment:
ls -l /usr/lib*/libcrypto.so*
readelf -d /usr/lib*/libcrypto.so*
Comment 8 Peter Sorowka 2005-11-20 03:13:20 UTC
Created attachment 73217 [details]
output of ls -l /usr/lib*/libcrypto.so* and readelf -d /usr/lib*/libcrypto.so*

yea, but how to resolve it is the question ;)
Comment 9 SpanKY gentoo-dev 2005-11-20 03:19:32 UTC
wtf is libcrypto.so.4 coming from ?  openssl doesnt install that library, and
it's clearly the thing that is breaking your system

post the output from one of these utils (depending on which you have installed):
qfile libcrypto.so.4                       (from portage-utils package)
equery belongs /usr/lib64/libcrypto.so     (from gentoolkit)
Comment 10 Peter Sorowka 2005-11-20 03:26:25 UTC
# equery belongs /usr/lib64/libcrypto.so
[ Searching for file(s) /usr/lib64/libcrypto.so in *... ]
dev-libs/openssl-0.9.7e-r2 (/usr/lib64/libcrypto.so -> libcrypto.so.0)


no hit.. probably i'll delete this file temporarily and see what happens?
Comment 11 SpanKY gentoo-dev 2005-11-20 03:29:21 UTC
err, that should have said:
equery belongs /usr/lib64/libcrypto.so.4
Comment 12 Peter Sorowka 2005-11-20 03:30:31 UTC
morgan psorowka # equery belongs /usr/lib64/libcrypto.so.4
[ Searching for file(s) /usr/lib64/libcrypto.so.4 in *... ]
morgan psorowka #

well.. nevertheless ;) 
Comment 13 SpanKY gentoo-dev 2005-11-20 03:38:20 UTC
ok, then i can only assume you installed that library onto your system ;)

to verify nothing will break (i doubt it though since the SONAME is bogus like
that), you can do:
# emerge pax-utils
# scanelf -lpqRN libcrypto.so.4

that'll tell you if anything is linked against the library ... if not, i'd just
go ahead and delete it from your system and then see if ldconfig creates the
libc.so.6 link again
Comment 14 Peter Sorowka 2005-11-20 03:51:38 UTC
ok, i'll try that, thanks for the immediate help. mhh.. i didnt install anything
on this computer without portage.. probably i had been affected by a broken
ebuilt once... 
anyway, i simply removed this libcrypto.so.4 thing and everything kept working.
seems to be solved. :)