Bug 377

Summary: weak data dependency on GLcore in glx
Product: xorg Reporter: John moser <bluefoxicy>
Component: Server/Ext/GLXAssignee: Adam Jackson <ajax>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: ago, ajax, mharris, scottfk, swtaylor, torrey
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 400    
Attachments:
Description Flags
the patch
none
required changes for windows
none
revised patch, fixes Cygwin and OSX
none
fix for DRI interaction
none
minor fix (rev. 4) none

Description John moser 2004-03-26 17:06:53 UTC
dlopen: /usr/X11R6/lib/modules/extensions/libGLcore.so: undefined symbol: 
__glXLastContext 
(EE) Failed to load /usr/X11R6/lib/modules/extensions/libGLcore.so 
(EE) Failed to load module "GLcore" (loader failed, 7) 
dlopen: /usr/X11R6/lib/modules/extensions/libglx.so: undefined symbol: 
__glDDXExtensionInfo 
 
 
It seems that libglx.so supplies __glXLastContext 
It seems that libGLcore.so supplies __glDDXExtensionInfo 
It seems that this is indeed with xorg-x11 GLX packaged with xorg-x11 
 
Circular dependencies.  glx can't load until GLcore.  GLcore can't 
load until glx. 
 
This is with spyderous' xorg-x11-1.0_pre20040313-r1.ebuild
Comment 1 Mike A. Harris 2004-03-30 23:41:28 UTC
Are you using "#define MakeDllModules YES" when building by any chance?

If so, the dlopen() loader is known to be broken, however patches are always
welcome to fix it.  Nothing currently uses the dlopen loader.
Comment 2 solar[@]gentoo.org 2004-04-05 23:36:07 UTC
--- xc/programs/Xserver/GL/mesa/src/X/xf86glx.c     2002-12-17
06:03:24.000000000 +0100
+++ xc/programs/Xserver/GL/mesa/src/X/xf86glx.c 2003-12-30 12:22:34.000000000 +0100
@@ -768,7 +768,6 @@
 {
     XMesaContext xmesa = (XMesaContext) gc->DriverCtx;
     MESA_CC = NULL;
-    __glXLastContext = NULL;
     return XMesaLoseCurrent(xmesa);
 }
Comment 3 Mike A. Harris 2004-04-17 08:38:36 UTC
*** Bug 422 has been marked as a duplicate of this bug. ***
Comment 4 Adam Jackson 2004-06-25 23:10:24 UTC
i'll take the case!
Comment 5 Adam Jackson 2004-07-21 12:48:20 UTC
first cut at a patch.  breaks cygwin and osx, and requires you to load glx
before dri, but otherwise functional.
Comment 6 Adam Jackson 2004-07-21 12:49:53 UTC
Created attachment 509 [details] [review]
the patch
Comment 7 Alexander Gottwald 2004-07-22 08:50:53 UTC
Created attachment 513 [details] [review]
required changes for windows
Comment 8 Adam Jackson 2004-07-22 14:23:10 UTC
Created attachment 514 [details] [review]
revised patch, fixes Cygwin and OSX

ago, thanks for the Cygwin bits.
Comment 9 Adam Jackson 2004-07-22 14:25:43 UTC
cc'ing Torrey for the OSX part.
Comment 10 Adam Jackson 2004-07-22 18:10:56 UTC
Created attachment 517 [details] [review]
fix for DRI interaction

this fixes the case where libdri is loaded before libglx (including when libglx
is never loaded).  after testing on the old module loader i plan to commit
this.
Comment 11 Adam Jackson 2004-07-24 18:07:18 UTC
Created attachment 522 [details] [review]
minor fix (rev. 4)

cosmetic update, add the new symbols to glcoreSymbols.

the way the patch stands, we will fail if someone tries to load a 6.7.0 GLcore
from a patched GLX.  currently there are no module version checks anywhere in
these four modules; is it worth adding them?
Comment 12 Adam Jackson 2004-07-26 12:06:54 UTC
Fixed in CVS, closing.

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.