Cmake end with an error message. [message #5527] |
Thu, 29 November 2007 11:12 |
Anonymous Poster
|
|
From: *ikp.kfa-juelich.de
|
|
Hello!
I am install new external packages at Jülich and now try to compile PandaRoot. But when I run cmake I have the following error:
sokolov@ikp156: cmake ../pandaroot
-- You're not using the GSI installation of the external packages.
-- If any problems occur this can be due to the fact that the macros
-- were mostly tested at GSI. If you find any problems please contact
-- f.uhlig@gsi.de
PATH: /home/kph/sokolov/bin/LINUX:.:/usr/local/ikp/bin:/opt/bin:/opt/bin:/usr/ bin:.:/home/kph/sokolov/bin:/home/kph/sokolov:/usr/local/bin:/usr/X11R6/ bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/local/insure/bin:/ usr/local/ikp/cern/pro/bin:/usr/local/ikp/root/bin:/home/kph/sokolov/gea nt4/bin/Linux-g++:/opt/pbs/bin:/home/sokolov/bin:/home/sokolov/bin/usr
-- Found root of the simulation software at /home/sokolov/fairroot/cbmsoft
Looking for external packages...
-- Looking for Root...
-- Looking for Root... - found /home/sokolov/fairroot/cbmsoft/tools/root/bin/root
-- Looking for Root... - version 5.17/05
-- Looking for Pluto...
-- Looking for Pluto... - found /home/sokolov/fairroot/cbmsoft/generators/lib
-- Looking for Pythia6...
-- Looking for Pythia6... - found /home/sokolov/fairroot/cbmsoft/generators/lib
-- Looking for GEANT3...
-- Looking for GEANT3... - found /home/kph/sokolov/fairroot/cbmsoft/transport/geant3/lib/tgt_linux/libgea nt321.so
-- New Version of GEANT3 with full GEANE support found.
-- Looking for GEANT4...
-- Looking for GEANT4... - found /home/sokolov/fairroot/cbmsoft/transport/geant4/lib/Linux-g++
-- Looking for GEANT4VMC...
-- Looking for GEANT4VMC... - found /home/sokolov/fairroot/cbmsoft/transport/geant4_vmc/lib/tgt_linux
-- Looking for VGM...
-- Looking for VGM... - found /home/sokolov/fairroot/cbmsoft/transport/vgm/lib/Linux-g++
-- Looking for CLHEP...
-- Looking for CLHEP... - found /home/sokolov/fairroot/cbmsoft/cern/clhep/lib
RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
CMake Error: Error in cmake code at
WRITE_TO_FILE:119:
IF had incorrect arguments: NOT "${unique_tmp}" MATCHES "(^|;)${l}(;|$)" (Regular expression " (^|;)/home/kph/sokolov/bin/LINUX:.:/usr/local/ikp/bin:/opt/bin:/opt/bin: /usr/bin:.:/home/kph/sokolov/bin:/home/kph/sokolov:/usr/local/bin:/usr/X 11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/local/insure/ bin:/usr/local/ikp/cern/pro/bin:/usr/local/ikp/root/bin:/home/kph/sokolo v/geant4/bin/Linux-g++:/opt/pbs/bin:/home/sokolov/bin:/home/sokolov/bin/ usr(;|$) " cannot compile).
Current CMake stack: /home/sokolov/fairroot/cbmsoft/pandaroot/CMakeLists.txt;/usr/local/ikp/s hare/cmake-2.4/Modules/CMakeCInformation.cmake;/usr/local/ikp/share/cmak e-2.4/Modules/CMakeCXXInformation.cmake
CMake Error: Error in cmake code at
WRITE_TO_FILE:121:
ENDIF An ENDIF command was found outside of a proper IF ENDIF structure. Or its arguments did not match the opening IF command.
Current CMake stack: /home/sokolov/fairroot/cbmsoft/pandaroot/CMakeLists.txt;/usr/local/ikp/s hare/cmake-2.4/Modules/CMakeCInformation.cmake;/usr/local/ikp/share/cmak e-2.4/Modules/CMakeCXXInformation.cmake
File name: config.sh
-- Configuring done
Obviously it happens inside the WriteConfigFile.cmake module, namely when UNIQUE macro is called. If I correctly understood this macro should exclude the repeating entries from the search path, isn't it? Probably something wrong with the pattern in the regular expression inside foreach loop.
Also its look like that there is a typo in the line number 75 in the WriteConfigFile.cmake, namely:
SET (PATH ${ROOTSYS}/bin ${PATH})
I think it should be
SET (PATH ${ROOTSYS}/bin:${PATH})
Best regards,
Andrey
|
|
|
|
Re: Cmake end with an error message. [message #5529 is a reply to message #5528] |
Thu, 29 November 2007 16:29 |
Anonymous Poster
|
|
From: *ikp.kfa-juelich.de
|
|
Hi Florian,
you are right. The entry /home/kph/sokolov/geant4/bin/Linux-g++ in the PATH cause an error.
Therefore I would suggest to modify the UNIQUE macro as following:
MACRO(UNIQUE var_name list)
#######################################################################
# Make the given list have only one instance of each unique element and
# store it in var_name.
#######################################################################
SET(unique_tmp "")
FOREACH(l ${list})
STRING(REGEX REPLACE "[+]" "\\\\+" l1 ${l})
IF(NOT "${unique_tmp}" MATCHES "(^|;)${l1}(;|$)")
SET(unique_tmp ${unique_tmp} ${l})
ENDIF(NOT "${unique_tmp}" MATCHES "(^|;)${l1}(;|$)")
ENDFOREACH(l)
SET(${var_name} ${unique_tmp})
ENDMACRO(UNIQUE)
It will screen each + symbol with \ and problem should disappear.
Also I would propose modify the WriteConfigFile.cmake as follow:
<skipped>
SET (PATH ${ROOTSYS}/bin:${PATH})
STRING(REGEX MATCHALL "[^:]+" PATH1 ${PATH})
MESSAGE("PATH :"${PATH1})
UNIQUE(PATH "${PATH1}")
CONVERT_LIST_TO_STRING(${PATH})
<skipped>
otherwise the is no sence to use UNIQUE macro at all.
Best regards,
Andrey
|
|
|
|
Re: Cmake end with an error message. [message #5538 is a reply to message #5537] |
Fri, 30 November 2007 12:49 |
Anonymous Poster
|
|
From: *ikp.kfa-juelich.de
|
|
Hi Florian,
Florian Uhlig wrote on Fri, 30 November 2007 09:07 | Hi Andrey
That you already come up with a solution for the UNIQUE macro
saves me a lot of work. Thanks for that.
|
You are always welcome.
Quote: |
Your second suggestion is not needed.
The SET commando
SET (PATH ${ROOTSYS}/bin ${PATH})
adds ${ROOTSYS}/bin to the already existing $PATH. The PATH is not the environment variable which seperates the entries with a ":", but an internal list in cmake
|
I see the problem. If you are in the GSI environment your path is defined like this:
IF(DEFINED ENV{PATH})
CLEAN_PATH_LIST("$ENV{PATH}" "${KEYWORDS}" PATH)
ENDIF(DEFINED ENV{PATH})
where PATH variable really contains the list of the all entries in the $ENV{PATH}. But if you are outside of the GSI the PATH variable is defined slightly different, namely:
ELSE(GSI)
MESSAGE("-- You're not using the GSI installation of the external packages.")
MESSAGE("-- If any problems occur this can be due to the fact that the macros")
MESSAGE("-- were mostly tested at GSI. If you find any problems please contact")
MESSAGE("-- f.uhlig@gsi.de")
SET(PATH $ENV{PATH})
#MESSAGE("PATH: ${PATH}")
ENDIF(GSI)
As you see now the PATH variable just contains the content of the $ENV{PATH}. Please put the both methods into correspondence.
By the way, the macro CLEAN_PATH_LIST already contains the cast of UNIQUE macro, so you shouldn't do this second time in the WriteConfigFile.cmake
Best regards,
Andrey
|
|
|
|