Problem 1217 - Build of G4OpenGL fails when both X11 and Qt components are enabled
Summary: Build of G4OpenGL fails when both X11 and Qt components are enabled
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: visualization/OpenGL (show other problems)
Version: other
Hardware: All All
: P3 major
Assignee: John.Allison
URL:
Depends on:
Blocks:
 
Reported: 2011-05-27 12:23 CEST by Ben Morgan
Modified: 2011-06-17 21:53 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Ben Morgan 2011-05-27 12:23:26 CEST
The current trunk (global revision 50120) of the visualization/OpenGL category, built against the global reference tag geant4-09-04-ref-04 fails to build both via Configure/Make and through CMake when the options to build OpenGL with X11 and Qt are both enabled. This is seen on both:

Linux, opensuse 11.3 x86_64, Qt 4.6.3
Mac OS X, Snow Leopard 10.6.7, Qt 4.7

The file causing the problem is G4OpenGLImmediateSceneHandler, which in this case fails with an error

[ 98%] Building CXX object source/visualization/OpenGL/CMakeFiles/G4OpenGL.dir/src/G4OpenGLImmediateSceneHandler.cc.o
In file included from /usr/include/QtCore/qnamespace.h:45:0,
                 from /usr/include/QtCore/qobjectdefs.h:45,
                 from /usr/include/QtGui/qwindowdefs.h:45,
                 from /usr/include/QtGui/qwidget.h:45,
                 from /usr/include/QtOpenGL/qgl.h:45,
                 from /sandbox/geant4/tags/geant4-09-04-ref-04/source/visualization/OpenGL/include/G4OpenGL.hh:68,
                 from /sandbox/geant4/tags/geant4-09-04-ref-04/source/visualization/OpenGL/include/G4OpenGLBitMapStore.hh:50,
                 from /sandbox/geant4/tags/geant4-09-04-ref-04/source/visualization/OpenGL/include/G4OpenGLSceneHandler.hh:43,
                 from /sandbox/geant4/tags/geant4-09-04-ref-04/source/visualization/OpenGL/include/G4OpenGLImmediateSceneHandler.hh:39,
                 from /sandbox/geant4/tags/geant4-09-04-ref-04/source/visualization/OpenGL/src/G4OpenGLImmediateSceneHandler.cc:45:
/usr/include/QtCore/qglobal.h:2067:1: error: redefinition of ‘class QTypeInfo<char>’
/usr/include/QtCore/qglobal.h:2066:1: error: previous definition of ‘class QTypeInfo<char>’



If the OpenGL Qt option is disabled, the build works perfectly. Both options work without problem on both platforms with the category tag opengl-V09-04-00.
This leads me to suspect an issue with G4OpenGL.hh

Cheers,

Ben.
Comment 1 Gabriele Cosmo 2011-05-30 09:26:56 CEST
I'm not sure what's the policy adopted by the vis group, but, please note that the main trunk of the repository (i.e. the HEAD) mail well FAIL to compile, as only TAGGED versions (proposed to testing and eventually successful) of the various modules are supposed to be used.
This is in general true for all categories.
Comment 2 Ben Morgan 2011-06-17 21:53:08 CEST
Resolved as of tag vis-V09-04-05

Tested on Linux and Mac as in previous comments, no observed issues.