Bug 1874 - glapi_x86.o is missing symbol glMultiTexCoord3sv, which causes glxinfo compile to fail
Summary: glapi_x86.o is missing symbol glMultiTexCoord3sv, which causes glxinfo compil...
Status: RESOLVED WORKSFORME
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/GLX (show other bugs)
Version: 6.8.0
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-21 01:00 UTC by Soren Harward
Modified: 2005-07-30 23:48 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Soren Harward 2004-11-21 01:00:47 UTC
This all started trying to install Xorg from the Gentoo ebuilds.  glxinfo was
failing to compile with the error "undefined reference to 'glMultiTexCoord3sv'"
 I eventually traced this symbol back to lib/GL/GL/libGL.so, and it gets linked
into libGL.so from the file lib/GL/glx/glapi_x86.o .  Running 'nm' on
glapi_x86.o shows the following:

[truncated]
00005b20 T glMultiTexCoord3d
00003100 T glMultiTexCoord3dARB
00005b40 T glMultiTexCoord3dv
00003120 T glMultiTexCoord3dvARB
00005b60 T glMultiTexCoord3f
00003140 T glMultiTexCoord3fARB
00005b80 T glMultiTexCoord3fv
00003160 T glMultiTexCoord3fvARB
00005ba0 T glMultiTexCoord3i
00003180 T glMultiTexCoord3iARB
00005bc0 T glMultiTexCoord3iv
000031a0 T glMultiTexCoord3ivARB
00005be0 T glMultiTexCoord3s
000031c0 T glMultiTexCoord3sARB
         U glMultiTexCoord3sv
000031e0 T glMultiTexCoord3svARB
[truncated]

The symbol glMultiTexCoord3sv seems to be missing entirely from the compiled file.

In trying to fix this, I started grep'ing around for other files with the
glMultiTexCoord3sv symbol.  I noticed that lib/GL/glx/vertarr.o had the symbols
matching "__indirect_glMultiTexCoord[124][dfis]vARB", but the ones matching
"__indirect_glMultiTexCoord3[dfis]vARB" were entirely missing.  I traced this
back to a problem in line 91 of vertarr.c, which has:

texCoordPointer->mtex_proc = (void (*)(GLenum, const void
*))glMultiTexCoord4##let##vARB; \

which I think should be 

texCoordPointer->mtex_proc = (void (*)(GLenum, const void
*))glMultiTexCoord3##let##vARB; \

instead (notice the change from MultiTexCoord4 to MultiTexCoord3).  This got all
the "__indirect_glMultiTexCoord3[dfis]vARB" symbols into vertarr.o, but didn't
solve the problem with the glMultiTexCoord3sv symbol missing entirely from
glapi_x86.o,  I wish I knew enough assembly to be able to say why, but I just don't.

I'm running Gentoo, using gcc-3.3.2 (Gentoo package 3.3.2-r5 if anyone's really
curious).  I wouldn't totally rule out compiler error; the reason I'm still
using 3.3.2 on Gentoo is because I've had newer versions puke on kernel
compiles.  And before anyone dismisses this bug as an "overoptimizations error,"
I'm using just -O2 and -march=pentium3.  I've also verified this bug using a
clean 6.8.0 tree, not a Gentoo-patched one, without any compiler optimizations
at all, so I know it's not a problem with any of Gentoo's custom patches or the
ebuild.

Seeing as how glapi_x86.S hasn't changed between 6.8.0 and 6.8.2, I imagine that
this bug still exists in 6.8.0.  If needed, I can try to compile the 6.8.2 tree
and verify this.



Interestingly enough, I just noticed that in 6.8.2, vertarr.c:91 is

texCoordPointer->mtex_proc = (void (*)(GLenum, const void
*))glMultiTexCoord2##let##vARB; \

which has a 2 where the 4 used to be, and where I had put a 3.
Comment 1 Soren Harward 2004-11-21 01:06:16 UTC
I've verified that this affects 6.8.2 as well.
Comment 2 Adam Jackson 2005-08-01 09:48:21 UTC
worksforme after the Mesa 6.3.1 import.  please reopen if you still hit this.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.