Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247685 - >=x11-drivers/ati-drivers-8.552-r2 x11-base/xorg-server - collision /usr/lib/opengl/ati/extensions/libglx.so
Summary: >=x11-drivers/ati-drivers-8.552-r2 x11-base/xorg-server - collision /usr/lib/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-20 11:04 UTC by msjtr
Modified: 2009-07-28 14:03 UTC (History)
23 users (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 msjtr 2008-11-20 11:04:05 UTC
There is an file collision between =x11-drivers/ati-drivers-8.552-r2 and =x11-base/xorg-server-1.3.0.0-r6. I tried to update ati-drivers.

Reproducible: Always

Steps to Reproduce:

emerge x11-drivers/ati-drivers-8.552-r2
Comment 1 msjtr 2008-11-20 11:05:16 UTC
Portage 2.2_rc12 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r1-odin x86_64)
=================================================================                                             
System uname: Linux-2.6.27-gentoo-r1-odin-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4600+-with-glibc2.2.5
Timestamp of tree: Thu, 20 Nov 2008 01:45:03 +0000                                                             
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]                           
ccache version 2.4 [enabled]                                                                                   
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -msse3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -msse3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-fetch distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/myebuilds"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d a52 aac aalib acct acl acpi alsa amd64 ao audiofile bash-completion bcmath berkdb blas bluetooth boundchecking branding bzip2 cairo caps cddb cdr chasen cli cracklib crypt cscope ctype cups dbus dbx dri dts dv dvb dvd dvdr dvdread emboss encode evo exif fam fastcgi fbcon ffmpeg fftw firefox flac flatfile fltk foomaticdb fortran freetds ftp gcj gd gdbm ggi gif glitz glut gmp gnutls gpm gtk hal hardened iconv icq imap imlib innodb inotify ipv6 isdnlog jabber javascript jbig jikes jingle jpeg jpeg2k kde kdexdeltas lash ldap libcaca libsamplerate libwww lm_sensors mad maildir mbrola memlimit midi mikmod mime mmap mmx mng motif mp3 mpeg mplayer mudflap multilib musepack mysql mysqli ncurses nls nntp nocd nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp osc oscar pam pcntl pcre pda pdf perl png portaudio posix ppds pppd python qt3 qt3support qt4 quicktime readline recode reflection scanner sdl session sharedext shorten simplexml skey slangsndfile snmp soap sockets socks5 sox spell spl sqlite3 srt sse sse2 ssl startup-notification svg sysfs szip tcpd tetex theora threads tidy tiff tk tokenizer tordnstruetype unicode usb v4l vcd videos vim-syntax vorbis wmf wxwindows x264 xcb xcomposite xface xine xinetd xml xmlrpc xorg xosd xpm xrandr xsl xulrunner xv xvid zlib" ALSA_CARDS="emu10k1x" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulawmulti null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" DVB_CARDS="ttpci" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="fglrx radeon vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Haroon Rafique 2008-11-20 18:52:38 UTC
Similar file collision. In my case, collision between =x11-base/xorg-server-1.5.2 and =x11-drivers/ati-drivers-8.552-r2.

File in the collision is:
/usr/lib/opengl/ati/extensions/libglx.so
Comment 3 Jouni Rinne 2008-11-21 00:10:48 UTC
Same here, on ~amd64. The /usr/lib64/opengl/ati/extensions directory is a symlink to /usr/lib64/opengl/xorg-x11/extensions, so the conflicting file actually belongs only to xorg-server-package.
Comment 4 Nikos Chantziaras 2008-11-21 01:46:31 UTC
The problem is that the ebuild does "eselect opengl set xorg-x11" too late when unmerging.  It is the first thing the ebuild should do prior to doing anything else because right now eselect simply fails after unmerging and leaves broken files behind.
Comment 5 Nikos Chantziaras 2008-11-21 01:50:36 UTC
(In reply to comment #4)
> The problem is that the ebuild does "eselect opengl set xorg-x11" too late when
> unmerging.  It is the first thing the ebuild should do prior to doing anything
> else because right now eselect simply fails after unmerging and leaves broken
> files behind.

I forgot to mention the workaround:

You have to remember to do an "eselect opengl set xorg-x11" *before* you unmerge or upgrade ati-drivers.  If not, you have broken links and must delete them manually (the files eselect complains about).
Comment 6 Matteo Modesti 2008-11-22 23:33:19 UTC
(In reply to comment #5)
> I forgot to mention the workaround:
> 
> You have to remember to do an "eselect opengl set xorg-x11" *before* you
> unmerge or upgrade ati-drivers.  If not, you have broken links and must delete
> them manually (the files eselect complains about).

Doesn't work for me. I tried both "eselect opengl set xorg-x11" and "eselect opengl set ati" before "emerge x11-drivers/ati-drivers -DNu", but didn't fix the file collision.
I'm using x11-base/xorg-server-1.4.2.
Comment 7 msjtr 2008-11-23 15:03:40 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > I forgot to mention the workaround:
> > 
> > You have to remember to do an "eselect opengl set xorg-x11" *before* you
> > unmerge or upgrade ati-drivers.  If not, you have broken links and must delete
> > them manually (the files eselect complains about).
> 
> Doesn't work for me. I tried both "eselect opengl set xorg-x11" and "eselect
> opengl set ati" before "emerge x11-drivers/ati-drivers -DNu", but didn't fix
> the file collision.
> I'm using x11-base/xorg-server-1.4.2.
> 

after I removed the symlink /usr/lib64/opengl/ati/extensions emerge stopped  to complain.
I also removed a dangling symlink /usr/lib32/opengl/ati/extensions (emerge also complaints about not able to write to this location).

Note that it seems that x11-drivers/ati-drivers-8.552-r2 needs Xorg7.4 though, see bug #247763.
Comment 8 Nikos Chantziaras 2008-11-24 04:07:18 UTC
(In reply to comment #6)
> Doesn't work for me. I tried both "eselect opengl set xorg-x11" and "eselect
> opengl set ati" before "emerge x11-drivers/ati-drivers -DNu", but didn't fix
> the file collision.
> I'm using x11-base/xorg-server-1.4.2.

You have to remove the broken symlinks before you do that, and you have to remember to do that each time you install/upgrade the drivers or else the broken symlinks will be back.

In other words, if you already have the broken symlinks, eselect won't work. The ebuild needs to call "eselect opengl set xorg-x11" *before* merging/unmerging any files. If it does it after, it's too late.
Comment 9 Donnie Berkholz (RETIRED) gentoo-dev 2008-11-24 23:08:07 UTC
(In reply to comment #8)
> In other words, if you already have the broken symlinks, eselect won't work.
> The ebuild needs to call "eselect opengl set xorg-x11" *before*
> merging/unmerging any files. If it does it after, it's too late.

Luca, do you want to make that change?
Comment 10 Luca Barbato gentoo-dev 2008-11-25 09:57:24 UTC
Sounds sane.
Comment 11 Nikos Chantziaras 2008-11-25 12:14:37 UTC
Keep in mind that users who already have broken symlinks will have to be informed to delete them (I suppose an ebuild can't go just ahead and delete those.) This change in the ebuild will prevent people from getting broken symlinks, but won't help people who already do have them; they'll need to delete them themselves.

The deletion process is quite simple. If any of the following commands:

file /usr/lib32/libGL.so
file /usr/lib/libGL.so
file /usr/X11R6/lib64/xorg/modules/extensions/libglx.so

returns a "broken symbolic link to ..." error, then the file will have to be deleted and an "eselect opengl set xorg-x11" is needed. As I mentioned above, I assume this can't be done in the ebuild.
Comment 12 Nikos Chantziaras 2008-11-25 12:16:53 UTC
(In reply to comment #11)
> file /usr/X11R6/lib64/xorg/modules/extensions/libglx.so

This should probably be /usr/X11R6/lib/xorg/modules/extensions/libglx.so to catch both x86 and AMD64.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2008-12-26 17:18:33 UTC
Doesn't look version specific to me - I have just seen this with xorg-server-1.5.3 and ati-drivers-8.561. :)
Comment 14 Luca Barbato gentoo-dev 2008-12-27 08:42:05 UTC
Strange since switching to xorg before removing the old driver should take care of everything (otherwise I'll have to ask zmedico about leaving me handle this case on pre_inst)
Comment 15 Jason Wigg 2009-04-08 02:15:36 UTC
Running 'eselect opengl set xorg-x11' before the merge didn't work for me. Still complains about the file collision. I removed the symlink at '/usr/lib/opengl/ati/extensions' and reemerged, then complains about broken symlink: /usr/lib32/opengl/ati/extensions
then complains about orphaned file collisions:
 * Detected file collision(s):
 * 
 *      /usr/lib64/opengl/ati/extensions/libdri.so
 *      /usr/lib64/opengl/ati/extensions/libglx.so

After removing the orphaned files and the symlinks the package merges successfully.

Comment 16 Robert Wolf 2009-04-14 17:51:35 UTC
After removing collision file /usr/lib/opengl/ati/extensions/libglx.so emerge ati-drivers successful. But this should not be the correct solution of this problem
Comment 17 Adrian Bienkowski 2009-04-19 04:37:24 UTC
I think the problem maybe when you specify both fglrx and radeon for you VIDEO_CARDS in /etc/make.conf.

This flag causes xorg-server to put its own version of libglx.so in that directory, and so ati-drivers complain about it for the right reason.

I know this was not a problem before, so there must be a way around it.

I removed the radeon dependency, reinstalled xorg-server and now ati-drivers install just fine, but this still needs to be fixed. I had no problem with ati-drivers-8.522 and xorg-server-1.3.0.0
Comment 18 Matt McHenry 2009-04-23 11:57:18 UTC
(In reply to comment #17)
> I think the problem maybe when you specify both fglrx and radeon for you
> VIDEO_CARDS in /etc/make.conf.

I'm getting this error too, and the above does not seem to be the cause:

# grep VIDEO_CARDS /etc/make.conf | grep -v ^#
VIDEO_CARDS="fglrx fbdev v4l vesa vga"

I also ran 'eselect opengl set xorg-x11' and that didn't fix it.  The commands from comment 11 report:

# file /usr/lib/libGL.so
/usr/lib/libGL.so: symbolic link to `/usr/lib/opengl/xorg-x11/lib/libGL.so'
# file /usr/lib32/libGL.so
/usr/lib32/libGL.so: cannot open `/usr/lib32/libGL.so' (No such file or directory)
# file /usr/X11R6/lib/xorg/modules/extensions/libglx.so
/usr/X11R6/lib/xorg/modules/extensions/libglx.so: symbolic link to `/usr/lib/opengl/xorg-x11/extensions/libglx.so'
Comment 19 Gil Kloepfer 2009-04-27 15:49:50 UTC
I think I see what the problem is, and it is with the x11-drivers/ati-drivers ebuild.

For whatever reason, a symlink remained from ati-drivers-8.452 that was generated by this statement:
dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
fry$ ls -l /usr/lib/opengl/ati/extensions 
lrwxrwxrwx 1 root root 22 Mar  4 13:14 /usr/lib/opengl/ati/extensions -> ../xorg-x11/extensions/

In the new release of ati-drivers, this symlink was made into a directory.  When upgrading from 8.452 to 8.552-r2, the synlink remained.  So when portage tried to put the libglx.so into /usr/lib/opengl/ati/extensions during the emerge, it hit that symlink, tried to write the libglx.so from ati-drivers over the top of the one for x11-xorg, and emerge complained (as it should have).

The question is why the symlink wasn't removed (and replaced with a real directory) when the upgrade to ati-drivers happened...

I think this is the cause of all the troubles listed here.

For more info, here's a portion of the diff of the two ebuilds where I think the problem is happening:
(portion of diff -u ati-drivers-8.452.ebuild ati-drivers-8.552-r2.ebuild)
@@ -376,9 +393,8 @@
        dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
        dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
 
-       # Same as the xorg implementation (eselect opengl does not fall
-       # back to xorg-x11 if we omit this symlink, meaning no glx).
-       dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
+       exeinto ${ATI_ROOT}/extensions
+       doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/*
 
        # DRI modules, installed into the path used by recent versions of mesa.
        exeinto /usr/$(get_libdir)/dri
Comment 20 razamatan 2009-05-17 03:52:27 UTC
so what's the fix?
Comment 21 razamatan 2009-05-17 05:27:37 UTC
ok... tooling around, this is what i did to fix this for me, ymmv, standard disclaimer, etc...

1.  verify things are symlinks:
file /usr/lib64/opengl/ati/extensions
file /usr/lib32/opengl/ati/extensions

2.  delete the symlinks
rm /usr/lib64/opengl/ati/extensions
rm /usr/lib32/opengl/ati/extensions

3.  create directories
mkdir /usr/lib64/opengl/ati/extensions
mkdir /usr/lib32/opengl/ati/extensions

4.  re-emerge xorg-server and ati-drivers
emerge -1 xorg-server ati-drivers
Comment 22 Tomáš Chvátal (RETIRED) gentoo-dev 2009-07-28 14:03:32 UTC
Fixed with xorg-server-1.5.3-r7 and new eselect opengl.