Message: Re: G4 OpenGL module compilation broken on Linux Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: G4 OpenGL module compilation broken on Linux 

Forum: Installation and Configuration
Re: Question G4 OpenGL module compilation broken on Linux (Jeremy McCormick)
Date: 16 Aug, 2016
From: Jeremy McCormick <Jeremy McCormick>

I think I figured out what is going wrong here. It seems to be some kind of minor inconsistency in the build system.

When you define this CMake variable then the G4OpenGL module compiles fine...


However, if this definition is left out of the cmake command line the G4OpenGL module will fail to compile.

This is because of the following macro definitions in G4OpenGL.hh

#  include <GL/gl.h>

#    include <GL/gl.h>

With no CMake command line argument it looks like G4VIS_BUILD_OPENGL_DRIVER is defined but then neither G4VIS_BUILD_OPENGLX_DRIVER or G4VIS_BUILD_OPENGLXM_DRIVER are set. This means that 'GL/gl.h' is never included here, and so subsequent compilation steps in the module will fail when they use definitions from that standard header.

So I think what needs to be done in the build system is that 'GL/gl.h' should be included when building the driver, and the second macro checks shouldn't be necessary (I don't believe GL/gl.h has anything to do with X Windows unless I'm mistaken).

Or the entire G4OpenGL module should just be disabled here.

As it is currently setup, there is an error in the build when no CMake flags are given on the command line due to this problem.

 Add Message Add Message
to: "Re: G4 OpenGL module compilation broken on Linux"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]