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

Bug 41962

Summary: XFree fails on startup with unresolved gnu_dev_makedev from glibc
Product: Gentoo Linux Reporter: Ryan Breen <ryan>
Component: [OLD] Core systemAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: critical CC: ajax, desrt, kllba
Priority: High Keywords: Inclusion
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: XFree86.0.log showing error
patch of goodness

Description Ryan Breen 2004-02-17 15:32:28 UTC
After upgrading glibc and XFree, I consistently get failures on XServer startup with an unresolved gnu_dev_makedev synbol.  I have tried a number of different ebuilds in an attempt to fix this -- currently I am at glibc-2.3.2-r9 and xfree-4.3.0-r5.  I have tried backing down to glibc-2.3.2-r3 or switching to xfree-4.3.99 or xfree-4.3.0-r4, but the behavior doesn't change.

Thread http://forums.gentoo.org/viewtopic.php?t=92703 on forums.gentoo.org points to bug 29918 and bug 29919, both of which were resolved months ago.  I'm still seeing this behavior on recent emerges.

Reproducible: Always
Steps to Reproduce:
1. emerge glibc
2. emerge xfree
3. startx
YMMV

Actual Results:  
startx crashed with the line:
Symbol gnu_dev_makedev from module /usr/X11R6/lib/modules/linux/libdrm.a is
unresolved!

Expected Results:  
Completed initialization without error and started the XServer.

CPU is P4
Kernel is stock 2.6.1
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -pipe -fomit-frame-pointer"
USE="kde -gnome -pdflib arts cups X avi dvd mysql imap java jpeg maildir mozilla
png qtmt qt sdl spell ssl snmp xmms xv"
gcc -v:
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs
Configured with: /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3
--includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared
--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib
--enable-languages=c,c++,f77,objc,java --enable-threads=posix --enable-long-long
--disable-checking --enable-cstdio=stdio --enable-clocale=generic
--enable-__cxa_atexit --enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include/g++-v3
--with-local-prefix=/usr/local --enable-shared --enable-nls
--without-included-gettext --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib --enable-interpreter --enable-java-awt=xlib
--with-x --disable-multilib
Thread model: posix
gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)
Comment 1 Ryan Breen 2004-02-17 15:34:17 UTC
Created attachment 25805 [details]
XFree86.0.log showing error
Comment 2 Ryan Breen 2004-02-18 07:35:29 UTC
As further data points, I tried an emerge -e world and an update to the new stock 2.6.3 kernel (on the hope that it was really my i830.o that was triggering the problem).  Behavior has not changed.
Comment 3 Ryan Breen 2004-02-18 11:34:02 UTC
I was able to fix this by changing my CFLAGs and rebuilding everything from gcc through xfree --

New:
CFLAGS="-march=pentium3 -O3 -pipe"
CXXFLAGS="${CFLAGS}"

Old:
CFLAGS="-march=pentium3 -pipe -fomit-frame-pointer"
#CXXFLAGS="${CFLAGS}"

Because I changed my cflags and properly set the cxxflags at the same time, I'm not sure which change fixed things.  I guess it's most likely that there was weirdness because the C++ apps were compiled differently than the C libraries, so chalk this one up to stupid user misconfiguration ;-)
Comment 4 Donnie Berkholz (RETIRED) gentoo-dev 2004-02-18 11:55:31 UTC
Let us know if the problem crops up again.
Comment 5 Gary Pampara 2004-02-18 21:39:49 UTC
I too have this problem

xfree-4.3.0-r3 was fine then all of a sudden with r4 this happened and again with r5.

To solve this I've kept a working libdrm.a (which is where I've located the bug to.

replaceing the compiled libdrm.a with the backed up one starts X.

Why would this be happening?
Comment 6 Josef Grunig 2004-02-20 02:22:17 UTC
I've got the same problem! I emerged latest glibc and xfree-4.3.0-r5 but it returns always the same error:

Symbol gnu_dev_makedev from module /usr/X11R6/lib/modules/linux/libdrm.a is unresolved!


Myflags:
FLAGS="-march=athlon-xp"
CXXFLAGS="${CFLAGS}"

My gcc -v:

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/specs
Configured with: /var/tmp/portage/gcc-3.3.3/work/gcc-3.3.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --enable-interpreter --enable-java-awt=xlib --with-x --disable-multilib
Thread model: posix
gcc version 3.3.3 20040217 (Gentoo Linux 3.3.3, propolice-3.3-7)

I think that the bug still exists, and isn't resolved

Josef Grunig
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2004-02-20 10:50:08 UTC
Which version of linux-headers are you all on?
Comment 8 Ryan Breen 2004-02-20 14:43:57 UTC
linux-headers == 2.4.21
kernel == 2.6.3
Comment 9 Josef Grunig 2004-02-21 06:42:00 UTC
kernel = 2.6.1-r1
linux-headers= 2.4.19-r1
Comment 10 Gary Pampara 2004-02-23 00:46:43 UTC
Mine is the same too:

kernel=2.6.3
headers=2.4.21
Comment 11 James Taylor 2004-03-21 17:46:04 UTC
Fixed by changing CFLAGS and emerging same version of xfree.

failed: CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer"
failed: CFLAGS="-march=athlon -O3 -pipe"
works: CFLAGS="-march=athlon -O3 -fomit-frame-pointer"

/etc/make.conf:
#CXXFLAGS="${CFLAGS}"

xfree-4.3.0-r5
headers == 2.6.4-rc2
kernel == 2.6.4-rc2

Comment 12 Donnie Berkholz (RETIRED) gentoo-dev 2004-03-21 18:00:06 UTC
That's about the weirdest thing I've ever seen. Looks like the -pipe flag broke it, potentially in combination with -O3.
Comment 13 Andrew Bevitt 2004-03-22 01:03:34 UTC
Been digging around and all talk in comments #3 and comment #11 is completely invalid conjecture on this bug. They provide some solution that lies outside of XFree.

IRT #3:
CFLAGS="-march=pentium3 -O3 -pipe" implies that -fomit-frame-pointer is used (see the gcc manual if you dont believe me, unless you're using VAX this is on from -O to -O3). Futher more setting CXXFLAGS will have limited to no effect on the Xfree server as it is all C code. 

IRT #11:
CFLAGS="-pipe" (or including -pipe) does not effect the actual usage of compiled binaries. All -pipe allows is piped gcc communication during the compilation. Provided you use a pipe assembler then this is fine (ie the compile would bork otherwise).

Could everyone that has had this problem or is having this problem please run and post the following.
1) nm /usr/X11R6/lib/modules/linux/libdrm.a |grep makedev
2) grep -R makedev /usr/X11R6/*
Comment 14 James Taylor 2004-03-26 10:08:27 UTC
I've recently noticed my environment for root has changed.  It's likely that one or more of the tests I did (#11) were using CFLAGS="-g3 -Wall"!
I'm currently recompiling xfree to recreate the bug.

(These are from the working xfree setup.  No missing makedev symbol.)

$ nm /usr/X11R6/lib/modules/linux/libdrm.a |grep makedev
# grep -R makedev /usr/X11R6/*

(no results for either)
Comment 15 Andrew Bevitt 2004-03-26 15:05:23 UTC
So how did it go James?
Comment 16 Donnie Berkholz (RETIRED) gentoo-dev 2004-03-26 15:14:36 UTC
Anyone with this problem been using binary drivers? Do they provide an alternate libdrm.a with this symbol?
Comment 17 James Taylor 2004-03-27 02:18:27 UTC
An su to root preserves my development env "CFLAGS=-g3 -Wall". The
emerge with /etc/make.conf CFLAGS is overriden by my environment. (Is
that proper?)  -g3 -Wall seems to cause the unresolved symbol:

# nm /usr/X11R6/lib/modules/linux/libdrm.a |grep makedev
         U gnu_dev_makedev
# grep -R makedev /usr/X11R6/lib/
Binary file /usr/X11R6/lib/modules/dri/radeon_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/tdfx_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/i810_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/r128_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/i830_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/mga_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/r200_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/ffb_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/gamma_dri.so matches
Binary file /usr/X11R6/lib/modules/linux/libdrm.a matches
Binary file /usr/X11R6/lib/libI810XvMC.a matches

Both the "radeon" driver, and "fglrx" have the same error result.

X will start up when I turn fglrx's dri off:
Option "no_dri"                     "yes"

or (with 'radeon' driver), comment out:
Load "dri"

$ ls -al /usr/X11R6/lib/modules/linux
total 110
drwxr-xr-x    2 root     root          168 Mar 27 04:14 .
drwxr-xr-x    9 root     root         1016 Mar 26 16:22 ..
-r--r--r--    1 root     root        44112 Mar 26 16:21 libdrm.a
-r--r--r--    1 root     root        13224 Mar 26 16:21 libfbdevhw.a
-rw-r--r--    1 root     root        11178 Mar 21 18:25 libfglrxdrm.a
-r--r--r--    1 root     root        35040 Mar 26 16:21 libint10.a

$ nm /usr/X11R6/lib/modules/linux/libfglrxdrm.a |grep makedev
$

I moved libfglrxdrm.a to my home dir, and the 'radeon' driver behaved 
the same (unresolved gnu_dev_makedev).

Anything else I should try?
Comment 18 James Taylor 2004-03-27 02:25:27 UTC
one more thing:

$ nm /usr/X11R6/lib/modules/dri/radeon_dri.so |grep makedev
         U gnu_dev_makedev@@GLIBC_2.3.3
Comment 19 Donnie Berkholz (RETIRED) gentoo-dev 2004-03-27 12:29:53 UTC
> An su to root preserves my development env "CFLAGS=-g3 -Wall". The
> emerge with /etc/make.conf CFLAGS is overriden by my environment. (Is
> that proper?)  -g3 -Wall seems to cause the unresolved symbol:

Yes. Environment should override.
Comment 20 Jean DeVour 2004-04-02 07:48:27 UTC
# nm /usr/X11R6/lib/modules/linux/libdrm.a |grep makedev
         U gnu_dev_makedev
# grep -R makedev /usr/X11R6/*
Binary file /usr/X11R6/lib/libI810XvMC.so matches
Binary file /usr/X11R6/lib/modules/dri/sis_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/radeon_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/tdfx_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/i810_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/r128_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/i830_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/mga_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/r200_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/gamma_dri.so matches
Binary file /usr/X11R6/lib/modules/linux/libdrm.a matches
Binary file /usr/X11R6/lib/libI810XvMC.so.1 matches
Binary file /usr/X11R6/lib/libI810XvMC.a matches
Binary file /usr/X11R6/lib/libI810XvMC.so.1.0 matches

If I'm running X with the Via drivers and I disable DRI in XF86Config X starts fine.
If I enable dri it dies with the same error everyone else is getting.
If I start X with the VESA drivers then I can enable DRI although X crashes when I run glxinfo.  
I will check my CFLAGS and try emerging again I guess.
Oh I'm running Xfree 4.4.0 from the Unichrome-r3 ebuild and my kernel is 2.4.25-epia-r1.  
Comment 21 Donnie Berkholz (RETIRED) gentoo-dev 2004-04-05 18:35:04 UTC
Following https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=119984 also.
Comment 22 Kevin Carlson 2004-04-27 19:07:05 UTC
Same here:

Error:
(WW) RADEON(0): Failed to set up write-combining range (0xd0000000,0x2000000)
Symbol gnu_dev_makedev from module /usr/X11R6/lib/modules/linux/libdrm.a is unresolved!

Installed:
[ebuild   R   ] x11-base/xfree-4.3.0-r5  
[ebuild   R   ] sys-libs/glibc-2.3.2-r9  
[ebuild   R   ] sys-kernel/linux-headers-2.4.21-r1  

Requested:
bash-2.05b# nm /usr/X11R6/lib/modules/linux/libdrm.a |grep makedev
         U gnu_dev_makedev
bash-2.05b# grep -R makedev /usr/X11R6/*
Binary file /usr/X11R6/lib/modules/dri/radeon_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/tdfx_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/i810_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/r128_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/i830_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/mga_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/r200_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/ffb_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/gamma_dri.so matches
Binary file /usr/X11R6/lib/modules/linux/libdrm.a matches
grep: /usr/X11R6/lib/modules/extensions/libglx.so: No such file or directory
Binary file /usr/X11R6/lib/libI810XvMC.a matches

/etc/make.conf
VIDEO_CARDS="radeon"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CXXFLAGS="${CFLAGS}"

Comment out from /etc/X11/XF86Config-4    #Load  "dri" and X works, but no DRI obviously.

I'd love a solution.
Comment 23 Kevin Carlson 2004-04-29 19:44:54 UTC
Go figure.  Works now.
Drop out of X
emerge unmerge xfree
emerge unmerge xfree-drm   (if it exists)
emerge xfree

Enable dri in XF86Config-4 ->  Works fine now.
Comment 24 katerina 2004-06-13 14:04:09 UTC
Same unresolved symbol problem as everyone else here, but I'm running xorg.

Potentially relevant packages:
[ebuild   R   ] sys-kernel/development-sources-2.6.6
[ebuild   R   ] sys-kernel/linux-headers-2.4.21-r1
[ebuild   R   ] x11-base/xorg-x11-6.7.0-r1
[ebuild  N    ] x11-base/xfree-drm-4.3.0-r7  +gatos  419 kB

% nm /usr/X11R6/lib/modules/linux/libdrm.a |grep makedev
         U gnu_dev_makedev

%  grep -R makedev /usr/X11R6/*
grep: /usr/X11R6/bin/X: Permission denied
grep: /usr/X11R6/bin/Xorg: Permission denied
grep: /usr/X11R6/bin/xterm: Permission denied
Binary file /usr/X11R6/lib/libI810XvMC.so.1.0 matches
Binary file /usr/X11R6/lib/libI810XvMC.so.1 matches
Binary file /usr/X11R6/lib/libI810XvMC.a matches
Binary file /usr/X11R6/lib/modules/dri/i830_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/tdfx_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/r128_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/radeon_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/i810_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/mga_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/sis_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/r200_dri.so matches
Binary file /usr/X11R6/lib/modules/dri/gamma_dri.so matches
Binary file /usr/X11R6/lib/modules/linux/libdrm.a matches
Binary file /usr/X11R6/lib/libI810XvMC.so matches
grep: /usr/X11R6/man/de/man1/gsdj500.1.gz: No such file or directory
grep: /usr/X11R6/man/de/man1/gsbj.1.gz: No such file or directory
grep: /usr/X11R6/man/de/man1/gslj.1.gz: No such file or directory
grep: /usr/X11R6/man/de/man1/gsdj.1.gz: No such file or directory

It -was- working correctly as recently as yesterday; since then, I have changed my CFLAGS and USE flags.  I have not upgraded any packages in the meanwhile, although I have rebuilt several.

Firstly, I put -ipv6 and recompiled everything that used that USE flag; I believe it was still working at that point.

Later, I changed my CFLAGS from CFLAGS="-O3 -march=athlon-xp -pipe" to
CFLAGS="-ggdb3 -march=athlon-xp -pipe".  I then did an emerge -e pam to rebuild most of the core system [that rebuilt both glibc and xorg-x11; I didn't want to rebuild KDE, etc.]

Finally, I put debug in my USE variables, and recompiled gcc and glibc, then rebooted.  Now, startx doesn't work unless I disable dri.
Even after an emerge -e xorg-x11, this problem persists.

Here is my current setup:
% emerge info
Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.6)
=================================================================
System uname: 2.6.6 i686 AMD Athlon(TM) XP 2500+
Gentoo Base System version 1.4.16
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-ggdb3 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-ggdb3 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache distcc nostrip sandbox userpriv usersandbox"
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/  http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X acl alsa apm arts audiofile avi berkdb bidi canna cdr cjk composite crypt cscope cups debug directfb doc dvd dvdr emacs encode faad flac foomaticdb freewnn gatos gd gdbm gimpprint gphoto2 gpm gtk gtk2 guile imlib java javascript jikes jpeg junit kde libg++ libwww mad mikmod mmx mng mpeg mysql ncurses nls oggvorbis opengl pam pdflib perl pic png ppds python qt quicktime readline ruby scanner sdl slang socks5 softmmu spell sse ssl tcltk tcpd tetex theora tiff truetype usb video_cards_radeon wmf x86 xinerama xml2 xmms xv zlib"
Comment 25 Donnie Berkholz (RETIRED) gentoo-dev 2004-06-13 14:33:04 UTC
Try dropping pie from USE, rebuilding glibc, then rebuilding xorg-x11.
Comment 26 Donnie Berkholz (RETIRED) gentoo-dev 2004-06-13 15:40:51 UTC
Sorry, I did mean pic, not pie.
Comment 27 katerina 2004-06-13 17:08:40 UTC
I rebuilt, with the command:
USE="-pic" emerge --oneshot glibc xorg-x11

Same error as before. :/
Comment 28 katerina 2004-06-13 17:28:07 UTC
Here's an interesting twist....
http://forums.viaarena.com/messageview.cfm?catid=28&threadid=54481

I -can- load dri in the current config, iff I don't load glx.  The problem only occurs if one tries to load -both-.

Btw, I have never used the ati binary drivers.

Comment 29 katerina 2004-06-13 18:22:56 UTC
The missing symbol seems to be a bit of a red herring.  
I made 3 logs, one with dri disabled, one with glx disabled, and one with both enabled; the first two both successfully launch, while the last doesn't.

% grep unres val*
val_bad.log:Symbol gnu_dev_makedev from module /usr/X11R6/lib/modules/linux/libdrm.a is unresolved!
val_bad.log:   *** If unresolved symbols were reported above, they might not
val_nodri.log:Symbol drmGetClient from module /usr/X11R6/lib/modules/drivers/radeon_drv.o is unresolved!
val_noglx.log:Symbol gnu_dev_makedev from module /usr/X11R6/lib/modules/linux/libdrm.a is unresolved!
val_noglx.log:Symbol __glXActiveScreens from module /usr/X11R6/lib/modules/extensions/libdri.a is unresolved!
val_noglx.log:Symbol __glXActiveScreens from module /usr/X11R6/lib/modules/extensions/libdri.a is unresolved!

Here's where gdb from a remote machine ssh'd in gets me.

# gdb X
(gdb) set args :1 -nolisten tcp -br -deferglyphs 16
(gdb) display /i $pc
(gdb) run
Starting program: /usr/X11R6/bin/X :1 -nolisten tcp -br -deferglyphs 16

(the same X11 startup messages as usual, until...)

Program received signal SIGILL, Illegal instruction.
0x0832c97c in ?? ()
1: x/i $pc  0x832c97c:  (bad)

(gdb) bt
#0  0x0832c97c in ?? ()
#1  0x0832c97f in ?? ()
#2  0x000000e2 in ?? ()
#3  0x00000000 in ?? ()
#4  0xbffff498 in ?? ()
#5  0x40180560 in __libc_tsd_MALLOC_data () from /lib/libc.so.6
#6  0x4017fb88 in __elf_set___libc_thread_subfreeres_element___rpc_thread_destroy__ () from /lib/libc.so.6
#7  0x083a6c58 in ?? ()
#8  0x40180560 in __libc_tsd_MALLOC_data () from /lib/libc.so.6
#9  0xbffff498 in ?? ()
#10 0x400d5a0d in free () from /lib/libc.so.6
#11 0x0832ca15 in ?? ()
#12 0x00000000 in ?? ()
#13 0x00000001 in ?? ()
#14 0xbffff4f8 in ?? ()
#15 0x08090aee in xf86LoaderCheckSymbol ()
#16 0x083286e4 in ?? ()
#17 0x082f3f70 in ?? ()
#18 0xbffff7d4 in ?? ()
#19 0xbffff528 in ?? ()
#20 0x0810b62c in Xalloc ()
(... etc ... - despite compiling with -ggdb3 and setting debug in USE, I still haven't gotten /lib/libc.so.6 to have debugging symbols, unfortunately.)

The -real- problem is the signal 4, illegal instruction; unfortunately, I still have no idea exactly why the combination of loading dri and glx triggers it.

Comment 30 Ryan Lortie 2004-07-15 00:02:33 UTC
I have a fixer for this bug.

It is caused by /usr/include/sys/sysmacros.h (which comes as part of glibc, of course)

xf86drm.c uses makedev() from this file expecting it to be a macro.

It is not a macro in glibc 3.3.3, however.  It's defined as an external function gnu_dev_makedev.  This causes a dependancy on this function by the object file.  When the file is loaded into the xserver, gnu_dev_makedev isn't available in the namespace and so it fails.

xf86drm.c defines its own version of makedev() for use in the event that the system headers don't have one.  I fixed the problem by a well-placed '#undef makedev' to let the macro in xf86drm.c take effect.

The attached patch isn't a great solution.  This is something that will need to be fixed upstream in all the X servers (or better yet, in glibc.) It works for now for me, though.  As always, ymmv (but I hope not.)
Comment 31 Ryan Lortie 2004-07-15 00:03:43 UTC
Created attachment 35453 [details, diff]
patch of goodness

Fix for the problem.
Comment 32 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-15 00:50:31 UTC
cyfred, can you please look at this ASAP and suggest a better patch if necessary? I'd like to get a fix for this into -r2 if possible, now that we've got something to work from.
Comment 33 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-15 00:52:58 UTC
BTW, I'd like to get -r2 in the tree in about 24 hours.
Comment 34 J.S. 2004-07-28 20:02:46 UTC
Patch solved my gnu_dev_makedev unresolved symbol issue.
Comment 35 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-28 21:18:06 UTC
cyfred: reping
Comment 36 Adam Jackson 2004-07-28 23:00:16 UTC
gcc's inline keyword is worthless.  i'll bring this up on dri-devel@, should be fixed in the next Xorg release.
Comment 37 Adam Jackson 2004-08-03 19:38:06 UTC
reported upstream as:

https://freedesktop.org/bugzilla/show_bug.cgi?id=979
Comment 38 Adam Jackson 2004-08-11 16:25:46 UTC
fixed in upstream.
Comment 39 Donnie Berkholz (RETIRED) gentoo-dev 2004-08-11 20:33:04 UTC
I'll see if I can toss a patch into 6.7.0 sometime. If not, advice to any users encountering this is to test the next 6.8.0 ebuild that hits the tree. 6.7.99.1 won't do the trick -- looks as if it was before this commit.

Seemant, if you feel like adding this to 6.7.99.1, go ahead.
Comment 40 Seemant Kulleen (RETIRED) gentoo-dev 2004-08-11 21:30:06 UTC
is is just xf86drm.c?
Comment 41 Adam Jackson 2004-08-11 21:32:42 UTC
yep, just xf86drm.c

there'll probably be a 6.7.99.2 at least before we release.
Comment 42 Donnie Berkholz (RETIRED) gentoo-dev 2004-09-30 13:58:12 UTC
Should be fixed in 6.8