At 7:13 PM +0100 11/16/03, Matthieu Herrb wrote:
while building -current XFree86 on Panther I get the following error:

/usr/bin/gcc-3.3 -o glxinfo -Os -Wall -Wpointer-arith -no-cpp-precomp -L../../exports/lib glxinfo.o -lGLU -lGL -lXext -lX11 -L/usr/X11R6/lib ld: warning can't open dynamic library: /usr/X11R6/lib/libXxf86vm.1.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: Undefined symbols:
_XF86VidModeGetModeLine referenced from libGL expected to be defined in /usr/X11R6/lib/libXxf86vm.1.dylib
_XF86VidModeQueryVersion referenced from libGL expected to be defined in /usr/X11R6/lib/libXxf86vm.1.dylib
make: *** [glxinfo] Error 1


It looks indeed that libGL is referencing those symbols. OTOH, I don't
see any reference to them in libMesaGL. So I guess something changed
in a recent Mesa update... What  about this patch ? (and similar
changes to the other *Lib.tmpl)

Yeah, this is a "one time" error. libXxf86vm is actually built and installed on Darwin, but until you install it for the first time you get this kind of error. If one pushes ahead with a "make install" this error does not reappear. Nonetheless it is good to fix it.


Index: xc/config/cf/darwinLib.tmpl
===================================================================
RCS file: /cvs/xf86/xc/config/cf/darwinLib.tmpl,v
retrieving revision 1.19
diff -u -r1.19 darwinLib.tmpl
--- xc/config/cf/darwinLib.tmpl 4 Nov 2003 00:24:36 -0000 1.19
+++ xc/config/cf/darwinLib.tmpl 16 Nov 2003 18:11:37 -0000
@@ -22,9 +22,9 @@
#define SharedXfontReqs $(LDPRELIB) $(FONTSTUBLIB) GzipLibrary $(FREETYPE2LIB) -flat_namespace


 #define SharedAppleWMReqs   $(LDPRELIB) $(XLIB)
-#define SharedGLReqs        $(LDPRELIB) $(XLIB)
+#define SharedGLReqs        $(LDPRELIB) $(XLIB) $(XXF86VMLIB)

If we need to keep the libXxf86vm dependency, this is probably the "right" way to do this. Currently XXF86VMLIB is already pulled into the libGL build by the following lines in the xc/lib/GL/GL/Imakefile:


#if BuildXF86DRI || (defined(DarwinArchitecture) && BuildAppleDRI)
VMODEREQUIREDLIBS = $(LDPRELIBS) $(XXF86VMLIB)
#endif

 #define SharedGLUReqs       $(LDPRELIB) $(XLIB) $(GLXLIB)
-#define SharedOSMesaReqs    $(LDPRELIB) $(XLIB) $(GLXLIB) $(XXF86VMLIB)
+#define SharedOSMesaReqs    $(LDPRELIB) $(XLIB) $(GLXLIB)

I got build errors previously unless I put in the OSMesa dependency on XXF86VMLIB. libOSMesa depends on libGL which depends on libXxf86vm.


#define SharedSMReqs $(LDPRELIB) $(ICELIB)
#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
Index: xc/programs/glxinfo/Imakefile
===================================================================
RCS file: /cvs/xf86/xc/programs/glxinfo/Imakefile,v
retrieving revision 1.8
diff -u -r1.8 Imakefile
--- xc/programs/glxinfo/Imakefile 22 Nov 2002 22:56:03 -0000 1.8
+++ xc/programs/glxinfo/Imakefile 16 Nov 2003 18:12:44 -0000
@@ -4,8 +4,8 @@


#if BuildGLULibrary

-        DEPLIBS = $(DEPGLULIB) $(DEPGLXLIB) $(DEPXLIB)
-LOCAL_LIBRARIES = $(GLULIB) $(GLXLIB) $(XLIB)
+        DEPLIBS = $(DEPGLULIB) $(DEPGLXLIB) $(DEPXXF86VMLIB) $(DEPXLIB)
+LOCAL_LIBRARIES = $(GLULIB) $(GLXLIB) $(XXF86VMLIB) $(XLIB)
         DEFINES = -DDO_GLU

If you do this here, you should also do it for glxgears for completeness.


At 1:30 PM -0500 11/16/03, David Dawes wrote:
There is code in glx/glxcmds.c for GLX_OML_sync_control that uses
the vidmode extension.  It's only used when direct rendering is
defined.  It should also have a dependence on the vidmode extension
being defined, and that appears to be turned off (as expected) in darwin.cf:

/* no XFree86-VidMode extension */
#define BuildXF86VidModeExt     NO

I would suggest the following in addition to the first part of your
patch.  The second part of your patch would be needed for static libraries,
but as far as I know it is still an unanswered question as to whether direct
rendering currently works with a static libGL.

Index: lib/GL/glx/Imakefile
===================================================================
RCS file: /home/x-cvs/xc/lib/GL/glx/Imakefile,v
retrieving revision 1.22
diff -u -r1.22 Imakefile
--- lib/GL/glx/Imakefile        12 Nov 2003 00:10:24 -0000      1.22
+++ lib/GL/glx/Imakefile        16 Nov 2003 18:23:35 -0000
@@ -127,7 +127,8 @@

          SRCS = $(GLX_SRCS) $(ASM_SRCS)
          OBJS = $(GLX_OBJS) $(ASM_OBJS)
-      DEFINES = $(GLX_DEFS) $(ASM_DEFS) $(XMESA_DEFINES) $(ALIAS_DEFINES)
+      DEFINES = $(GLX_DEFS) VidModeExtensionDefines $(ASM_DEFS) \
+               $(XMESA_DEFINES) $(ALIAS_DEFINES)

      INCLUDES = -I$(INCLUDESRC) \
                -I$(XINCLUDESRC) \
Index: lib/GL/glx/glxcmds.c
===================================================================
RCS file: /home/x-cvs/xc/lib/GL/glx/glxcmds.c,v
retrieving revision 1.26
diff -u -r1.26 glxcmds.c
--- lib/GL/glx/glxcmds.c        14 Nov 2003 22:44:26 -0000      1.26
+++ lib/GL/glx/glxcmds.c        16 Nov 2003 18:23:54 -0000
@@ -2436,7 +2436,7 @@
 Bool GLX_PREFIX(glXGetMscRateOML)(Display * dpy, GLXDrawable drawable,
                                  int32_t * numerator, int32_t * denominator)
 {
-#if defined( GLX_DIRECT_RENDERING )
+#if defined( GLX_DIRECT_RENDERING ) && defined( XF86VIDMODE )
    __GLXdisplayPrivate * const priv = __glXInitialize(dpy);

Good idea. I hadn't realize the XFree86-VidMode stuff was only used in direct rendering. I didn't try to remove the dependency on libXxf86vm in case someone was running a GLX client from Darwin to a remote X server that supported XFree86-VidMode. If we remove all XFree86-VidMode calls from libGL on Darwin, we could take out all references to XXF86VMLIB in darwinLib.tmpl. You might still want Matthieu's patch to other *Lib.tmpl files although most of them are not as finicky as Darwin.


--Torrey
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to