Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 41039 thirdparty GL header conflicts with my system GL header.
Starred by 7 users Reported by kuh...@gmail.com, Apr 10, 2010 Back to list
Status: Fixed
Owner: apatrick@chromium.org
Closed: Apr 2010
Cc: kbr@chromium.org, pimant...@gmail.com, apatrick@chromium.org
OS: ----
Pri: 2
Type: Bug

Restricted
  • Only users with Commit permission may comment.


Sign in to add a comment
svn version 44191 failed to compile on my ubuntu linux 8.10.
maybe chromium thirdparty GL header conflicts with my system GL  header.
how can i fix this redefinition error? 




ommand_buffer_service/gpu/command_buffer/service/buffer_manager.o 
gpu/command_buffer/service/buffer_manager.cc
In file included from ./gpu/command_buffer/service/gl_utils.h:59,
                 from ./gpu/command_buffer/service/buffer_manager.h:13,
                 from gpu/command_buffer/service/buffer_manager.cc:5:
/usr/include/GL/glx.h:168: error: ‘XVisualInfo* 
__glewXChooseVisual(Display*, int, int*)’ redeclared as different kind of 
symbol
third_party/glew/include/GL/glxew.h:1214: error: previous declaration of 
‘XVisualInfo* (* __glewXChooseVisual)(Display*, int, int*)’
/usr/include/GL/glx.h:171: error: ‘void __glewXCopyContext(Display*, 
__GLXcontextRec*, __GLXcontextRec*, long unsigned int)’ redeclared as 
different kind of symbol
third_party/glew/include/GL/glxew.h:1220: error: previous declaration of 
‘void (* __glewXCopyContext)(Display*, __GLXcontextRec*, __GLXcontextRec*, 
GLulong)’
/usr/include/GL/glx.h:174: error: ‘__GLXcontextRec* 
__glewXCreateContext(Display*, XVisualInfo*, __GLXcontextRec*, int)’ 
redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1217: error: previous declaration of 
‘__GLXcontextRec* (* __glewXCreateContext)(Display*, XVisualInfo*, 
__GLXcontextRec*, int)’
/usr/include/GL/glx.h:177: error: ‘GLXPixmap 
__glewXCreateGLXPixmap(Display*, XVisualInfo*, Pixmap)’ redeclared as 
different kind of symbol
third_party/glew/include/GL/glxew.h:1215: error: previous declaration of 
‘GLXPixmap (* __glewXCreateGLXPixmap)(Display*, XVisualInfo*, Pixmap)’
/usr/include/GL/glx.h:179: error: ‘void __glewXDestroyContext(Display*, 
__GLXcontextRec*)’ redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1218: error: previous declaration of 
‘void (* __glewXDestroyContext)(Display*, __GLXcontextRec*)’
/usr/include/GL/glx.h:181: error: ‘void __glewXDestroyGLXPixmap(Display*, 
GLXPixmap)’ redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1216: error: previous declaration of 
‘void (* __glewXDestroyGLXPixmap)(Display*, GLXPixmap)’
/usr/include/GL/glx.h:184: error: ‘int __glewXGetConfig(Display*, 
XVisualInfo*, int, int*)’ redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1213: error: previous declaration of 
‘int (* __glewXGetConfig)(Display*, XVisualInfo*, int, int*)’
/usr/include/GL/glx.h:186: error: ‘__GLXcontextRec* 
__glewXGetCurrentContext()’ redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1222: error: previous declaration of 
‘__GLXcontextRec* (* __glewXGetCurrentContext)()’
/usr/include/GL/glx.h:188: error: ‘GLXDrawable __glewXGetCurrentDrawable()’ 
redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1223: error: previous declaration of 
‘GLXDrawable (* __glewXGetCurrentDrawable)()’
/usr/include/GL/glx.h:190: error: ‘int __glewXIsDirect(Display*, 
__GLXcontextRec*)’ redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1219: error: previous declaration of 
‘int (* __glewXIsDirect)(Display*, __GLXcontextRec*)’
/usr/include/GL/glx.h:193: error: ‘int __glewXMakeCurrent(Display*, 
GLXDrawable, __GLXcontextRec*)’ redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1221: error: previous declaration of 
‘int (* __glewXMakeCurrent)(Display*, GLXDrawable, __GLXcontextRec*)’
/usr/include/GL/glx.h:195: error: ‘int __glewXQueryExtension(Display*, 
int*, int*)’ redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1211: error: previous declaration of 
‘int (* __glewXQueryExtension)(Display*, int*, int*)’
/usr/include/GL/glx.h:197: error: ‘int __glewXQueryVersion(Display*, int*, 
int*)’ redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1212: error: previous declaration of 
‘int (* __glewXQueryVersion)(Display*, int*, int*)’
/usr/include/GL/glx.h:199: error: ‘void __glewXSwapBuffers(Display*, 
GLXDrawable)’ redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1226: error: previous declaration of 
‘void (* __glewXSwapBuffers)(Display*, GLXDrawable)’
/usr/include/GL/glx.h:201: error: ‘void __glewXUseXFont(Font, int, int, 
int)’ redeclared as different kind of symbol
third_party/glew/include/GL/glxew.h:1227: error: previous declaration of 
‘void (* __glewXUseXFont)(Font, int, int, int)’
/usr/include/GL/glx.h:203: error: ‘void __glewXWaitGL()’ redeclared as 
different kind of symbol
third_party/glew/include/GL/glxew.h:1224: error: previous declaration of 
‘void (* __glewXWaitGL)()’
/usr/include/GL/glx.h:205: error: ‘void __glewXWaitX()’ redeclared as 
different kind of symbol
third_party/glew/include/GL/glxew.h:1225: error: previous declaration of 
‘void (* __glewXWaitX)()’
/usr/include/GL/glx.h:342: error: conflicting declaration ‘typedef struct 
GLXPbufferClobberEvent GLXPbufferClobberEvent’
third_party/glew/include/GL/glxew.h:296: error: ‘GLXPbufferClobberEvent’ 
has a previous declaration as ‘typedef struct GLXPbufferClobberEvent 
GLXPbufferClobberEvent’
/usr/include/GL/glx.h:344: error: redefinition of ‘union __GLXEvent’
third_party/glew/include/GL/glxew.h:297: error: previous definition of 
‘union __GLXEvent’
/usr/include/GL/glx.h:347: error: invalid type in declaration before ‘;’ 
token
/usr/include/GL/glx.h:347: error: conflicting declaration ‘typedef int 
GLXEvent’
third_party/glew/include/GL/glxew.h:300: error: ‘GLXEvent’ has a previous 
declaration as ‘typedef union __GLXEvent GLXEvent’
make: *** 
[out/Release/obj.target/command_buffer_service/gpu/command_buffer/service/b
uffer_manager.o] error 1

 
Comment 1 by den.so...@gmail.com, Apr 10, 2010
got same error too,
Gentoo x86_64
Comment 2 by yast...@gmail.com, Apr 11, 2010
got same error too, Archlinux i686, NVIDIA driver 195.36.15
Comment 3 by drne...@gmail.com, Apr 11, 2010
Same on Ubuntu 9.10 32-bit with NVIDIA driver 185.18.36
Comment 4 by scop...@gmail.com, Apr 12, 2010
I also got this error on Gentoo x86_64
Comment 5 by xtro...@gmail.com, Apr 13, 2010
Adding 
#define __glx_h__

around line 92 of third_party/glew/include/GL/glxew.h fixes the compilation issue
Comment 6 by danibb...@gmail.com, Apr 14, 2010
Same on Ubuntu 9.10 64-bit with NVIDIA driver 190.53
Following the instructions from xtrochu fixed the compilation
Comment 7 by kbr@chromium.org, Apr 22, 2010
Comment 8 by piman...@gmail.com, Apr 22, 2010
Files in chrome should never include <GL/glx.h> or <GL/gl.h> directly, everything 
should go through GLEW.
Comment 9 by apatrick@chromium.org, Apr 22, 2010
Status: Started
Status: Fixed
Fixed at r45338.
Patch: http://codereview.chromium.org/download/issue1714004_1.diff

Comment 11 by bugdro...@gmail.com, Apr 23, 2010
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=45338 

------------------------------------------------------------------------
r45338 | apatrick@chromium.org | 2010-04-22 12:11:23 -0700 (Thu, 22 Apr 2010) | 7 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/gpu/command_buffer/service/gl_utils.h?r1=45338&r2=45337

Removed direct inclusion of GL headers from gl_utils.h.
Now they are included indirectly via glew.
This caused a problem for some people building for linux.
TEST=trybots
BUG= 41039 

Review URL: http://codereview.chromium.org/1714004
------------------------------------------------------------------------

Comment 12 by yast...@gmail.com, Apr 25, 2010
Crashes with mentioned patch (offisial according to the r45338). Still needs adding 
#define __glx_h__ 
around line 92 of third_party/glew/include/GL/glxew.h
I believe the bug is in glew. Somebody already kindly posted a bug on the glew bug 
tracker. The fix mentioned in comment 12 here might help. Otherwise the fix mentioned 
on the glew tracker might help:

http://sourceforge.net/tracker/?func=detail&aid=2992222&group_id=67586&atid=523274

I am wary of fixing it in Chrome's copy of glew because I can't reproduce the issue.
Comment 14 by nigels....@gmail.com, Apr 27, 2010
A fix for this has gone into GLEW svn.  A new release is expected soon.
Thanks for reporting this on the GLEW bug tracker.

http://sourceforge.net/tracker/index.php?func=detail&aid=2992222&group_id=67586&atid=523274
Comment 15 by bugdro...@gmail.com, Apr 28, 2010
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=45827 

------------------------------------------------------------------------
r45827 | apatrick@chromium.org | 2010-04-28 10:56:32 -0700 (Wed, 28 Apr 2010) | 8 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/third_party/glew/include/GL/glxew.h?r1=45827&r2=45826

Merged in fixes for GLEW compile errors on linux.
GLEW patch: http://glew.svn.sourceforge.net/viewvc/glew?view=rev&revision=596
GLEW bug: http://sourceforge.net/tracker/index.php?func=detail&aid=2992222&group_id=67586&atid=523274

TEST=trybots
BUG= 41039 

Review URL: http://codereview.chromium.org/1727010
------------------------------------------------------------------------

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=54506 

------------------------------------------------------------------------
r54506 | nsylvain@chromium.org | 2010-08-01 12:36:36 -0700 (Sun, 01 Aug 2010) | 11 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/375/src/third_party/glew/include/GL/glxew.h?r1=54506&r2=54505

Merge 45827 - Merged in fixes for GLEW compile errors on linux.
GLEW patch: http://glew.svn.sourceforge.net/viewvc/glew?view=rev&revision=596
GLEW bug: http://sourceforge.net/tracker/index.php?func=detail&aid=2992222&group_id=67586&atid=523274

TEST=trybots
BUG= 41039 

Review URL: http://codereview.chromium.org/1727010

TBR=apatrick@chromium.org
Review URL: http://codereview.chromium.org/3014046
------------------------------------------------------------------------

Project Member Comment 17 by bugdroid1@chromium.org, Oct 12, 2012
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member Comment 18 by bugdroid1@chromium.org, Mar 11, 2013
Labels: -Area-Undefined
Sign in to add a comment