Summary: | glext.h:4609: error: redefinition of typedef 'GLclampf' | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | blocker | ||
Priority: | medium | CC: | brianp |
Version: | git | Keywords: | regression |
Hardware: | x86-64 (AMD64) | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Remove duplicated typedefs
Log with build error from glsl_compiler Build fix |
Description
Vinson Lee
2013-06-27 05:26:59 UTC
9a14e412d6de93349a490a9c4534b52c3b524ee9 is the first bad commit commit 9a14e412d6de93349a490a9c4534b52c3b524ee9 Author: Brian Paul <brianp@vmware.com> 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 changed. The following extensions are new, however: GL_AMD_interleaved_elements GL_AMD_shader_trinary_minmax GL_IBM_static_data GL_INTEL_map_texture GL_NV_compute_program5 GL_NV_deep_texture3D GL_NV_draw_texture GL_NV_shader_atomic_counters GL_NV_shader_storage_buffer_object GL_NVX_conditional_render GL_OES_byte_coordinates GL_OES_compressed_paletted_texture GL_OES_fixed_point GL_OES_query_matrix GL_OES_single_precision And these extensions were removed: GL_FfdMaskSGIX GL_INGR_palette_buffer GL_INTEL_texture_scissor GL_SGI_depth_pass_instrument GL_SGIX_fog_scale GL_SGIX_impact_pixel_texture GL_SGIX_texture_select Reviewed-by: José Fonseca <jfonseca@vmware.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++" \ ./autogen.sh \ --prefix=/usr/local \ --with-dri-drivers="" \ --enable-gallium-llvm \ --enable-r600-llvm-compiler \ --with-gallium-drivers=r300 \ --with-llvm-prefix=/usr/local/llvm/3.3/release 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[4]: Entering directory `/home/steltho/mesa/src/mapi/shared-glapi' CC table.lo In file included from ../../../include/GL/gl.h:2085:0, from ../../../src/mapi/shared-glapi/glapi_mapi_tmp.h:11, from ../../../src/mapi/mapi_tmp.h:47, from ../../../src/mapi/table.c:55: ../../../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] Build fix 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 <brianp@vmware.com> Thanks. Fixed by Tom in commit bee49cb0ecbacb9fbc9dddc5e560874adacc518e |
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.