It seems glibc forgets/fails to create the symlinks in /usr/lib that are needed for compiling many programs. Try this: # ls -l /usr/lib/libresolv.so lrwxrwxrwx 1 root root 19 Aug 24 18:32 /usr/lib/libresolv.so -> /lib/libresolv.so.2 # epm -qf /usr/lib/libresolv.so glibc-2.2.5-r5 # rm /usr/lib/libresolv.so # emerge /usr/portage/packages/sys-libs/glibc-2.2.5-r5.tbz2 (see attached) This will create /usr/lib/libresolv.so >>> /usr/lib/libresolv.so -> ../../lib/libresolv.so.2 but it later removes this link: <<< sym /usr/lib/libresolv.so The same goes for some of the other /usr/lib/ links.
Created attachment 3390 [details] output from emerge /usr/portage/packages/sys-libs/glibc-2.2.5-r5.tbz2
A workaround seems to be executing the following commands: 627 ln -s /lib/libnss_nisplus.so.2 libnss_nisplus.so 628 ln -s /lib/libpthread.so.0 libpthread.so 629 ln -s /lib/libresolv.so.2 libresolv.so 630 ln -s /lib/libnsl.so.1 libnsl.so 631 ln -s /lib/libnss_hesiod.so.2 libnss_hesiod.so 632 ln -s /lib/libnss_files.so.2 libnss_files.so 633 ln -s /lib/libm.so.6 libm.so 634 ln -s /lib/libutil.so.1 libutil.so 635 ln -s /lib/libnss_compat.so.2 libnss_compat.so 636 ln -s /lib/libthread_db.so.1 libthread_db.so 637 ln -s /lib/libcrypt.so.1 libcrypt.so 638 ln -s /lib/libBrokenLocale.so.1 libBrokenLocale.so 639 ln -s /lib/libdl.so.2 libdl.so 640 ln -s /lib/libnss_dns.so.2 libnss_dns.so 641 ln -s /lib/librt.so.1 librt.so 642 ln -s /lib/libanl.so.1 libanl.so 643 ln -s /lib/libnss_nis.so.2 libnss_nis.so This will make 'qpkg -v -c' happy.
The same issue is valid for the packages below. My guess is that this is not an error in the packages but an error in emerge. # qpkg -nc -c -v sys-apps/sed-3.02.80-r4 sys-apps/sed-3.02.80-r4 /usr/bin/sed !not exist! 1/22 From emerge: >>> /usr/bin/sed -> ../../bin/sed <<< sym /usr/bin/sed # qpkg -nc -c -v net-mail/evolution-1.0.8-r1 net-mail/evolution-1.0.8-r1 /usr/share/gnome/help/cal !not exist! /usr/share/gnome/help/cal/C !not exist! /usr/share/gnome/html/evolution-cal-util !not exist! /usr/share/gnome/html/evolution-cal-client !not exist! /usr/share/evolution/default_user/private !not exist! 5/1425 From emerge: >>> /usr/share/gnome/help/cal/ >>> /usr/share/gnome/help/cal/C/ >>> /usr/share/gnome/html/evolution-cal-util/ >>> /usr/share/gnome/html/evolution-cal-client/ >>> /usr/share/evolution/default_user/private/ <<< dir /usr/share/gnome/html/evolution-cal-util <<< dir /usr/share/gnome/html/evolution-cal-client <<< dir /usr/share/gnome/help/cal/C <<< dir /usr/share/gnome/help/cal <<< dir /usr/share/evolution/default_user/private # qpkg -nc -c -v sys-libs/cracklib-2.7-r5 sys-libs/cracklib-2.7-r5 /usr/share/cracklib !not exist! 1/22 From emerge: >>> /usr/share/cracklib/ <<< dir /usr/share/cracklib
One more: # qpkg -nc -c -v media-gfx/sane-backends-1.0.8-r2 media-gfx/sane-backends-1.0.8-r2 /usr/lib/libsane.a !not exist! 1/345 From emerge: >>> /usr/lib/libsane.a -> sane/libsane-dll.a <<< sym /usr/lib/libsane.a
*** Bug 6836 has been marked as a duplicate of this bug. ***
*** Bug 6830 has been marked as a duplicate of this bug. ***
sed seems to be a nice little package to test this with. I have strace'd emerge sed. I would guess the most interesting part is the <<< sym /usr/bin/sed in line 204068.
Created attachment 3453 [details] strace -ff emerge sed
I have compared 2 straces from 2 machines (1 where it works and 1 where it does not): Good: stat64("/usr/bin/sed", {st_mode=S_IFREG|0755, st_size=48540, ...}) = 0 Bad: stat64("/usr/bin/sed", 0xbfffedfc) = -1 ENOENT (No such file or directory) Is stat64 broken? Both use glibc-2.2.5-r5. I will try re-emerging glibc on Bad.
Am I not seeing something, or is there no Portage version listed anywhere in this bug report?
# emerge --version Portage 2.0.28 /usr is a symlink to a dir on a reiserfs partition. # ls -ld /usr lrwxr-xr-x 1 root root 17 Aug 21 20:47 /usr -> /hda6/gentoo-usr/
I can't replicate this with 2.0.34 and with my /usr dir being a symlink to /usr2. I'm going to close this bug. If you can replicate it with 2.0.35, then refile a new bug with detailed information on how to replicate, and be sure to mention that /usr is a symlink.