Hi, Dan

This patch works with
./autogen.sh --prefix="$PREFIX" --enable-xcb --with-dri-drivers=i915
--disable-gallium --without-demos

if I use
./autogen.sh --prefix="$PREFIX" --enable-xcb --with-dri-drivers=i915
--disable-gallium
it failed as attached with-demos.log.

if I use
./autogen.sh --prefix="$PREFIX" --enable-xcb --without-dri-drivers
--enable-gallium-intel
it failed as attach intel-gallium-enabled.log

Thanks.

2010/4/19 Dan Nicholson <dbn.li...@gmail.com>

> On Mon, Apr 19, 2010 at 12:15:22AM +0800, CSJ wrote:
> > Sorry I am not familiar with Makefiles
> > But I modified src/egl/drivers/glx/Makefile and
> > src/egl/main/Makefile as attached patch file.
> >
> > and it can compiled passed when configured
> > --with-dri-drivers=i915 --disable-gallium --without-demos
> >
> > if gallium enabled or with demos, it still compiled failed that
> > can not find xlib.h
> >
> > I'll temporarily use this patch to go on compile xserver,
> > thanks all :)
>
> Can you try the patch below? This is what I'd like to commit since we
> already have the x11.pc values.
>
> --
> Dan
>
> From 520bbf586f8089f21092a9577bc0c0f9f89e8dd3 Mon Sep 17 00:00:00 2001
> From: Dan Nicholson <dbn.li...@gmail.com>
> Date: Sun, 18 Apr 2010 09:33:03 -0700
> Subject: [PATCH] egl: Pass flags to locate Xlib headers and libraries
>
> eglplatform.h pulls in Xlib.h on X11 platforms. Likewise, the egl glx
> driver needs to link to libX11. Make sure we use the locations the user
> told us about.
>
> Signed-off-by: Dan Nicholson <dbn.li...@gmail.com>
> ---
>  src/egl/drivers/glx/Makefile |    4 ++--
>  src/egl/main/Makefile        |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/egl/drivers/glx/Makefile b/src/egl/drivers/glx/Makefile
> index 634638f..d976b91 100644
> --- a/src/egl/drivers/glx/Makefile
> +++ b/src/egl/drivers/glx/Makefile
> @@ -10,7 +10,7 @@ EGL_INCLUDES = \
>        -I$(TOP)/include \
>        -I$(TOP)/src/egl/main
>
> -EGL_CFLAGS =
> -EGL_LIBS = -lX11 -lGL
> +EGL_CFLAGS = $(X11_CFLAGS)
> +EGL_LIBS = $(X11_LIBS) -lGL
>
>  include ../Makefile.template
> diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile
> index 31f214c..3b4ebf7 100644
> --- a/src/egl/main/Makefile
> +++ b/src/egl/main/Makefile
> @@ -7,7 +7,7 @@ include $(TOP)/configs/current
>  EGL_MAJOR = 1
>  EGL_MINOR = 0
>
> -INCLUDE_DIRS = -I$(TOP)/include
> +INCLUDE_DIRS = -I$(TOP)/include $(X11_CFLAGS)
>
>  HEADERS = \
>        eglcompiler.h \
> --
> 1.6.6.1
>
gcc -c -I. -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/egl/main -I../../../../include -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XEXTPROTO_71 -march=core2 -mtune=core2 -Os -pipe -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing  -fPIC  -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XEXTPROTO_71 common/egl_g3d.c -o common/egl_g3d.o
In file included from ../../../../include/EGL/egl.h:36,
                 from ../../../../src/egl/main/egltypedefs.h:6,
                 from ../../../../src/egl/main/egldriver.h:5,
                 from common/egl_g3d.c:26:
../../../../include/EGL/eglplatform.h:84:22: error: X11/Xlib.h: No such file or directory
../../../../include/EGL/eglplatform.h:85:23: error: X11/Xutil.h: No such file or directory
In file included from ../../../../include/EGL/egl.h:36,
                 from ../../../../src/egl/main/egltypedefs.h:6,
                 from ../../../../src/egl/main/egldriver.h:5,
                 from common/egl_g3d.c:26:
../../../../include/EGL/eglplatform.h:87: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
../../../../include/EGL/eglplatform.h:88: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EGLNativePixmapType'
../../../../include/EGL/eglplatform.h:89: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EGLNativeWindowType'
../../../../include/EGL/eglplatform.h:96: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NativeDisplayType'
../../../../include/EGL/eglplatform.h:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NativePixmapType'
../../../../include/EGL/eglplatform.h:98: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NativeWindowType'
In file included from ../../../../src/egl/main/egltypedefs.h:6,
                 from ../../../../src/egl/main/egldriver.h:5,
                 from common/egl_g3d.c:26:
../../../../include/EGL/egl.h:251: error: expected ')' before 'display_id'
../../../../include/EGL/egl.h:266: error: expected declaration specifiers or '...' before 'EGLNativeWindowType'
../../../../include/EGL/egl.h:271: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
../../../../include/EGL/egl.h:314: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
In file included from ../../../../src/egl/main/egldriver.h:6,
                 from common/egl_g3d.c:26:
../../../../src/egl/main/eglapi.h:31: error: expected declaration specifiers or '...' before 'EGLNativeWindowType'
../../../../src/egl/main/eglapi.h:32: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
../../../../src/egl/main/eglapi.h:41: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
In file included from common/egl_g3d.h:34,
                 from common/egl_g3d.c:35:
../../../../src/egl/main/egldisplay.h:61: error: expected specifier-qualifier-list before 'EGLNativeDisplayType'
../../../../src/egl/main/egldisplay.h:93: error: expected ')' before 'displayName'
In file included from common/egl_g3d.h:36,
                 from common/egl_g3d.c:35:
../../../../src/egl/main/eglsurface.h:59: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
../../../../src/egl/main/eglsurface.h:67: error: expected declaration specifiers or '...' before 'EGLNativeWindowType'
In file included from common/egl_g3d.h:36,
                 from common/egl_g3d.c:35:
../../../../src/egl/main/eglsurface.h:71: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
In file included from common/native.h:36,
                 from common/egl_g3d.h:42,
                 from common/egl_g3d.c:35:
common/native_probe.h:46: error: expected specifier-qualifier-list before 'EGLNativeDisplayType'
common/native_probe.h:60: error: expected ')' before 'dpy'
In file included from common/egl_g3d.h:42,
                 from common/egl_g3d.c:35:
common/native.h:166: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
common/native.h:174: error: expected declaration specifiers or '...' before 'EGLNativeWindowType'
common/native.h:181: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
common/native.h:214: error: expected ')' before 'dpy'
In file included from common/egl_g3d.c:35:
common/egl_g3d.h: In function 'egl_g3d_display':
common/egl_g3d.h:102: error: '_EGLDisplay' has no member named 'DriverData'
In file included from common/egl_g3d.c:36:
common/egl_g3d_api.h: At top level:
common/egl_g3d_api.h:35: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
common/egl_g3d.c: In function 'egl_g3d_get_probe':
common/egl_g3d.c:77: error: 'struct native_probe' has no member named 'display'
common/egl_g3d.c:77: error: '_EGLDisplay' has no member named 'NativeDisplay'
common/egl_g3d.c:79: error: 'struct native_probe' has no member named 'destroy'
common/egl_g3d.c:80: warning: implicit declaration of function 'native_create_probe'
common/egl_g3d.c:80: error: '_EGLDisplay' has no member named 'NativeDisplay'
common/egl_g3d.c: In function 'egl_g3d_destroy_probe':
common/egl_g3d.c:99: error: 'struct native_probe' has no member named 'display'
common/egl_g3d.c:99: error: '_EGLDisplay' has no member named 'NativeDisplay'
common/egl_g3d.c:100: error: 'struct native_probe' has no member named 'destroy'
common/egl_g3d.c: In function 'egl_g3d_terminate':
common/egl_g3d.c:444: error: '_EGLDisplay' has no member named 'Screens'
common/egl_g3d.c:445: error: '_EGLDisplay' has no member named 'NumScreens'
common/egl_g3d.c:446: error: '_EGLDisplay' has no member named 'Screens'
common/egl_g3d.c:450: error: '_EGLDisplay' has no member named 'Screens'
common/egl_g3d.c:460: error: '_EGLDisplay' has no member named 'DriverData'
common/egl_g3d.c: In function 'egl_g3d_initialize':
common/egl_g3d.c:480: error: '_EGLDisplay' has no member named 'DriverData'
common/egl_g3d.c:482: warning: implicit declaration of function 'native_create_display'
common/egl_g3d.c:482: error: '_EGLDisplay' has no member named 'NativeDisplay'
common/egl_g3d.c:492: error: '_EGLDisplay' has no member named 'ClientAPIsMask'
common/egl_g3d.c:504: error: '_EGLDisplay' has no member named 'Extensions'
common/egl_g3d.c:509: error: '_EGLDisplay' has no member named 'Extensions'
common/egl_g3d.c:511: error: '_EGLDisplay' has no member named 'Extensions'
make[4]: *** [common/egl_g3d.o] Error 1
make[4]: Leaving directory `/home/csj/xorg/xorg-lib/mesa/src/gallium/state_trackers/egl'
make[3]: *** [subdirs] Error 1
make[3]: Leaving directory `/home/csj/xorg/xorg-lib/mesa/src/gallium/state_trackers'
make[2]: *** [default] Error 1
make[2]: Leaving directory `/home/csj/xorg/xorg-lib/mesa/src/gallium'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/csj/xorg/xorg-lib/mesa/src'
make: *** [default] Error 1

make[1]: Entering directory `/home/csj/xorg/xorg-lib/mesa/progs'
Making programs for autoconf
make[2]: Entering directory `/home/csj/xorg/xorg-lib/mesa/progs/xdemos'
make[2]: Nothing to be done for `default'.
make[2]: Leaving directory `/home/csj/xorg/xorg-lib/mesa/progs/xdemos'
make[2]: Entering directory `/home/csj/xorg/xorg-lib/mesa/progs/egl/opengl'
gcc -c -I../../../include -I../../../progs/egl/eglut -march=core2 -mtune=core2 -Os -pipe -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing  -fPIC  -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XEXTPROTO_71 demo1.c -o demo1.o
In file included from ../../../include/EGL/egl.h:36,
                 from demo1.c:7:
../../../include/EGL/eglplatform.h:84:22: error: X11/Xlib.h: No such file or directory
../../../include/EGL/eglplatform.h:85:23: error: X11/Xutil.h: No such file or directory
In file included from ../../../include/EGL/egl.h:36,
                 from demo1.c:7:
../../../include/EGL/eglplatform.h:87: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
../../../include/EGL/eglplatform.h:88: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EGLNativePixmapType'
../../../include/EGL/eglplatform.h:89: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EGLNativeWindowType'
../../../include/EGL/eglplatform.h:96: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NativeDisplayType'
../../../include/EGL/eglplatform.h:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NativePixmapType'
../../../include/EGL/eglplatform.h:98: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NativeWindowType'
In file included from demo1.c:7:
../../../include/EGL/egl.h:251: error: expected ')' before 'display_id'
../../../include/EGL/egl.h:266: error: expected declaration specifiers or '...' before 'EGLNativeWindowType'
../../../include/EGL/egl.h:271: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
../../../include/EGL/egl.h:314: error: expected declaration specifiers or '...' before 'EGLNativePixmapType'
demo1.c: In function 'main':
demo1.c:100: warning: implicit declaration of function 'eglGetDisplay'
demo1.c:100: error: 'EGLNativeDisplayType' undeclared (first use in this function)
demo1.c:100: error: (Each undeclared identifier is reported only once
demo1.c:100: error: for each function it appears in.)
demo1.c:100: error: expected ')' before numeric constant
make[2]: *** [demo1.o] Error 1
make[2]: Leaving directory `/home/csj/xorg/xorg-lib/mesa/progs/egl/opengl'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/csj/xorg/xorg-lib/mesa/progs'
make: *** [default] Error 1
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to