Bug 30205 - [bisected] mesa fail to build with GLES support
Summary: [bisected] mesa fail to build with GLES support
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: high critical
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-15 01:51 UTC by zhao jian
Modified: 2010-09-16 02:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description zhao jian 2010-09-15 01:51:16 UTC
System Environment:
--------------------------
Platform:   piketon pineview 
Mesa: (master) 7993832c12bba578010005b344dcd3817be84a42
 
Bug detailed description:
-------------------------
With the newest code in both master branch and 7.9 branch, mesa will fail to build with gles1 or gles2 enabled with following error message. And I bisected it and found it was caused by commit 7993832c12bba578010005b344dcd3817be84a42. 

commit 7993832c12bba578010005b344dcd3817be84a42
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Sep 14 09:37:35 2010 -0600

    mesa: update to version 64 of GL/glext.h

    A number of other files had to be updated as well because const
    qualifiers were added to the glMultiDrawArrays() function.
    Also, GL_FIXED is now defined in glext.h.

gcc -c -I../../../include -I../../../src/mapi/es1api -I../../../src/mapi -I../../../src/mesa -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing  -fPIC  -DUSE_X86_64_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XCB_DRI2 -DHAVE_XEXTPROTO_71 ../../../src/mapi/glapi/glapi_dispatch.c -o glapi_dispatch.o
In file included from ../../../src/mapi/glapi/glapi_dispatch.c:41:
../../../src/mapi/es1api/glapi/glapitable.h:459: error: expected ‘)’ before ‘x’
../../../src/mapi/es1api/glapi/glapitable.h:460: error: expected ‘;’ before ‘void’
gmake[2]: *** [glapi_dispatch.o] Error 1
gmake[2]: Leaving directory `/home/GFX_of_64_sdc1/build/component/Mesa/mesa/src/mapi/es1api'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/GFX_of_64_sdc1/build/component/Mesa/mesa/src'
make: *** [default] Error 1

Reproduce steps:
----------------
1. ./autogen --prefix=/opt/X11R7 --enable-gles1 (or --enable-gles2)
2. make
Comment 1 Chia-I Wu 2010-09-15 02:58:32 UTC
Thanks for reporting.  It should have been fixed by cad87ebc3a9c176a44f5193af7e16d6ecad4e03f.
Comment 2 Francesco Marella 2010-09-15 04:26:13 UTC
Still doesn't build without this patch http://pastebin.com/8NA2snk4 on top of cad87ebc3a9c176a44f5193af7e16d6ecad4e03f
Comment 3 Chia-I Wu 2010-09-15 06:21:57 UTC
(In reply to comment #2)
> Still doesn't build without this patch http://pastebin.com/8NA2snk4 on top of
> cad87ebc3a9c176a44f5193af7e16d6ecad4e03f
My build is ok with or without this patch.  But still, it fixes an error in GLAPI ES.  Thanks for the patch.

[Closing the bug, but always feel free to reopen it if there are still issues]
Comment 4 Brian Paul 2010-09-15 06:58:07 UTC
The OpenGL ES header files still don't have const qualifiers on the glMultiDrawArrays() pointer parameters so I think that will lead to some compilation warnings/errors somewhere.

I'd be OK w/ editing the ES header files to add the const qualifier so the function signature is uniform everywhere.
Comment 5 Chia-I Wu 2010-09-15 22:24:41 UTC
(In reply to comment #4)
> The OpenGL ES header files still don't have const qualifiers on the
> glMultiDrawArrays() pointer parameters so I think that will lead to some
> compilation warnings/errors somewhere.
Since the prototypes in ES headers are never used, it should be fine.  Though I have to update APIspec.xml so that we consistently use the version with const qualifier internally.
> I'd be OK w/ editing the ES header files to add the const qualifier so the
> function signature is uniform everywhere.
It is likely that I will forget to add the const qualifier again when I update the ES headers.  I am skipping this part for the reason above.
Comment 6 zhao jian 2010-09-15 23:39:26 UTC
It is still fail on 7.9 branch. Can you cherry pick the fixes to 7.9 branch?
Comment 7 Chia-I Wu 2010-09-16 00:53:14 UTC
I've cherry-picked them.  Any commit missing?
Comment 8 zhao jian 2010-09-16 02:27:05 UTC
(In reply to comment #7)
> I've cherry-picked them.  Any commit missing?

No missing. It now works with the newest code. Thanks!


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.