Xgl -DXFree86LOADER confusion (patch) and __GLXscreenInfo undefined. Any ideas?

Colin Guthrie xorg at colin.guthr.ie
Wed Mar 29 16:30:30 PST 2006


Hi,

As reported by myself and Alexej Davidov under the threads "Problem
compiling Xgl with latest CVS everything" and "xserver compiling
error...", I'm having trouble compiling latest CVS Xgl.

I've tracked this down to the define XFree86LOADER as inserted by the
configure.ac file in the root folder around line 1200.

If this define is included, I cannot compile GL/glx/glcontextmodes.c due
to the following errors:

<snip>
In file included from glcontextmodes.c:51:
/usr/include/string.h:293: error: conflicting types for 'xf86memmove'
/usr/include/string.h:44: error: previous declaration of 'xf86memmove'
was here
/usr/include/string.h:296: error: conflicting types for 'xf86bzero'
../../hw/xfree86/os-support/xf86_ansic.h:294: error: previous
declaration of 'xf86bzero' was here
</snip>

So ultimately, I patched GL/glx/Makefile.am and GL/mesa/X/Makefile.am to 
not use this flag (see attached).

Unfortunatly, this doesn't fix things 100% *sigh*. I now get this error 
when compiling reaches hw/xfree86/dri/dri.c:

<snip>
make[4]: Entering directory `/home/colin/xgl/xgl/hw/xfree86/dri'
if /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H 
-I. -I. -I../../../include -I../../../include -I../../../include 
-I../../../include -I../../../include -I../../../include 
-I../../../include -I../../../include    -I../../../hw/xfree86/common 
-I../../../hw/xfree86/os-support -I../../../hw/xfree86/os-support/bus 
-I../../../GL/glx -I../../../GL/include -I../../../GL/include 
-I/home/colin/xgl/Mesa/include -DHAVE_XORG_CONFIG_H -DXGLServer 
-DXFree86Server -DIN_MODULE -DXFree86Module -DXFree86LOADER 
-I/home/colin/xgl/prefix/include/X11/dri 
-I/home/colin/xgl/prefix/include -I/home/colin/xgl/prefix/include/drm 
-I/home/colin/xgl/prefix/include   -Wall -Wpointer-arith 
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations 
-Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN 
-DHAS_STICKY_DIR_BIT -I/home/colin/xgl/prefix/include 
-I../../../include -I../../../include -I../../../Xext 
-I../../../composite -I../../../damageext -I../../../xfixes 
-I../../../Xi -I../../../mi -I../../../miext/shadow 
-I../../../miext/damage -I../../../render -I../../../randr -I../../../fb 
  -g -O2 -MT libdri_la-dri.lo -MD -MP -MF ".deps/libdri_la-dri.Tpo" -c 
-o libdri_la-dri.lo `test -f 'dri.c' || echo './'`dri.c; \
then mv -f ".deps/libdri_la-dri.Tpo" ".deps/libdri_la-dri.Plo"; else rm 
-f ".deps/libdri_la-dri.Tpo"; exit 1; fi
  gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -I../../../include 
-I../../../include -I../../../include -I../../../include 
-I../../../include -I../../../include -I../../../include 
-I../../../hw/xfree86/common -I../../../hw/xfree86/os-support 
-I../../../hw/xfree86/os-support/bus -I../../../GL/glx 
-I../../../GL/include -I../../../GL/include 
-I/home/colin/xgl/Mesa/include -DHAVE_XORG_CONFIG_H -DXGLServer 
-DXFree86Server -DIN_MODULE -DXFree86Module -DXFree86LOADER 
-I/home/colin/xgl/prefix/include/X11/dri 
-I/home/colin/xgl/prefix/include -I/home/colin/xgl/prefix/include/drm 
-I/home/colin/xgl/prefix/include -Wall -Wpointer-arith 
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations 
-Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN 
-DHAS_STICKY_DIR_BIT -I/home/colin/xgl/prefix/include -I../../../include 
-I../../../include -I../../../Xext -I../../../composite 
-I../../../damageext -I../../../xfixes -I../../../Xi -I../../../mi 
-I../../../miext/shadow -I../../../miext/damage -I../../../render 
-I../../../randr -I../../../fb -g -O2 -MT libdri_la-dri.lo -MD -MP -MF 
.deps/libdri_la-dri.Tpo -c dri.c  -fPIC -DPIC -o .libs/libdri_la-dri.o
dri.c: In function 'DRIScreenInit':
dri.c:302: warning: cast from pointer to integer of different size
dri.c: In function 'DRICreateDummyContext':
dri.c:786: error: '__GLXscreenInfo' undeclared (first use in this function)
dri.c:786: error: (Each undeclared identifier is reported only once
dri.c:786: error: for each function it appears in.)
dri.c:786: error: 'pGLXScreen' undeclared (first use in this function)
dri.c: In function 'DRICreateContext':
dri.c:850: error: '__GLXscreenInfo' undeclared (first use in this function)
dri.c:850: error: 'pGLXScreen' undeclared (first use in this function)
make[4]: *** [libdri_la-dri.lo] Error 1
make[4]: Leaving directory `/home/colin/xgl/xgl/hw/xfree86/dri'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/colin/xgl/xgl/hw/xfree86'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/colin/xgl/xgl/hw/xfree86'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/colin/xgl/xgl/hw'
make: *** [all-recursive] Error 1
</snip>


I indeed I cannot see a definition of this structure in the 
GL/glx/glxscreens.h, but I wonder if I should? I see it defined in 
./hw/dmx/glxProxy/glxscreens.h but it doesn't seem to be the correct 
definition for this use (no modes member in the struct)

In case it makes any odds, my autogen.sh line is:
./autogen.sh --prefix=$PREFIX --enable-xgl --enable-xglx --disable-xvfb
--disable-xnest --disable-xprint --enable-xkb --disable-kdriveserver
--with-mesa-source=$SRCDIR/Mesa

Any help/insight would be appreciated.

I've got David's CopySubBuffer patch 2 applied too but don't think that 
makes any odds (other than making it compile with Mesa HEAD.

Col.

-- 

+------------------------+
|     Colin Guthrie      |
+------------------------+
| xorg(at)colin.guthr.ie |
| http://colin.guthr.ie/ |
+------------------------+

-------------- next part --------------
A non-text attachment was scrubbed...
Name: xgl-XFree86LOADER.diff
Type: text/x-patch
Size: 1167 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20060330/e4d2ecba/attachment.bin>


More information about the xorg mailing list