Message: Re: OPENGL_INCLUDE_DIR error during install Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: OPENGL_INCLUDE_DIR error during install 

Forum: Installation and Configuration
Re: Question OPENGL_INCLUDE_DIR error during install (MYTHRA VARUN NEMALLAPUDI)
Re: None Re: OPENGL_INCLUDE_DIR error during install (John Allison)
Re: None Re: OPENGL_INCLUDE_DIR error during install (MYTHRA VARUN NEMALLAPUDI)
Re: None Re: OPENGL_INCLUDE_DIR error during install (John Allison)
Date: 09 Feb, 2014
From: Sam Blake <Sam Blake>

Hi Mythra & John,

Not sure if you've already resolved this issue, but this morning I came across the exact same problem when trying to install Geant4 v10 on a Macbook Air running Mavericks (OSX 10.9.1). I believe I've found the cause of the problem and a solution.

My (very limited) understanding is that Apple made some changes in Mavericks that include, among other things, a relocation of the OpenGL libraries that are needed for Geant4 applications using this type of visualization. Setting the cmake flag -DGEANT4_USE_OPENGL_X11=ON correctly tells cmake to build the OpenGL libraries, but because they've been moved to a new directory in Mavericks Geant4 can't find them and, consequently, you get the error described as:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENGL_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /Users/mahathi/Documents/Software/geant4.10.00/source/visualization/externals/gl2ps
   used as include directory in directory /Users/mahathi/Documents/Software/geant4.10.00/source/visualization/OpenGL

You should be able to see the file CMakeCache.txt file in your build directory which stores several variables (including one that points to the directory containing the OpenGL headers) needed for cmake. After receiving the above error, if you open the CMakeCache.txt file and search for the variable OPENGL_INCLUDE_DIR:PATH, you'll see that it's been set to:

//Include for OpenGL on OSX OPENGL_INCLUDE_DIR:PATH=OPENGL_INCLUDE_DIR-NOTFOUND

and this is causing the error. After some digging, I found a forum post (link: https://github.com/parrot/parrot/issues/1016) that gives the new directory for the OpenGL headers in Mavericks as /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Headers (you can check yourself in Finder that this directory contains the key header files gcl.h and OpenCL.h). So, if you change the variable OPENGL_INCLUDE_DIR:PATH in CMakeCache.txt to point to this directory and then run cmake, the OpenGL libraries will be found correctly. So, change this variable to say:

//Include for OpenGL on OSX OPENGL_INCLUDE_DIR:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Headers

Now, run cmake again (as you did before) and you shouldn't see this error message anymore. Continue following the installation procedure by running -make in the build directory, followed by -make install, and everything should work just fine. Rebuild the application you want to run, and you should be able to use the OpenGL visualization now.

Hopefully this helps - please confirm whether or not this solves the problem. If you encounter any more errors (hopefully not!) please post them below.

Cheers, Sam

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: OPENGL_INCLUDE_DIR error during install   (MYTHRA VARUN NEMALLAPUDI - 09 Feb, 2014)
1 Ok: Re: OPENGL_INCLUDE_DIR error during install   (Sam Blake - 09 Feb, 2014)
2 None: Re: OPENGL_INCLUDE_DIR error during install   (Pete Wu - 09 Feb, 2014)
1 None: Re: OPENGL_INCLUDE_DIR error during install   (Sam Blake - 09 Feb, 2014)
(_ None: Re: OPENGL_INCLUDE_DIR error during install   (Pete Wu - 09 Feb, 2014)
(_ Idea: Re: OPENGL_INCLUDE_DIR error during install   (Sam Blake - 09 Feb, 2014)
 Add Message Add Message
to: "Re: OPENGL_INCLUDE_DIR error during install"

 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 ]