Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300887 - linkage failures as ld fails to find libGL.so.1 and libGLcore.so.1
Summary: linkage failures as ld fails to find libGL.so.1 and libGLcore.so.1
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-13 20:13 UTC by Dror Levin (RETIRED)
Modified: 2010-01-14 16:13 UTC (History)
2 users (show)

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


Attachments
output of ldconfig -v as root (ldconfig.log,45.26 KB, text/plain)
2010-01-13 20:13 UTC, Dror Levin (RETIRED)
Details
build log for media-sound/amarok-2.2.2 (build.log,44.95 KB, text/plain)
2010-01-13 20:14 UTC, Dror Levin (RETIRED)
Details
build log for media-sound/amarok-2.2.2 with CMAKE_VERBOSE=1 (build.log.bz2,18.71 KB, application/octet-stream)
2010-01-13 23:35 UTC, Dror Levin (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dror Levin (RETIRED) gentoo-dev 2010-01-13 20:13:19 UTC
Compiling packages that use opengl (e.g. wine, amarok, koffice-libs) fails with undefined symbols and warnings from ld saying it can't find libGL.so.1 and libGLcore.so.1.
I've eselected both opengl implementations several times, ran lafilefixer, reemerged mesa, nvidia-drivers, xorg-server and some others just for the heck of it and nothing helps.
Manually creating /usr/lib64/libGL{,core}.so.1 as symlink to .so filess solves the issue.

# emerge --info
Portage 2.2_rc61 (default/linux/amd64/10.0, gcc-4.4.2, glibc-2.11-r1, 2.6.33-rc3 x86_64)
=================================================================
System uname: Linux-2.6.33-rc3-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8300_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Unknown
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4, 3.1.1-r1
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.0
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe -floop-block -floop-interchange -floop-strip-mine"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O3 -pipe -floop-block -floop-interchange -floop-strip-mine"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --keep-going --jobs=3"
FEATURES="assume-digests distlocks fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="http://mirror.isoc.org.il/pub/gentoo http://mirrors.kernel.org/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="he_IL.UTF-8"
LDFLAGS="-Wl,-O1,--as-needed,--hash-style=gnu"
LINGUAS="en he"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="lzma"
PORTAGE_CONFIGROOT="/"
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="/home/spatz/dev/gentoo-x86"
PORTDIR_OVERLAY="/home/spatz/dev/zing /home/spatz/dev/qting-edge /home/spatz/dev/kde-testing /usr/local/portage/layman/mozilla"
SYNC="rsync://dagobah/gentoo-portage"
USE="X a52 aac acl acpi adns alsa amd64 ares bash-completion berkdb bidi bzip2 cairo caps cdr cli cracklib crypt cscope cups curl custom-optimization cxx dbus dell dga dirac djvu dri dts dvd enca encode exif expat faac faad ffmpeg fftw firefox flac fontconfig fortran gdbm gif git glib gmp gpg gpm graphviz gstreamer gtk hal iconv icu idn ipv6 jpeg jpeg2k kde kipi lame latex lcms libsamplerate lqr lyx lzma lzo mad matroska mercurial mjpeg mmx modules mp3 mp4 mpeg msn mudflap multilib ncurses network nls nptl nptlonly nsplugin ntp ogg opengl openmp pam pch pcre pdf plasma png pppd python qt3support qt4 quicktime raw readline reflection ruby sasl schroedinger sdl session smp sndfile speex spell spl sqlite sqlite3 sse sse2 ssl ssse3 subversion svg symlink sysfs taglib tcpd theora threads tiff tk truetype unicode usb v4l2 vdpau vim-syntax vorbis webdav webkit wicd x264 xcb xcomposite xine xinerama xmp xorg xv xvid xvmc zlib" ALSA_CARDS="hda-intel" 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" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en he" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa nv nvidia" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Contents of /etc/ld.so.conf:
# ld.so.conf autogenerated by eselect
# Make all changes to /etc/env.d files
/usr/local/lib
//usr/lib32/opengl/xorg-x11/lib
//usr/lib64/opengl/xorg-x11/lib
/lib
/usr/lib
/lib64
/usr/lib64
/usr/local/lib64
/lib32
/usr/lib32
/usr/local/lib32
/usr/x86_64-pc-linux-gnu/lib
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.2
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.2/32
/usr/lib64/nspr
/usr/lib64/nss
/usr/lib64/xulrunner-1.9.2
/usr/lib64/qca2
/usr/lib/qt4
/usr/lib64/qt4
/usr/lib32/qt4
/usr/games/lib
/usr/games/lib64
/usr/games/lib32

# eselect opengl list
Available OpenGL implementations:
  [1]   nvidia
  [2]   xorg-x11 *
# eselect opengl show
xorg-x11

BTW, fails exactly the same with nvidia chosen.

If any other info is needed just ask :)
Comment 1 Dror Levin (RETIRED) gentoo-dev 2010-01-13 20:13:43 UTC
Created attachment 216402 [details]
output of ldconfig -v as root
Comment 2 Dror Levin (RETIRED) gentoo-dev 2010-01-13 20:14:07 UTC
Created attachment 216404 [details]
build log for media-sound/amarok-2.2.2
Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2010-01-13 22:05:45 UTC
Adding base because i aint sure why LD does not look for libGL.so.1 when it has it in ld.so.conf.
Comment 4 SpanKY gentoo-dev 2010-01-13 23:22:54 UTC
base-system doesnt deal with the toolchain, and ld.so.conf doesnt list libraries

the log output doesnt include the actual linker command used
Comment 5 Dror Levin (RETIRED) gentoo-dev 2010-01-13 23:35:39 UTC
Created attachment 216434 [details]
build log for media-sound/amarok-2.2.2 with CMAKE_VERBOSE=1

Sorry for not attaching full log. Compressed since it was almost 2MB.
Comment 6 SpanKY gentoo-dev 2010-01-14 02:32:33 UTC
you have binutils-2.20 and you're using --as-needed.  you really need to emphasize these things when reporting "weird" bugs.

you have the link command, so run it again by hand without your flags:

/usr/bin/x86_64-pc-linux-gnu-g++   -march=native -O3 -pipe -floop-block -floop-interchange -floop-strip-mine  -fmessage-length=0 -Wl,--as-needed -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden  -Wl,--enable-new-dtags -Wl,-O1,--as-needed,--hash-style=gnu CMakeFiles/amarokpkg.dir/amarokpkg_automoc.o CMakeFiles/amarokpkg.dir/amarokpkg.o  -o amarokpkg -rdynamic -L/usr/lib64/qt4 /usr/lib64/libkdeui.so.5.4.0 /usr/lib64/libplasma.so.3.0.0 /usr/lib64/libkdeui.so.5.4.0 /usr/lib64/libkdecore.so.5.4.0 /usr/lib64/qt4/libQtDBus.so /usr/lib64/qt4/libQtCore.so -lpthread /usr/lib64/qt4/libQtSvg.so /usr/lib64/qt4/libQtGui.so -Wl,-rpath,/usr/lib64/qt4:::::::::::
Comment 7 Dror Levin (RETIRED) gentoo-dev 2010-01-14 12:18:23 UTC
Sorry for not mentioning that, thought that emerge --info is enough.

Running the link command manually works even if I don't remove my flags but paste it as it is. I then changed the amarokpkg file ownership to portage: and continued compiling, each time getting the same link failures with different files and again running the command manually worked. I did this 3 or 4 times and then gave up, but it does seem to be advancing.
Comment 8 Dror Levin (RETIRED) gentoo-dev 2010-01-14 16:13:04 UTC
Crap, this is stupid. I use FEATURES=userpriv so since linking as root works and in emerge (as user portage) it doesn't, I realized it must be some permissions issue.
Some weeks ago I set umask 027 for root, and only lately ld.so.conf was created with 640 permissions. I changed it to 644 and now amarok compiles. Needless to say I don't use umask 027 anymore.

BTW, I was guided by the comment in /etc/profile regarding umask that says "077 would be more secure, but 022 is generally quite realistic". I suppose some warning should be added.

Sorry for wasting everyone's time :(