GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Cmake end with an error message.
Cmake end with an error message. [message #5527] Thu, 29 November 2007 11:12 Go to next message
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 #5528 is a reply to message #5527] Thu, 29 November 2007 13:17 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi Andrey

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})

I think it really happens in the UNIQUE macro, i think the reason is the

/home/kph/sokolov/gea nt4/bin/Linux-g++

in your $PATH. This is not correctly interpreted with the regular
expression. The SET command is correct.

Can you please try to exclude the directory from your PATH before runing cmake and please report if it is running.

Ciao

Florian
Re: Cmake end with an error message. [message #5529 is a reply to message #5528] Thu, 29 November 2007 16:29 Go to previous messageGo to next message
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 #5537 is a reply to message #5529] Fri, 30 November 2007 09:07 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi Andrey

That you already come up with a solution for the UNIQUE macro
saves me a lot of work. Thanks for that.

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

The commando

UNIQUE(PATH "${PATH1}")

takes this list and returns a list where all entries are unique.
This list is then given to the command

CONVERT_LIST_TO_STRING(${PATH})

which converts the list to a string and returns this string in the variable ${output}.

Ciao

Florian
Re: Cmake end with an error message. [message #5538 is a reply to message #5537] Fri, 30 November 2007 12:49 Go to previous messageGo to next message
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. Wink

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

Re: Cmake end with an error message. [message #5539 is a reply to message #5538] Fri, 30 November 2007 13:07 Go to previous message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi Andrey

Done

Ciao

Florian
Previous Topic: simulation does not work with G4 for ROOT files with geometry
Next Topic: Bug in Drc
Goto Forum:
  


Current Time: Sun Apr 28 11:54:06 CEST 2024

Total time taken to generate the page: 0.00881 seconds