Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 265549 - x11-libs/libdrm-2.4.6 fails to compile: undefined reference to `drmError' in drmstat.c
Summary: x11-libs/libdrm-2.4.6 fails to compile: undefined reference to `drmError' in ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2009-04-09 12:49 UTC by Hugo Mildenberger
Modified: 2009-04-10 09:03 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 Hugo Mildenberger 2009-04-09 12:49:45 UTC
Emerging libdrm-2.4.6 fails due to a bunch of undefined references.  

Reproducible: Always

Steps to Reproduce:
1.emerge x11-libs/libdrm-2.4.6
Actual Results:  
/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -I ../shared-core -I ../libdrm -O2 -pipe -march=core2   -o drmstat drmstat.o
libtool: link: x86_64-pc-linux-gnu-gcc -I ../shared-core -I ../libdrm -O2 -pipe -march=core2 -o drmstat drmstat.o
drmstat.o: In function `process_sigio':
drmstat.c:(.text+0x6d): undefined reference to `drmError'
drmstat.o: In function `main':
drmstat.c:(.text+0x157): undefined reference to `drmGetVersion'
drmstat.c:(.text+0x1db): undefined reference to `drmFreeVersion'
drmstat.c:(.text+0x221): undefined reference to `drmAddMap'
drmstat.c:(.text+0x29d): undefined reference to `drmOpen'
drmstat.c:(.text+0x2c6): undefined reference to `drmError'
drmstat.c:(.text+0x317): undefined reference to `drmAddMap'
drmstat.c:(.text+0x399): undefined reference to `drmSetBusid'
drmstat.c:(.text+0x3bc): undefined reference to `drmError'
drmstat.c:(.text+0x403): undefined reference to `drmAddBufs'
drmstat.c:(.text+0x416): undefined reference to `drmGetBufInfo'
drmstat.c:(.text+0x475): undefined reference to `drmMarkBufs'
drmstat.c:(.text+0x48b): undefined reference to `drmGetBufInfo'
drmstat.c:(.text+0x524): undefined reference to `drmMapBufs'
drmstat.c:(.text+0x5a3): undefined reference to `drmCreateContext'
drmstat.c:(.text+0x612): undefined reference to `drmMap'
drmstat.c:(.text+0x82d): undefined reference to `drmAddMap'
drmstat.c:(.text+0x893): undefined reference to `drmMap'
drmstat.c:(.text+0x96d): undefined reference to `drmOpen'
drmstat.c:(.text+0x992): undefined reference to `drmError'
drmstat.c:(.text+0xa0e): undefined reference to `drmMap'
drmstat.c:(.text+0xd04): undefined reference to `drmSwitchToContext'
drmstat.c:(.text+0xd27): undefined reference to `drmError'
drmstat.c:(.text+0xddc): undefined reference to `drmDMA'
drmstat.c:(.text+0xe49): undefined reference to `drmFreeBufs'
drmstat.c:(.text+0xe62): undefined reference to `drmUnlock'
drmstat.c:(.text+0xe7c): undefined reference to `drmGetLock'
drmstat.c:(.text+0xfdb): undefined reference to `drmError'
drmstat.c:(.text+0xff7): undefined reference to `drmError'


uname -a: Linux localhost 2.6.28-hardened-r7 #11 SMP Thu Apr 9 12:55:17 CEST 2009 x86_64 Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz GenuineIntel GNU/Linu

gcc version 4.3.2 (Gentoo 4.3.2-r2 p1.5, pie-10.1.5)
Comment 1 R Bar-On 2009-04-09 13:40:45 UTC
same here
Comment 2 Karl H 2009-04-09 13:48:08 UTC
Same for me. 

 emerge --info                     
Portage 2.2_rc28 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.8_p20080602-r1, 2.6.28.4 i686)
=================================================================                            
System uname: Linux-2.6.28.4-i686-Intel-R-_Core-TM-2_CPU_T5500_@_1.66GHz-with-glibc2.0       
Timestamp of tree: Thu, 09 Apr 2009 10:30:01 +0000                                           
app-shells/bash:     3.2_p39                                                                 
dev-java/java-config: 1.3.7-r1, 2.1.7                                                        
dev-lang/python:     2.4.4-r13, 2.5.2-r7                                                     
dev-python/pycrypto: 2.0.1-r6                                                                
dev-util/cmake:      2.6.3                                                                   
sys-apps/baselayout: 1.12.11.1                                                               
sys-apps/sandbox:    1.3.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.0-r4                                                               
sys-devel/libtool:   1.5.26                                                                  
virtual/os-headers:  2.6.27-r2                                                               
ACCEPT_KEYWORDS="x86"                                                                        
CBUILD="i686-pc-linux-gnu"                                                                   
CFLAGS="-O2 -march=core2 -pipe -g"                                                           
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/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/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/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="-O2 -march=core2 -pipe -g"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.pair.com/ htp://ftp.ntua.gr/pub/linux/gentoo/"
LC_ALL="en_US"
LDFLAGS="-Wl,-O1"
LINGUAS="en es en_GB es_ES"
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 /usr/local/portage/kh_gentoo_embedded /usr/local/portage/karl_packages"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X X509 a52 aac acl acpi addbookmarks alias alsa amr amrr ao apache2 aspnet aspnet2 aspnetedit async atm audiofile autoreplace avahi bash-completion berkdb bluetooth bzip2 cairo cdaudio cdb cdda cddb cdparanoia cgi cli connectionstatus contactnotes cpudetection cracklib crypt css ctype cups daap dbus debug dell dhcp dri dts dvdvb dvd dvdr dvdread encode epydoc exif extensions fame ffmpeg firefox flac flash foomaticdb fortran fuse gd gdbm gif gimp gimpprint glade glib glitz gnuplot gnutls gphoto2 gpm graphviz groupwise gstreamer gtk hal highlight history howl iconv ieee1394 ifp image imagemagick imap imlib imq injection inotify intl ipod ipsec iptv ipv6 irc isdnlog java javascript jingle jpeg jpeg2k kcal kde kdeenablefinal kdeprefix kpathsea kqemu ladspa lcms ldap libsamplerate live lua lzo mad madwifi matroska mdb mdnsresponder-compat meanwhile midi mjpeg mmap mmx mng mod modplug mono mozbranding mozdevelop mp3 mp4 mp4live mpeg mpeg2 mplayer mschap msn mtp mudflap musepack music musicbrainz mysql nagios-dns nagios-ping nagios-ssh ncurses neXt netmeeting network nls nowlistening nptl nptlonly nsplugin nvidia oav office ogg openexr opengl openmp p2p pam patented pcap pcapnav pch pcmcia pcre pdf perl php plotutils plugin plugins png postscript povray pppd prediction pregen python qq qt3 quicktime rar rdesktop readline realmedia reflection rtsp ruby samba sametime sasl sdl sensord serial session sftp shout slp smp sms smtp sndfile snmp spamassassin spell spl sqlite sqlite3 sse sse2 ssl startup-notification statistics stream subtitles subversion svg swat sysfs syslog tcl tcpd tetex texteffect theora threads tiff tk transcode translator truetype type1 uclibc-compat unicode upnp usb utempter v4l v4l2 vcd visualization vnc vncviewer vorbis vorbis-psy webkit webpresence wifi win32codecs winpopup wireshark wma wmf wxwindows x264 x86 xanim xcb xcomposite xforms xine xinerama xml xorg xosd xprint xrandr xrender xscreensaver xulrunner xv xvid xvmc yahoo zip 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" CAMERAS="*" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en es en_GB es_ES" USERLAND="GNU" VIDEO_CARDS="nv nvidia vga vmware"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 3 Michael Niggli 2009-04-09 14:19:27 UTC
Same here

It compiles/merges fine with the (discarded) makefile-patch from #265436 though.
Comment 4 Karl H 2009-04-09 14:36:28 UTC
This appears to be related to bug #236845  the tests directory is not specifying the correct linking flags -L$(top_srcdir)/libdrm -ldrm
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2009-04-09 14:42:36 UTC
Same issue here, interestingly building with -j2 will lead to the same error as in comment 0 and building with -j1 will result in the following:

/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -I ../shared-core -I ../libdrm -O2 -pipe -march=core2   -Wl,-O1 -o dristat dristat.o
libtool: link: x86_64-pc-linux-gnu-gcc -I ../shared-core -I ../libdrm -O2 -pipe -march=core2 -Wl,-O1 -o dristat dristat.o
dristat.o: In function `drmWaitVBlank':
dristat.c:(.text+0x189e): undefined reference to `clock_gettime'
dristat.c:(.text+0x1906): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status

Adding the patch from attachment 187678 [details, diff] without eautoreconf run will produce a warning about maintainer mode but otherwise complete successfully.
Comment 6 Karl H 2009-04-09 14:49:48 UTC
(In reply to comment #3)

verified that the makefile patch from bug #265436 works.

I did not use the ebuild patch from bug #265436.  To the ebuild I just added:
PATCHES=( "${FILESDIR}/${P}-makefile.patch" )

Apparently the RESTRICT="test" is not working. 
Comment 7 Tomáš Chvátal (RETIRED) gentoo-dev 2009-04-09 17:15:09 UTC
Althrought i cant replicate the bug it is reported by too much users to be some local error so adding the patch and fixing the ebuild.
Comment 8 Hugo Mildenberger 2009-04-10 09:03:43 UTC
(In reply to comment #7)
libdrm-2.4.6 now compiles fine. However, was it your intention not to change the version of the ebuild?