Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 270071

Summary: x11-libs/libdrm-2.4.11 build fails with undefined reference to `clock_gettime'
Product: Gentoo Linux Reporter: Vasilis Lourdas <bugs>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal CC: c.odenbark, russ
Priority: High    
Version: 2008.0   
Hardware: x86   
OS: Linux   
URL: http://bugs.freedesktop.org/show_bug.cgi?id=21777
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Makefile
build.log
emerge --info
Makefile

Description Vasilis Lourdas 2009-05-16 15:08:17 UTC
make[2]: Leaving directory `/var/tmp/portage/x11-libs/libdrm-2.4.11/work/libdrm-2.4.11/tests/modetest'
make[2]: Entering directory `/var/tmp/portage/x11-libs/libdrm-2.4.11/work/libdrm-2.4.11/tests'
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../libdrm  -I ../shared-core -I ../libdrm   -march=prescott -O2 -pipe -fomit-frame-pointer -MT dristat.o -MD -MP -MF .deps/dristat.Tpo -c -o dristat.o dristat.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../libdrm  -I ../shared-core -I ../libdrm   -march=prescott -O2 -pipe -fomit-frame-pointer -MT drmstat.o -MD -MP -MF .deps/drmstat.Tpo -c -o drmstat.o drmstat.c
mv -f .deps/drmstat.Tpo .deps/drmstat.Po
/bin/sh ../libtool --tag=CC   --mode=link i686-pc-linux-gnu-gcc  -march=prescott -O2 -pipe -fomit-frame-pointer  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o drmstat drmstat.o ../libdrm/libdrm.la  
libtool: link: i686-pc-linux-gnu-gcc -march=prescott -O2 -pipe -fomit-frame-pointer -Wl,-O1 -Wl,--hash-style=gnu -o .libs/drmstat drmstat.o  -Wl,--as-needed ../libdrm/.libs/libdrm.so
mv -f .deps/dristat.Tpo .deps/dristat.Po
/bin/sh ../libtool --tag=CC   --mode=link i686-pc-linux-gnu-gcc  -march=prescott -O2 -pipe -fomit-frame-pointer  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o dristat dristat.o ../libdrm/libdrm.la  
libtool: link: i686-pc-linux-gnu-gcc -march=prescott -O2 -pipe -fomit-frame-pointer -Wl,-O1 -Wl,--hash-style=gnu -o .libs/dristat dristat.o  -Wl,--as-needed ../libdrm/.libs/libdrm.so
dristat.o: In function `drmWaitVBlank':
dristat.c:(.text+0x1769): undefined reference to `clock_gettime'
dristat.c:(.text+0x17bf): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make[2]: *** [dristat] Error 1
make[2]: Leaving directory `/var/tmp/portage/x11-libs/libdrm-2.4.11/work/libdrm-2.4.11/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-libs/libdrm-2.4.11/work/libdrm-2.4.11/tests'
make: *** [all-recursive] Error 1
 * 
 * ERROR: x11-libs/libdrm-2.4.11 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3048:  Called x-modular_src_compile
 *             environment, line 3828:  Called x-modular_src_make
 *             environment, line 3867:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed"
 *  The die message:
 *   emake 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-libs/libdrm-2.4.11/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/libdrm-2.4.11/temp/environment'.


emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.29-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.29-gentoo-r3-i686-Genuine_Intel-R-_CPU_T2300_@_1.66GHz-with-glibc2.0
Timestamp of tree: Sat, 16 May 2009 14:30:16 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
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 /var/lib/hsqldb"
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/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://helios/~lourdas/ http://files.gentoo.gr http://mirror.leaseweb.com/gentoo/ http://mirror.jamit.de/gentoo/ http://gentoo.mneisen.org/ http://ftp.ntua.gr/pub/linux/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirror.cambrium.nl/pub/os/linux/gentoo/ http://ftp.cc.uoc.gr/mirrors/linux/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://de-mirror.org/distro/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/devnull /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa apache2 artswrappersuid asf bash-completion berkdb bluetooth branding bzip2 bzlib cairo caps cdr charconv chm cli cracklib crypt css ctype cups curl dba dbus device-mapper dmi dri dts dvd dvdr dvdread effects emboss encode esd evo exif expat fam fat fbcon ffmpeg firefox firefox3 flac flatfile foomaticdb fortran ftp gcj gd gdbm gif gimp gimpprint glx gmp gnomedb gnutls gocr gphoto2 gpm gstreamer gtk hal hddtemp howl iconv imagemagick imap imlib innodb isdnlog jabber java javascript jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility lcms ldap libnotify libsamplerate libwww lm_sensors mad madwifi maildir mailwrapper mhash midi mikmod mime mmx mmxext motif mozbranding mozdevelop mozilla mozsvg mp3 mpeg mplayer mpm-worker msn mudflap multiuser mysql mysqli ncurses nls no-old-linux nodrm nomalloccheck nptl nptlonly nsplugin ntfs objc odbc offensive ogg opengl openmp pam pcmcia pcntl pcre pdf pear perl php pic plugin pmu png posix ppds pppd python qt3 qt3support qt4 quicktime rar raw rdesktop readline recode reflection reiserfs ruby sasl scanner sdl server session sharedext simplexml slang smp sndfile soap sockets speex spell spl spreadsheet sqlite srt sse sse2 ssl startup-notification subtitles subversion svg svga symlink sysfs syslog tcltk tcpd tetex threads tidy tiff tokenizer tordns truetype ubuntu unicode usb userlocales utf8 vda vnc vncviewer vorbis win32codecs wmf wv wxgtk1 x86 xcomposite xfs xine xml xmlreader xmlrpc xmlwriter xorg xpm xprint xscreensaver xsl xulrunner xv xvid xvmc xvnc zip 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" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rémi Cardona (RETIRED) gentoo-dev 2009-05-17 09:15:35 UTC
Please try rebuilding libdrm without ccache.

Thanks
Comment 2 Vasilis Lourdas 2009-05-17 11:01:04 UTC
(In reply to comment #1)
> Please try rebuilding libdrm without ccache.
> 
> Thanks

Nope. It does not work.

emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.29-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.29-gentoo-r3-i686-Genuine_Intel-R-_CPU_T2300_@_1.66GHz-with-glibc2.0
Timestamp of tree: Sun, 17 May 2009 10:30:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
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 /var/lib/hsqldb"
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/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://helios/~lourdas/ http://files.gentoo.gr http://mirror.leaseweb.com/gentoo/ http://mirror.jamit.de/gentoo/ http://gentoo.mneisen.org/ http://ftp.ntua.gr/pub/linux/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirror.cambrium.nl/pub/os/linux/gentoo/ http://ftp.cc.uoc.gr/mirrors/linux/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://de-mirror.org/distro/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/devnull /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa apache2 artswrappersuid asf bash-completion berkdb bluetooth branding bzip2 bzlib cairo caps cdr charconv chm cli cracklib crypt css ctype cups curl dba dbus device-mapper dmi dri dts dvd dvdr dvdread effects emboss encode esd evo exif expat fam fat fbcon ffmpeg firefox firefox3 flac flatfile foomaticdb fortran ftp gcj gd gdbm gif gimp gimpprint glx gmp gnomedb gnutls gocr gphoto2 gpm gstreamer gtk hal hddtemp howl iconv imagemagick imap imlib innodb isdnlog jabber java javascript jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility lcms ldap libnotify libsamplerate libwww lm_sensors mad madwifi maildir mailwrapper mhash midi mikmod mime mmx mmxext motif mozbranding mozdevelop mozilla mozsvg mp3 mpeg mplayer mpm-worker msn mudflap multiuser mysql mysqli ncurses nls no-old-linux nodrm nomalloccheck nptl nptlonly nsplugin ntfs objc odbc offensive ogg opengl openmp pam pcmcia pcntl pcre pdf pear perl php pic plugin pmu png posix ppds pppd python qt3 qt3support qt4 quicktime rar raw rdesktop readline recode reflection reiserfs ruby sasl scanner sdl server session sharedext simplexml slang smp sndfile soap sockets speex spell spl spreadsheet sqlite srt sse sse2 ssl startup-notification subtitles subversion svg svga symlink sysfs syslog tcltk tcpd tetex threads tidy tiff tokenizer tordns truetype ubuntu unicode usb userlocales utf8 vda vnc vncviewer vorbis win32codecs wmf wv wxgtk1 x86 xcomposite xfs xine xml xmlreader xmlrpc xmlwriter xorg xpm xprint xscreensaver xsl xulrunner xv xvid xvmc xvnc zip 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" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Christopher Odenbark 2009-05-17 11:29:55 UTC
I had the same problem as Vasileios, but when I removed --as-needed from the LDFLAGS  x11-libs/libdrm-2.4.11 compiled. Hope this helps.

Working emerge --info:
^^^^^^^^^^^^^^^^^^^^^^
Portage 2.1.6.11 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r4-x86_64-Dual_Core_AMD_Opteron-tm-_Processor_185-with-glibc2.2.5
Timestamp of tree: Sun, 17 May 2009 10:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-fomit-frame-pointer -combine -march=native -Os -Wno-error -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/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-fomit-frame-pointer -combine -march=native -Os -Wno-error -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.mdfnet.se/mirror/gentoo ftp://mirror.mdfnet.se/gentoo http://ftp.ing.umu.se/linux/gentoo/ ftp://ftp.ing.umu.se/linux/gentoo/http://mirror.gentoo.no/"
LDFLAGS="-Wl,-O1"
LINGUAS="sv en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X aac alsa amd64 berkdb bzip2 cli cracklib crypt cups custom-cpuopts custom-optimization dri dvdr flac gdbm gif glibc-omitfp gold gpm iconv isdnlog jpeg kde kdehiddenvisibility ldap libsamplerate mad mmx mmxext moznopango mp3 mtp mudflap multilib ncurses nls nptl nptlonly ogg openal opengl openmp pam pcre pdf perl png pppd python qt3 qt4 readline reflection ruby session spl sse sse2 ssl subversion sysfs tcpd threads truetype unicode usb vorbis x264 xorg xulrunner xvid xvmc zlib" ALSA_CARDS="ca0106" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="sv en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Vasilis Lourdas 2009-05-17 11:31:30 UTC
(In reply to comment #3)
> I had the same problem as Vasileios, but when I removed --as-needed from the
> LDFLAGS  x11-libs/libdrm-2.4.11 compiled. Hope this helps.

OK, I'll try that later and report back.
Comment 5 Rémi Cardona (RETIRED) gentoo-dev 2009-05-17 15:27:25 UTC
Please attach the full build.log as portage _strongly_ suggests.

Thanks
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2009-05-18 08:40:09 UTC
Please also attach /var/tmp/portage/x11-libs/libdrm-2.4.11/work/libdrm-2.4.11/libdrm/Makefile as well.

Thanks
Comment 7 Pavel Procopiuc 2009-05-18 14:52:56 UTC
Same here, attaching files as requested.
Comment 8 Pavel Procopiuc 2009-05-18 14:54:28 UTC
Created attachment 191676 [details]
Makefile
Comment 9 Pavel Procopiuc 2009-05-18 14:54:48 UTC
Created attachment 191679 [details]
build.log
Comment 10 Pavel Procopiuc 2009-05-18 14:55:51 UTC
Created attachment 191681 [details]
emerge --info
Comment 11 Pavel Procopiuc 2009-05-18 14:58:32 UTC
Created attachment 191683 [details]
Makefile

Wrong Makefile
Comment 12 Rémi Cardona (RETIRED) gentoo-dev 2009-05-18 15:45:23 UTC
could you try rebuilding with just LDFLAGS="-Wl,--as-needed" ?

Thanks
Comment 13 Enrico Tagliavini 2009-05-19 13:28:29 UTC
Same issue here, but libdrm-9999 from x11 overlay build correctly and it's the exact same code (at least for now)


Portage 2.2_rc33 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.28-gentoo-r5 x86_64)     
=================================================================                                             
System uname: Linux-2.6.28-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8400_@_2.26GHz-with-glibc2.2.5        
Timestamp of tree: Tue, 19 May 2009 11:15:01 +0000                                                            
app-shells/bash:     3.2_p39                                                                                  
dev-java/java-config: 2.1.7                                                                                   
dev-lang/python:     2.5.4-r2                                                                                 
dev-util/cmake:      2.6.2-r1                                                                                 
sys-apps/baselayout: 1.12.11.1                                                                                
sys-apps/sandbox:    1.6-r2                                                                                   
sys-devel/autoconf:  2.13, 2.63                                                                               
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                                
sys-devel/binutils:  2.18-r3                                                                                  
sys-devel/gcc-config: 1.4.1                                                                                   
sys-devel/libtool:   1.5.26                                                                                   
virtual/os-headers:  2.6.27-r2                                                                                
ACCEPT_KEYWORDS="amd64"                                                                                       
CBUILD="x86_64-pc-linux-gnu"                                                                                  
CFLAGS="-march=core2 -O2 -pipe -msse4.1"                                                                      
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/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"                                      
CXXFLAGS="-march=core2 -O2 -pipe -msse4.1"                                                                                                                   
DISTDIR="/usr/portage/distfiles"                                                                                                                             
FEATURES="buildpkg distlocks fixpackages parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"                                      
GENTOO_MIRRORS=" ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo  ftp://ftp.unina.it/pub/linux/distributions/gentoo "                
LANG="it_IT.UTF-8"                                                                                                                                           
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--enable-new-dtags"                                                                                
LINGUAS="it"                                                                                                                                                 
MAKEOPTS="-j3"                                                                                                                                               
PKGDIR="/usr/portage/packages"
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="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/science /usr/portage/local/layman/sunrise /usr/portage/local/layman/gechi /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 arts avahi bash-completion berkdb bluetooth branding bzip2 cdr cli cracklib crypt cups custom-optimization dbus dri dvd dvdr dvdread ffmpeg firefox fortran gdbm gif glib gnutls gpm hal iconv inotify ipv6 isdnlog java jpeg kde mad midi mmx mp3 mpeg mudflap multilib ncurses networkmanager nls nptl nptlonly nsplugin ogg opengl openmp pam pch pcre perl pic png pppd pvr python qt3 qt4 readline reflection samba sdl session smp speex spl sse sse2 sse4.1 sse4_1 ssl ssse3 startup-notification sysfs tcpd theora threads truetype unicode usb v4l v4l2 vorbis xcb xcomposite xine xinerama xorg xulrunner xv xvmc zeroconf 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="fglrx radeon radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 14 Rémi Cardona (RETIRED) gentoo-dev 2009-05-19 13:56:42 UTC
Here's some more info, libdrm 2.4.11 was distchecked on debian and has a broken/patched libtool script, which apparently breaks convenience libs.

I think we'll need to keep SNAPSHOT=yes on libdrm...

Cheers
Comment 15 Rémi Cardona (RETIRED) gentoo-dev 2009-05-19 14:33:29 UTC
Ok so here's the final deal on what happens :
 - libdrm/Makefile.am has "libdrm_la_LIBADD = @CLOCK_LIB@"
 - @CLOCK_LIB@ is set to "-lrt" by configure
 - tests/Makefile.am has "LDADD = $(top_builddir)/libdrm/libdrm.la"
 - so "drmstat" and "dristat" do link to the above libdrm.la
 - the libtool script is responsible for reading libdrm.la and outputting "-lrt"
 - unfortunately, the Debian-generated libtool script explicitly disables that feature, so -lrt doesn't get added

Now for some reason, that doesn't break on ~arch systems... No idea why... So for now, I've added SNAPSHOT=yes at the top of libdrm.

Closing fixed.

Thanks
Comment 16 Rémi Cardona (RETIRED) gentoo-dev 2009-05-19 16:12:07 UTC
Upstream already knew about this bug...