Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132135 - lib & lib64 roles are reversed in some pre 2005.0 amd64 installations
Summary: lib & lib64 roles are reversed in some pre 2005.0 amd64 installations
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High blocker
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 132850 138120 138521 138602 139084 139087 140795 144625 150186 152388 153378 157416 157637 158506 189934 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-03 08:06 UTC by Dietrich Moerman
Modified: 2007-08-23 13:45 UTC (History)
20 users (show)

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


Attachments
xorg-x11-6.8.2-r7 emerge log (5524-xorg-x11-6.8.2-r7.log.bz2,244.84 KB, application/octet-stream)
2006-05-05 06:59 UTC, Dietrich Moerman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dietrich Moerman 2006-05-03 08:06:41 UTC
Emerging xorg-x11-6.8.2-r7 on AMD64 will create a bad circular symlink /usr/lib64. This results in Portage crashing and basicly making everything using Portage unusable, plus many other applications (such as Apache2).

The temporary solution is to fix the symlink:
> cd /usr
> rm lib64
> ln -s /usr/lib lib64

However, the emerge process does not complete and will try to upgrade xorg-x11 everytime world is updated.

Emerge info:
Gentoo Base System version 1.6.14
Portage 2.1_pre10-r2 (default-linux/amd64/2005.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
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.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /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/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.ovh.net/gentoo-distfiles/"
LC_ALL="nl_BE@euro"
LINGUAS="nl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.be.gentoo.org/gentoo-portage"
USE="amd64 7zip X acpi alsa apache2 avi berkdb bitmap-fonts bonobo bzip2 cdr cli crypt cups dbus directfb divx4linux dri dvd dvdr eds emacs emboss encode fam firefox flac flash foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 hal icq imagemagick imlib ipv6 isdnlog jabber java jpeg live lzw lzw-tiff mad mozilla mp3 mpeg msn mysql ncurses network nls ogg opengl oss pam pcre pdflib perl png postgres ppds pppd python quicktime readline reflection samba scanner sdl session spell spl sqlite ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode usb vorbis wmf xine xinerama xml xml2 xmms xorg xpm xv xvid zlib elibc_glibc kernel_linux linguas_nl userland_GNU video_cards_radeon"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS
Comment 1 Joshua Baergen (RETIRED) gentoo-dev 2006-05-03 09:19:12 UTC
What is the symlink that is made?

Also, please attach a full emerge log.  You can generate one by setting PORT_LOGDIR appropriately.
Comment 2 vicaya 2006-05-03 19:09:55 UTC
Same problem here. Apparent the offending code is in backward_compat_install
dosym ../${DIR} /usr/X11R6/${DIR}

where DIR happened to be lib64. Since /usr/X11R6 is symlinked to /usr, you have /usr/lib64 symlinked to ../lib64, which is itself.


I can imagine many 64 bit machine people would be pissed, because it's a security update.
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2006-05-03 19:29:59 UTC
(In reply to comment #2)
> I can imagine many 64 bit machine people would be pissed, because it's a
> security update.

Nothing has changed in this section, so they have no right to get pissed about this particular update. The code handling migration has been static for quite a while.
Comment 4 Dietrich Moerman 2006-05-03 21:38:56 UTC
I thought the symlink goes to ../usr/lib64. So it creates a never ending circle. I will try to reemerge as soon as I can.

Could it be because I'm using Portage 2.1?
Comment 5 Dietrich Moerman 2006-05-05 06:59:25 UTC
Created attachment 86197 [details]
xorg-x11-6.8.2-r7 emerge log

This is the full emerge log.
Comment 6 Dietrich Moerman 2006-05-05 07:01:11 UTC
If it may be of interest, this is where Portage halts (not included in log):

>>> /var/lib/xdm/.keep
--- /var/lib/xkb/
>>> /var/lib/xkb/README
Traceback (most recent call last):
  File "/usr/bin/emerge", line 3413, in ?
    mydepgraph.merge(pkglist)
  File "/usr/bin/emerge", line 2026, in merge
    retval=portage.doebuild(y,"merge",myroot,self.pkgsettings,edebug,tree="porttree")
  File "/usr/lib/portage/pym/portage.py", line 2887, in doebuild
    mydbapi=mydbapi, vartree=vartree, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 3070, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 6472, in merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 6109, in treewalk
    self.mergeme(srcroot,destroot,outfile,None,secondhand,cfgfiledict,mymtime)
  File "/usr/lib/portage/pym/portage.py", line 6272, in mergeme
    mymtime=movefile(mysrc,mydest,newmtime=thismtime,sstat=mystat, mysettings=self.settings)
  File "/usr/lib/portage/pym/portage.py", line 2927, in movefile
    dstat=os.lstat(os.path.dirname(dest))
OSError: [Errno 2] No such file or directory: '/usr/lib64/X11'
Comment 7 Dietrich Moerman 2006-05-05 12:12:42 UTC
Downgraded to Portage 2.0.54 and merging xorg-x11 now works. This is a bug in Portage 2.1_pre10-r2.
Comment 8 Donnie Berkholz (RETIRED) gentoo-dev 2006-05-09 23:45:31 UTC
*** Bug 132850 has been marked as a duplicate of this bug. ***
Comment 9 vicaya 2006-05-11 23:19:01 UTC
Tried emerge xorg-x11 again under portage 2.1_pre10-r5. Failed at the same place. Somehow my system has the lib64 links backwards: lib64 is a symlink to lib instead of lib to lib64. Both in / and /usr.

After I fixed the dirs by rm lib64 && mv lib lib64 && ln -s lib64 lib in busybox (bb.) emerge xorg-x11 went successfully.
Comment 10 Aaron Rusnak 2006-05-12 09:26:33 UTC
(In reply to comment #9)
> Tried emerge xorg-x11 again under portage 2.1_pre10-r5. Failed at the same
> place. Somehow my system has the lib64 links backwards: lib64 is a symlink to
> lib instead of lib to lib64. Both in / and /usr.
> 
> After I fixed the dirs by rm lib64 && mv lib lib64 && ln -s lib64 lib in
> busybox (bb.) emerge xorg-x11 went successfully.
> 
That worked for me. Thanks. How did the links get swithced in the first place though?
Comment 11 Simon Stelling (RETIRED) gentoo-dev 2006-05-12 10:12:30 UTC
They didn't get switched, and that's the problem. In 2004.3, /usr/lib64 -> /usr/lib was the convention. That changed with 2005.0.
Comment 12 vicaya 2006-05-13 12:13:21 UTC
I think either portage needs to do some sanity checking on these links or all ebuilds need to be able to handle both cases. The former seems to be simpler, something like this:

function switchlib64() { 
  echo "cd $1 && rm lib64 && mv lib lib64 && ln -s lib64 lib" | bb 
}
[ -L /lib64 ] && switchlib64 /
[ -L /usr/lib64 ] && switchlib64 /usr
Comment 13 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-20 22:22:45 UTC
(In reply to comment #12)
> I think either portage needs to do some sanity checking on these links or all
> ebuilds need to be able to handle both cases. The former seems to be simpler,
> something like this:

OK, reassigning.
Comment 14 Jason Stubbs (RETIRED) gentoo-dev 2006-06-21 04:40:40 UTC
I personally dislike the idea of putting that into portage very much. That sort of thing should have been in the 2005.0 upgrade guide. If the AMD64 team wants to support such a fix up, they are more than welcome to add it to bashrc in the profiles and have it run at a time when root is guaranteed...

That traceback might be worth fixing though.
Comment 15 Mike Doty (RETIRED) gentoo-dev 2006-06-21 09:59:47 UTC
(In reply to comment #14)
> I personally dislike the idea of putting that into portage very much. That sort
> of thing should have been in the 2005.0 upgrade guide. If the AMD64 team wants
> to support such a fix up, they are more than welcome to add it to bashrc in the
> profiles and have it run at a time when root is guaranteed...
> 
> That traceback might be worth fixing though.
> 
It was in the upgrade guide.  frankly, 2004.3 has been been removed from the tree for quite some time.  We had a period for almost a year where we maintained the upgrade docs.  At this point our advice is to reinstall.

Comment 16 Jason Stubbs (RETIRED) gentoo-dev 2006-06-21 18:01:32 UTC
Sorry for the incorrect claim. The only version I could find was one in blubb's devspace.

So, that traceback is all that needs to be worred about?
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2006-06-27 02:49:09 UTC
*** Bug 138120 has been marked as a duplicate of this bug. ***
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2006-06-29 13:16:55 UTC
*** Bug 138521 has been marked as a duplicate of this bug. ***
Comment 19 Rob Munsch 2006-06-29 13:29:36 UTC
um - my bug 
http://bugs.gentoo.org/show_bug.cgi?id=138520

has been marked as a dup of this.

I am not using AMD64, i am on a P4 - 32 bit.  I am not doing anything with xorg.  I am upgrading openldap and unsure whether it's okay to simply symlink the now-missing libldap-2.2.so.7 to the current .so, since in the previous occurance of ldap breaking everything,

http://bugs.gentoo.org/show_bug.cgi?id=94458

it was stated that making that symlink would be Very Bad, since there were a number of symbol changes between the two libraries.

there isn't a circular symlink in my reported issue; there's no symlink at all!  This issue has nothing to do with this bug it's gotten merged into - please tell me what i'm missing?
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2006-06-29 13:40:43 UTC
(In reply to comment #19)
> um - my bug 
> http://bugs.gentoo.org/show_bug.cgi?id=138520
> 
> has been marked as a dup of this.
> 
> I am not using AMD64, i am on a P4 - 32 bit.  

Eh? Move your openldap problems elsewhere, completely unrelated and also not marked as a dupe of this bug at all. 
Comment 21 Peter `MathFox' Roozemaal 2006-06-30 07:33:40 UTC
(In reply to comment #6)
> If it may be of interest, this is where Portage halts (not included in log):
[...]

FYI, I see the same behaviour with xorg-x11-6.8.2-r8 and portage-2.1-r1

python is FUBAR now.

[Professional opinion about stable packages trashing the package management system redacted]
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2006-06-30 11:14:24 UTC
*** Bug 138602 has been marked as a duplicate of this bug. ***
Comment 23 Erik Quaeghebeur 2006-07-01 03:17:41 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > I personally dislike the idea of putting that into portage very much. That sort
> > of thing should have been in the 2005.0 upgrade guide. If the AMD64 team wants
> > to support such a fix up, they are more than welcome to add it to bashrc in the
> > profiles and have it run at a time when root is guaranteed...
> > 
> > That traceback might be worth fixing though.
> > 
> It was in the upgrade guide.  frankly, 2004.3 has been been removed from the
> tree for quite some time.  We had a period for almost a year where we
> maintained the upgrade docs.  At this point our advice is to reinstall.

If I understand this correctly, I need to do a fresh Gentoo install to avoid any future _stable_ packages breaking my system again? Or can I do the above-mentioned lib64/lib renaming thing (any additional advice?) to avoid any problems in the future?

I've consistently upgraded my profile from 2004.3 to 2006.0, but I suppose I must've missed this point of the upgrading guide. Is the amd-specific guide still available (I see no link from <http://www.gentoo-linux.org/doc/en/gentoo-upgrading.xml>)?

BTW, see the following forum post for the problems people are encountering: <http://forums.gentoo.org/viewtopic-t-475692.html>. 

In my opinion, xorg-x11-6.8.2-r8 should never have gone stable for amd64. hopefully this problem is resolved for 7.0-r1, now that it's gone stable.
Comment 24 Dietrich Moerman 2006-07-01 04:07:25 UTC
I have reversed the directories as said in comment 9. Everything seems to work now. Reinstalling everything is not an option.
Comment 25 Jakub Moc (RETIRED) gentoo-dev 2006-07-03 14:04:21 UTC
*** Bug 139084 has been marked as a duplicate of this bug. ***
Comment 26 Jakub Moc (RETIRED) gentoo-dev 2006-07-17 09:03:27 UTC
*** Bug 140795 has been marked as a duplicate of this bug. ***
Comment 27 Simon Stelling (RETIRED) gentoo-dev 2006-07-20 10:36:44 UTC
*** Bug 139087 has been marked as a duplicate of this bug. ***
Comment 28 Jakub Moc (RETIRED) gentoo-dev 2006-08-21 05:37:43 UTC
*** Bug 144625 has been marked as a duplicate of this bug. ***
Comment 29 Jakub Moc (RETIRED) gentoo-dev 2006-10-05 11:37:33 UTC
*** Bug 150186 has been marked as a duplicate of this bug. ***
Comment 30 Jakub Moc (RETIRED) gentoo-dev 2006-10-05 12:02:53 UTC
*** Bug 150186 has been marked as a duplicate of this bug. ***
Comment 31 Benjamin 2006-10-05 12:35:20 UTC
I opended Bug 150186 xorg-server-1.0.2-r7 failed on AMD64 but it was mark as a duplicate of this bug. I read the workaround in Comment #9 from vicaya but I don't understand how can fix it, sorry. Could anybody please give me the commands to fix the problem?

I tried the following:
> cd /usr
> rm lib64
> ln -s /usr/lib lib64

...but it doesn't help. Also, the links "ls -l /usr/include/GL" further on point to /usr/lib32. 

> ls -l /usr/include/GL
> lrwxrwxrwx 1 root root     40 Oct  5 19:00 gl.h ->
> //usr/lib32/opengl/xorg-x11/include/gl.h
> lrwxrwxrwx 1 root root     43 Oct  5 19:00 glext.h ->
> //usr/lib32/opengl/xorg-x11/include/glext.h
> lrwxrwxrwx 1 root root     41 Oct  5 19:00 glx.h ->
> //usr/lib32/opengl/xorg-x11/include/glx.h
> lrwxrwxrwx 1 root root     44 Oct  5 19:00 glxext.h ->
> //usr/lib32/opengl/xorg-x11/include/glxext.h


Can anybody help?

Thanks,
Ben
Comment 32 Benjamin 2006-10-06 09:26:03 UTC
I finally got it.

Solution posted by vicaya:
<After I fixed the dirs by rm lib64 && mv lib lib64 && ln -s lib64 lib in
<busybox (bb.) emerge xorg-x11 went successfully.

Thanks,
Ben
Comment 33 Jakub Moc (RETIRED) gentoo-dev 2006-10-22 23:32:05 UTC
*** Bug 152388 has been marked as a duplicate of this bug. ***
Comment 34 Jakub Moc (RETIRED) gentoo-dev 2006-10-30 11:18:31 UTC
*** Bug 153378 has been marked as a duplicate of this bug. ***
Comment 35 Jakub Moc (RETIRED) gentoo-dev 2006-12-07 04:32:20 UTC
*** Bug 157416 has been marked as a duplicate of this bug. ***
Comment 36 Jakub Moc (RETIRED) gentoo-dev 2006-12-09 13:19:48 UTC
*** Bug 157637 has been marked as a duplicate of this bug. ***
Comment 37 Jakub Moc (RETIRED) gentoo-dev 2006-12-18 15:41:12 UTC
*** Bug 158506 has been marked as a duplicate of this bug. ***
Comment 38 Marius Mauch (RETIRED) gentoo-dev 2007-01-28 09:56:20 UTC
Don't really see anything we could do here.
Comment 39 Jakub Moc (RETIRED) gentoo-dev 2007-08-23 13:45:59 UTC
*** Bug 189934 has been marked as a duplicate of this bug. ***