Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237785 - x11-drivers/ati-drivers-8.522 - ld: cannot find -lGL
Summary: x11-drivers/ati-drivers-8.522 - ld: cannot find -lGL
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major
Assignee: X11 External Driver Maintainers
URL:
Whiteboard:
Keywords:
: 247794 254580 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-15 20:59 UTC by dejfson
Modified: 2009-07-06 11:04 UTC (History)
3 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 dejfson 2008-09-15 20:59:09 UTC
ati-drivers-8.522 fails to compile.

Reproducible: Always

Steps to Reproduce:
1. emerge ati-drivers (having ~x86)

Actual Results:  
# emerge ati-drivers
Calculating dependencies... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) x11-drivers/ati-drivers-8.522 to /
 * ati-driver-installer-8-8-x86.x86_64.run RMD160 SHA1 SHA256 size ;-) ...                                                                                                                                                             [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                                                   [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                                                  [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                                                 [ ok ]
 * checking ati-driver-installer-8-8-x86.x86_64.run ;-) ...                                                                                                                                                                            [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/2.6.22-gentoo-r9/build
 * Found sources for kernel version:
 *     2.6.22-gentoo-r9
>>> Unpacking source...
Warning: target directory exists /var/tmp/portage/x11-drivers/ati-drivers-8.522/work
Verifying archive integrity... All good.
Uncompressing ATI Proprietary Linux Driver-8.522................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 * Applying ati-powermode-opt-path-2.patch ...                                                                                                                                                                                         [ ok ]
 * Converting 2.6.x/Makefile to use M= instead of SUBDIRS= ...                                                                                                                                                                         [ ok ]
>>> Unpacking ./../common/usr/src/ati/fglrx_sample_source.tgz to /var/tmp/portage/x11-drivers/ati-drivers-8.522/work/extra
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/x11-drivers/ati-drivers-8.522/work ...
 * Preparing fglrx module
make -C /usr/src/linux M=/var/tmp/portage/x11-drivers/ati-drivers-8.522/work/common/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-2.6.22-gentoo-r9'
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.522/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/var/tmp/portage/x11-drivers/ati-drivers-8.522/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:6659: warning: initialization from incompatible pointer type
/var/tmp/portage/x11-drivers/ati-drivers-8.522/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:6685: warning: initialization from incompatible pointer type
  LD [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.522/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /var/tmp/portage/x11-drivers/ati-drivers-8.522/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.mod.o
  LD [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.522/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko
make[1]: Leaving directory `/usr/src/linux-2.6.22-gentoo-r9'
 * Building fgl_glxgears
In file included from fgl_glxgears.c:70:
/var/tmp/portage/x11-drivers/ati-drivers-8.522/work/common/usr/include/GL/glATI.h:3076:1: warning: "GL_ATI_texture_env_combine3" redefined
In file included from /usr/include/GL/gl.h:2150,
                 from /usr/include/GL/glu.h:37,
                 from fgl_glxgears.c:59:
/usr/include/GL/glext.h:6606:1: warning: this is the location of the previous definition
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
 *
 * ERROR: x11-drivers/ati-drivers-8.522 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3223:  Called die
 * The specific snippet of code:
 *       "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU -I"${S}"/common/usr/include fgl_glxgears.c -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed";
 *  The die message:
 *   fgl_glxgears build failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.522/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.522/temp/environment'.
 *

 * Messages for package x11-drivers/ati-drivers-8.522:

 *
 * ERROR: x11-drivers/ati-drivers-8.522 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3223:  Called die
 * The specific snippet of code:
 *       "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU -I"${S}"/common/usr/include fgl_glxgears.c -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed";
 *  The die message:
 *   fgl_glxgears build failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.522/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.522/temp/environment'.
 *
                                                              

Expected Results:  
successful compilation

Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r9 i686)
=================================================================
System uname: 2.6.22-gentoo-r9 i686 Intel(R) Pentium(R) M processor 1.73GHz
Timestamp of tree: Mon, 15 Sep 2008 20:07:01 +0000
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.4.4-r14, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-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/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.solnet.ch/mirror/Gentoo http://mirror.switch.ch/mirror/gentoo"
LINGUAS="en cs fr"
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/portage/local/layman/synce /afs/cern.ch/user/b/belohrad/PORTAGE_OVERLAY"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 acl acpi afs alsa apache2 arts bash-completion berkdb cdr cli cracklib crypt css cups dbus debug dri dvd dvdr emacs ffmpeg flac fortran fpu gdbm gpm hal iconv isdnlog java jpeg jpeg2k kde kerberos krb4 latex ldap math midi mmx mmxext mp2 mp3 mp4 mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre perl php png pppd python qt3 qt4 readline reflection session spell spl sse sse2 ssl tcl tcpd tiff truetype unicode v4l2 win32codecs x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en cs fr" USERLAND="GNU" VIDEO_CARDS="fglrx radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-15 22:26:08 UTC
Please post the output of `eselect opengl list'.
Comment 2 dejfson 2008-09-16 22:00:27 UTC
(In reply to comment #1)
> Please post the output of `eselect opengl list'.
> 

Available OpenGL implementations:
  [1]   xorg-x11 *

----------
Small comment: I have noticed, that in fact it is not failure of compilation of
fglrx driver, however it is glxgears which fails to compile because it cannot find libGL. If you remove the two commands responsible for compilation of glxgears from the ebuild, compilation is done correctly. But maybe it is just because I miss some packages(?)

d.
Comment 3 Erik Dobak 2008-10-02 17:11:57 UTC
have the same issue. there is a wrong link /usr/lib64/libGL.so in my system.
revdep-rebuild did not help.

i will maybe do something to this link and lets see what will happen.
Comment 4 dejfson 2008-10-02 20:37:59 UTC
I've found somehow where the problem is. When you have installed a driver, say ati-drivers and you unmerge it, it is unmerged, however the links to the opengl headers and libraries are not destroyed. thus dead links appear. then when you use eselect to set new opengl interface (xorg-x11 e.g.), it fails because it is unable to delete/rewrite these links. you have to delete them manually, then use eselect opengl to select the opengl installed and then it starts to work. so either the problem is in umerging of the packages that the links are not correctly switched/enabled, or the problem could be in eselect opengl as it is unable to recreate dead links
Comment 5 Erik Dobak 2008-10-03 12:13:34 UTC
(In reply to comment #4)
yes same at my system.

just for info:

ad my first comment: fixpackages did not help



i have found these broken links

# ls -al /usr/lib64/libGL.so
lrwxrwxrwx 1 root root 35 2008-09-15 22:19 /usr/lib64/libGL.so -> //usr/lib64/opengl/ati/lib/libGL.so

# ls -al /usr/lib32/libGL.so
lrwxrwxrwx 1 root root 35 2008-09-15 22:19 /usr/lib32/libGL.so -> //usr/lib32/opengl/ati/lib/libGL.so

 # ls -al /usr/lib64/xorg/modules/extensions/libglx.so
lrwxrwxrwx 1 root root 43 2008-09-15 22:19 /usr/lib64/xorg/modules/extensions/libglx.so -> //usr/lib64/opengl/ati/extensions/libglx.so

after:

# rm /usr/lib64/libGL.so
# rm /usr/lib32/libGL.so
# rm /usr/lib64/xorg/modules/extensions/libglx.so

i was able to run:
# eselect opengl set xorg-x11



after running emerge on the ati drivers i still got:


 * Detected file collision(s):
 *
 *      /lib/modules/2.6.25-gentoo-r7/video/fglrx.ko
 *
 * Searching all installed packages for file collisions...
 *
 * Press Ctrl-C to Stop
 *
 * None of the installed packages claim the file(s).


so i did

# rm /lib/modules/2.6.25-gentoo-r7/video/fglrx.ko

then:

# emerge ati-drivers


works fine now. i dont know if this can be called a clean fix but the cause of this was i guess also not a clean thing so its fine for me..

Comment 6 Erik Dobak 2008-10-03 12:32:32 UTC
this bug is related to 238686
Comment 7 Łukasz Damentko (RETIRED) gentoo-dev 2008-10-30 17:04:03 UTC
Reassigning to herd since eradicator has left Gentoo.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-21 01:49:21 UTC
*** Bug 247794 has been marked as a duplicate of this bug. ***
Comment 9 Foxx Ladysgarden 2008-11-22 02:32:44 UTC
(In reply to comment #5)

i did some of the cleaning you mentioned, chose the xorg-x11 opengl variant but still could get ati-drivers to emerge ...

what did the trick was to re-install mesa and - probably more important - install mesa-progs (glxgears and glxinfo) which was not installed previously.

after that, the emerge of ati-drivers went like a charm  ^^



Comment 10 Matthew Barrett 2009-01-18 22:57:03 UTC
*** Bug 254580 has been marked as a duplicate of this bug. ***
Comment 11 Erik Dobak 2009-01-24 14:49:27 UTC
now with:

mesa-7.2
xorg-server-1.5.3-r1
ati-drivers-8.561
eselect-1.0.11-r1
eselect-opengl-10.6-r1
and the current kernel

the reemerge seems to work, although i had to do the manual cleanup first.
Comment 12 Tomáš Chvátal (RETIRED) gentoo-dev 2009-07-06 11:04:52 UTC
fixed with eselect-opengl-1.0.7.
Please test and reopen if it is still borked.