Bug 17381 - mesa build failed for dri2
Summary: mesa build failed for dri2
Status: VERIFIED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-31 23:18 UTC by liuhaien
Modified: 2008-12-29 21:13 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description liuhaien 2008-08-31 23:18:56 UTC
when compile mesa ,it failed with below info:
---------------
dri2.c: In function ‘DRI2GetBuffers’:
dri2.c:208: error: ‘xDRI2GetBuffersReply’ undeclared (first use in this function)
dri2.c:208: error: (Each undeclared identifier is reported only once
dri2.c:208: error: for each function it appears in.)
dri2.c:208: error: expected ‘;’ before ‘rep’
dri2.c:209: error: ‘xDRI2GetBuffersReq’ undeclared (first use in this function)
dri2.c:209: error: ‘req’ undeclared (first use in this function)
dri2.c:211: error: ‘xDRI2Buffer’ undeclared (first use in this function)
dri2.c:211: error: expected ‘;’ before ‘repBuffer’
dri2.c:218: error: ‘sz_xDRI2GetBuffersReq’ undeclared (first use in this function)
dri2.c:218: error: expected expression before ‘)’ token
dri2.c:218: error: ‘X_DRI2GetBuffers’ undeclared (first use in this function)
dri2.c:227: error: ‘rep’ undeclared (first use in this function)
dri2.c:239: error: ‘repBuffer’ undeclared (first use in this function)
dri2.c: In function ‘DRI2SwapBuffers’:
dri2.c:264: error: ‘xDRI2SwapBuffersReq’ undeclared (first use in this function)
dri2.c:264: error: ‘req’ undeclared (first use in this function)
dri2.c:265: error: ‘xDRI2SwapBuffersReply’ undeclared (first use in this function)
dri2.c:265: error: expected ‘;’ before ‘rep’
dri2.c:270: error: ‘sz_xDRI2SwapBuffersReq’ undeclared (first use in this function)
dri2.c:270: error: expected expression before ‘)’ token
dri2.c:270: error: ‘X_DRI2SwapBuffers’ undeclared (first use in this function)
dri2.c:279: error: ‘rep’ undeclared (first use in this function)
gmake[2]: *** [dri2.o] Error 1
gmake[2]: Leaving directory `/GFX/build/component/Mesa/mesa/src/glx/x11'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/GFX/build/component/Mesa/mesa/src'
make: *** [default] Error 1
-------------------------------------------------
we try to bisect and find below commit cause this issue:

commit f56b569e9af356c11869ee49a4669bb01b75397e
Author: Kristian Høgsberg <krh@redhat.com>
Date:   Wed Aug 13 11:46:25 2008 -0400

    DRI2: Drop sarea, implement swap buffers in the X server.
Comment 1 liuhaien 2008-08-31 23:26:18 UTC
xserver also cannot build against dri2:
../hw/xfree86/dri2/dri2.h:36:39: error: X11/extensions/dri2tokens.h: No such file or directory
glxdri2.c:72: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘*’ token
glxdri2.c:93: error: expected specifier-qualifier-list before ‘__DRIbuffer’
glxdri2.c: In function ‘__glXDRIbindTexImage’:
glxdri2.c:205: error: ‘__GLXDRIscreen’ has no member named ‘texBuffer’
glxdri2.c: In function ‘__glXDRIscreenCreateContext’:
glxdri2.c:295: error: ‘__GLXDRIscreen’ has no member named ‘dri2’
glxdri2.c: In function ‘__glXDRIscreenCreateDrawable’:
glxdri2.c:336: error: ‘__GLXDRIscreen’ has no member named ‘dri2’
glxdri2.c: At top level:
glxdri2.c:342: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
glxdri2.c:375: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘loaderExtension’
glxdri2.c:382: error: ‘loaderExtension’ undeclared here (not in a function)
glxdri2.c: In function ‘initializeExtensions’:
glxdri2.c:425: error: ‘__GLXDRIscreen’ has no member named ‘glx_enable_bits’
glxdri2.c:426: warning: passing argument 1 of ‘__glXEnableExtension’ from incompatible pointer type
glxdri2.c:432: error: ‘__GLXDRIscreen’ has no member named ‘swapControl’
glxdri2.c:433: warning: statement with no effect
glxdri2.c:434: error: ‘__GLXDRIscreen’ has no member named ‘glx_enable_bits’
glxdri2.c:435: warning: passing argument 1 of ‘__glXEnableExtension’ from incompatible pointer type
glxdri2.c:436: error: ‘__GLXDRIscreen’ has no member named ‘glx_enable_bits’
glxdri2.c:437: warning: passing argument 1 of ‘__glXEnableExtension’ from incompatible pointer type
glxdri2.c:445: error: ‘__GLXDRIscreen’ has no member named ‘texBuffer’
glxdri2.c:446: warning: statement with no effect
glxdri2.c: In function ‘__glXDRIscreenProbe’:
glxdri2.c:485: error: ‘__GLXDRIscreen’ has no member named ‘glx_enable_bits’
glxdri2.c:485: warning: passing argument 1 of ‘__glXInitExtensionEnableBits’ from incompatible pointer type
glxdri2.c:509: error: ‘__DRI_DRI2’ undeclared (first use in this function)
glxdri2.c:509: error: (Each undeclared identifier is reported only once
glxdri2.c:509: error: for each function it appears in.)
glxdri2.c:509: warning: passing argument 1 of ‘strlen’ from incompatible pointer type
glxdri2.c:509: warning: passing argument 2 of ‘__builtin_strcmp’ from incompatible pointer type
glxdri2.c:509: warning: passing argument 2 of ‘__builtin_strcmp’ from incompatible pointer type
glxdri2.c:509: warning: passing argument 1 of ‘strlen’ from incompatible pointer type
glxdri2.c:509: warning: passing argument 2 of ‘__builtin_strcmp’ from incompatible pointer type
glxdri2.c:509: warning: passing argument 2 of ‘__builtin_strcmp’ from incompatible pointer type
glxdri2.c:510: error: ‘__DRI_DRI2_VERSION’ undeclared (first use in this function)
glxdri2.c:510: warning: comparison between pointer and integer
glxdri2.c:511: error: ‘__GLXDRIscreen’ has no member named ‘dri2’
glxdri2.c:511: error: expected ‘)’ before ‘__DRIdri2Extension’
glxdri2.c:511: warning: type defaults to ‘int’ in declaration of ‘type name’
glxdri2.c:511: warning: statement with no effect
glxdri2.c:515: error: ‘__GLXDRIscreen’ has no member named ‘dri2’
glxdri2.c:522: error: ‘__GLXDRIscreen’ has no member named ‘dri2’
glxdri2.c:522: error: request for member ‘createNewScreen’ in something not a structure or union
glxdri2.c:526: error: called object ‘*(&<erroneous-expression>)’ is not a function
glxdri2.c:526: warning: assignment from incompatible pointer type
glxdri2.c:540: error: ‘__GLXDRIscreen’ has no member named ‘glx_enable_bits’
glxdri2.c:540: warning: passing argument 1 of ‘__glXGetExtensionString’ from incompatible pointer type
glxdri2.c:547: error: ‘__GLXDRIscreen’ has no member named ‘glx_enable_bits’
glxdri2.c:548: warning: passing argument 1 of ‘__glXGetExtensionString’ from incompatible pointer type
make[1]: *** [glxdri2.lo] Error 1
make[1]: Leaving directory `/GFX/build/component/Xorg/xorg/xserver/glx'
make: *** [all-recursive] Error 1
Comment 2 haihao 2008-09-02 19:07:18 UTC
You have to build dri2proto->mesa->X
Comment 3 liuhaien 2008-09-02 19:55:16 UTC
verified.
Comment 4 Denis Dzyubenko 2008-11-21 06:02:47 UTC
xserver doesn't compile with dri2
	../doltcompile gcc -DHAVE_CONFIG_H -I. -I../include -I../hw/xfree86/os-support -I../hw/xfree86/os-support/bus -I../hw/xfree86/common -I../hw/xfree86/dri -I../mi -I../hw/xfree86/dri2   -DHAVE_DIX_CONFIG_H -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/shad/xorg/include/pixman-1 -I/usr/include/freetype2    -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 -I/home/shad/xorg/include/drm -I/home/shad/xorg/include/X11/dri -DXFree86Server  -g -O2 -c -o glxdri2.lo glxdri2.c
glxdri2.c:72: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘*’ token
glxdri2.c:93: error: expected specifier-qualifier-list before ‘__DRIbuffer’
glxdri2.c: In function ‘__glXDRIbindTexImage’:
glxdri2.c:215: error: ‘__GLXDRIscreen’ has no member named ‘texBuffer’
glxdri2.c: In function ‘__glXDRIscreenCreateContext’:
glxdri2.c:304: error: ‘__GLXDRIscreen’ has no member named ‘dri2’
glxdri2.c: In function ‘__glXDRIscreenCreateDrawable’:
glxdri2.c:347: error: ‘__GLXDRIscreen’ has no member named ‘dri2’
glxdri2.c: At top level:
glxdri2.c:353: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
glxdri2.c:386: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘loaderExtension’
glxdri2.c:393: error: ‘loaderExtension’ undeclared here (not in a function)
glxdri2.c: In function ‘initializeExtensions’:
glxdri2.c:436: error: ‘__GLXDRIscreen’ has no member named ‘glx_enable_bits’
...
glxdri2.c:551: error: ‘__GLXDRIscreen’ has no member named ‘glx_enable_bits’
glxdri2.c:551: warning: passing argument 1 of ‘__glXGetExtensionString’ from incompatible pointer type
glxdri2.c:558: error: ‘__GLXDRIscreen’ has no member named ‘glx_enable_bits’
glxdri2.c:559: warning: passing argument 1 of ‘__glXGetExtensionString’ from incompatible pointer type
make[1]: *** [glxdri2.lo] Error 1
make[1]: Leaving directory `/home/shad/git/xorg/xserver/glx'
make: *** [all-recursive] Error 1
*** error during stage build of xserver: ########## Error running make   *** [55/55]
Comment 5 Michel Dänzer 2008-11-22 09:08:59 UTC
(In reply to comment #4)
> glxdri2.c:72: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or
> ‘__attribute__’ before ‘*’ token

Looks like your GL/internal/dri_interface.h is too old - it needs to be from current mesa Git master branch.
Comment 6 Denis Dzyubenko 2008-11-23 07:53:09 UTC
(In reply to comment #5)
> > glxdri2.c:72: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or
> > ‘__attribute__’ before ‘*’ token
> 
> Looks like your GL/internal/dri_interface.h is too old - it needs to be from
> current mesa Git master branch.

right, thanks. Mesa sources were correct, but were configured to install include headers to a wrong location.

Comment 7 liuhaien 2008-12-29 21:13:06 UTC
verified.


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.