mesa: 9f3cfe6aafc210906be85de065afff7503ef240b (master)
In file included from ../../../include/GL/gl.h:2085,
../../../include/GL/glext.h:4609: error: redefinition of typedef 'GLclampf'
../../../include/GL/gl.h:161: error: previous declaration of 'GLclampf' was here
../../../include/GL/glext.h:5805: error: redefinition of typedef 'GLclampd'
../../../include/GL/gl.h:163: error: previous declaration of 'GLclampd' was here
9a14e412d6de93349a490a9c4534b52c3b524ee9 is the first bad commit
Author: Brian Paul <firstname.lastname@example.org>
Date: Tue Jun 25 10:35:37 2013 -0600
mesa: update glext.h to version 20130624
In glapi_priv.h we always need the typedef for the GLclampx type
since GL_OES_fixed_point is now defined in glext.h but the
GLclampx type is not. GLclampx is not used by anything in glext.h
but we need it for GL ES dispatch.
This is a huge patch because the structure of the file has been
The following extensions are new, however:
And these extensions were removed:
Reviewed-by: José Fonseca <email@example.com>
:040000 040000 21827509bbb51f9f51169a637e659e120753c009 ebe3c6da083247c5663c496e587cf8034002f702 M include
:040000 040000 9eae521b2b281ad6c23419d096afa1190f7604a3 b7658dcb83cfb7923a5621fb04a8bfab6e8e0833 M src
Hi Vinson, what compiler/version are you using? I've got gcc 4.7.2
I see that GLclampf and GLclampd are defined in both places, but I'm not seeing the error here.
I'll report the duplicated typedefs to the ARB.
I'm getting the same error as Vinson. I have gcc 4.5.3 (Gentoo 4.5.3-r1 p1.0, pie-0.4.5), and I'm using these configure flags:
CFLAGS=-g CC="gcc" CXX="g++" \
Tom, can you remove the GLclampf/GLclampd typedef lines from your glext.h and verify that clears things up? If so, let's just do that for now.
Created attachment 81568 [details] [review]
Remove duplicated typedefs
Here is the patch I'm using to remove the duplicate typedefs form glext.h This patch does not fix the build as it causes a build error when building the glsl_compiler.
I think you might be able to reproduce this glsl_compiler error with this patch no matter what version of gcc you are using. I will attach my build log as well.
Created attachment 81569 [details]
Log with build error from glsl_compiler
You removed the typedef for GLfixed from glext.h
What if you put that back?
(In reply to comment #7)
> You removed the typedef for GLfixed from glext.h
> What if you put that back?
I had to remove that too because it was also causing redefinition errors:
gmake: Entering directory `/home/steltho/mesa/src/mapi/shared-glapi'
In file included from ../../../include/GL/gl.h:2085:0,
../../../include/GL/glext.h:4379:15: error: redefinition of typedef 'GLfixed'
../../../src/mapi/shared-glapi/glapi_mapi_tmp.h:5:13: note: previous declaration of 'GLfixed' was here
OK, let's try removing line 731 from src/map/mapi_abi.py
<sigh> the Mesa dispatch code is such an incredibly convoluted mess </sigh>
(In reply to comment #2)
> Hi Vinson, what compiler/version are you using? I've got gcc 4.7.2
> I see that GLclampf and GLclampd are defined in both places, but I'm not
> seeing the error here.
> I'll report the duplicated typedefs to the ARB.
$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I do not see the error with GCC 4.6 and newer.
Created attachment 81574 [details] [review]
I had to remove GLfixed typedefs from a few other places, but Mesa now builds for me with this patch.
Your patch works for me and looks good, Tom. But the comment in glheader.h about GL_FIXED should be updated/removed too.
Feel free to commit/push.
Reviewed-by: Brian Paul <firstname.lastname@example.org>
Fixed by Tom in commit bee49cb0ecbacb9fbc9dddc5e560874adacc518e