| Summary: | Filter /usr/include from include paths before creating geant4-config | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | suhl |
| Component: | cmake | Assignee: | Ben Morgan <Ben.Morgan> |
| Status: | CLOSED FIXED | ||
| Severity: | trivial | ||
| Priority: | P1 | ||
| Version: | 9.5 | ||
| Hardware: | All | ||
| OS: | All | ||
Marking as high priority for 9.6 release Fixed as of tag cmake-V09-05-69, will be in 9.6 |
Hi, I used cmake to configure geant4.9.5 on a linux system using the following options: cmake ../geant4.9.5 -DGEANT_USE_G3TOG4=ON -DGEANT4_USE_OPENGL_X11=ON -DCMAKE_INSTALL_PREFIX=../geant4.9.5-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_GDML=ON The geant4-config script then prints the following cflags: $ geant4-config -DG4INTY_USE_XT -I/usr/include -DG4VIS_USE_OPENGL -DG4UI_USE_TCSH -DG4VIS_USE_OPENGLX -I[…]/geant4.9.5-install/bin/../include/Geant4 -I/usr/include This cflags contain the /usr/include directory twice, once because I am using the X11 OpenGL visualizer, and the second time due to using GDML (or xerces). Having /usr/include in the include path is inconvenient for a number of reasons: 1.) as a default directory it is not required to be in the list of directories given to the compiler 2.) (depending on the order of options passed to the compiler) one cannot specify to use a library that is installed outside the system directories (outside /usr), if the same library is also installed in /usr, because the wrong header files might be used 3.) having /usr/include in the include path messes up the generation of dictionaries with ROOT's rootcint. Apparently here 1.) comes into play, as this program uses some modified versions of some STL headers, which are not used if the originals in /usr/include are found via the include path. Therefore I would ask to modify the generation of the geant4-config script in a way that the /usr/include directory does not end up in the printed cflags. Best regards, Sebastian