GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Using cmake
Using cmake [message #4504] Fri, 15 June 2007 15:07 Go to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: 141.30.85*
Here is a short note for you how to use the cmake:


A New build:

You starting point are the complete external packages and the source of pandaroot. It should look like this:

...fairroot/cbmsoft> ls
cern configure.sh generators pandaroot SetEnv.sh tools transport


Now set the SIMPATH variabele, like:
cbmsoft/export SIMPATH=$PWD

Make an empty build directory. (name it as you want to)
cbmsoft>mkdir cbuild
cbmsoft>cd cbuild

Generate the makefiles. (this replaces the reconf and configure from the automake-based way)
cbmsoft/cbuild>cmake ../pandaroot

Load the local enviroment.
cbmsoft/cbuild>. config.sh

Begin compiling:
cbmsoft/cbuild>make install

Notes:
To run your macros on this build you have to load the cbuild/config.sh

[Edit: Mohammeds suggestion on the simpath added.]

[Updated on: Mon, 16 July 2007 13:02]

Report message to a moderator

Re: Using cmake [message #4508 is a reply to message #4504] Mon, 18 June 2007 08:38 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hi,

you do not really need the SetEnv.sh any more, all you need is the SIMPATH, So you can do
export SIMPATH=(path to external packages i.e. cbmsoft/)
then continue as Ralf described:

cbmsoft/cbuild>cmake ../pandaroot

Load the local enviroment.
cbmsoft/cbuild>. config.sh

Begin compiling:
cbmsoft/cbuild>make install


Notes
To run your macros on this build you have to load the cbuild/config.sh
Re: Using cmake [message #4529 is a reply to message #4504] Thu, 21 June 2007 14:47 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Dear Ralf,

on my PC the described procedure to use cmake is not working. I always get the following error messages (just the beginning):

-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/Experimental
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/Nightly
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/Continuous
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/NightlyMemoryC heck
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/NightlyStart
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/NightlyUpdate
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/NightlyConfigu re
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/NightlyBuild
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/NightlyTest
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/NightlyCoverag e
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/NightlyMemChec k
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/NightlySubmit
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ExperimentalSt art
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ExperimentalUp date
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ExperimentalCo nfigure
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ExperimentalBu ild
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ExperimentalTe st
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ExperimentalCo verage
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ExperimentalMe mCheck
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ExperimentalSu bmit
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ContinuousStar t
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ContinuousUpda te
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ContinuousConf igure
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ContinuousBuil d
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ContinuousTest
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ContinuousCove rage
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ContinuousMemC heck
CMake Error: Could not get source file entry for /home/kph/kph/stockman/fairroot/cbmsoft/cbuild/CMakeFiles/ContinuousSubm it
-- 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
-- Found root of the simulation software at /home/kph/stockman/fairroot/cbmsoft
-- Found ROOT version "5.14/00" at "/home/kph/kph/stockman/fairroot/cbmsoft/tools/root"
-- Found GEANT3: /home/kph/kph/stockman/fairroot/cbmsoft/transport/geant3/lib/tgt_linux/l ibgeant321.so
-- Found PLUTO: /home/kph/stockman/fairroot/cbmsoft/generators/lib
-- Found Generators: /home/kph/stockman/fairroot/cbmsoft/generators/lib
-- Found GEANT4: /home/kph/stockman/fairroot/cbmsoft/transport/geant4/lib/Linux-g++
-- Found GEANT4VMC: /home/kph/stockman/fairroot/cbmsoft/transport/geant4_vmc/lib/tgt_linux
-- Found CLHEP: /home/kph/stockman/fairroot/cbmsoft/cern/clhep/lib
CMake Error: Error in cmake code at
/home/kph/kph/stockman/fairroot/cbmsoft/pandaroot/CMakeLists.txt:86:
ADD_SUBDIRECTORY not given a binary directory but the given source directory "/home/kph/kph/kph/stockman/fairroot/cbmsoft/pandaroot/base" is not a subdirectory of "/home/kph/kph/stockman/fairroot/cbmsoft/pandaroot". When specifying an out-of-tree source a binary directory must be explicitly specified.
Current CMake stack: /home/kph/kph/stockman/fairroot/cbmsoft/pandaroot/CMakeLists.txt;/usr/lo cal/ikp/share/cmake-2.4/Modules/CMakeCInformation.cmake;/usr/local/ikp/s hare/cmake-2.4/Modules/CMakeCXXInformation.cmake

I hope somebody has an idea what the reason for this error is.

Thank you.

Tobias
Re: Using cmake [message #4539 is a reply to message #4529] Fri, 22 June 2007 19:35 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 Tobias

I haven't seen anything like this error messages before.
I have no good idea what this could be so i only can guess.

Which version of cmake do you use?
You need at least version 2.4.3?

How old is your local copy of pandaroot?

If i interpret the error messages correctly your pandaroot
instllation is in the same directory as the external packages. Is this correct?
Can you try to install pandaroot somewhere else and try again.

How did you install cmake? On your own or did you use a tool provided by your linux distribution?

Up to now this are only questions and no answers, but i have first to understand what is going on.

Ciao

Florian
Re: Using cmake [message #4546 is a reply to message #4539] Mon, 25 June 2007 09:44 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Hi Florian,

I could partly solve the problem. Somehow the LD_LIBRARY_PATH variable was modified during compilation and all the path values pointed to an very old version. After rebooting my Linux system (I always thought that this only helps on Windows machines Wink) cmake finishes now without errors. Unfortunately make still does not work. It stops immediately with the following error message:

Building CXX object base/CMakeFiles/Base.dir/CbmBaseContFact.o
cc1plus: error: unrecognized command line option "-ffriend-injection"
make[2]: *** [base/CMakeFiles/Base.dir/CbmBaseContFact.o] Error 1
make[1]: *** [base/CMakeFiles/Base.dir/all] Error 2
make: *** [all] Error 2


I am using cmake 2.4.6. This was installed from my SysAdmin on our local workstation cluster.

My local copy of pandaroot is at rev. 950.

I hope you have an idea what the reason for this problem is.

Ciao

Tobias
Re: Using cmake [message #4547 is a reply to message #4546] Mon, 25 June 2007 10:35 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 Tobias

I think this problem i now well, since we had it on friday with
cbm.
If i am correct you have a compiler version 4.0.? . If this is the case please update the main CMakeLists.txt.

The problem is that compiler flag -ffriend-injection is only known and needed from gcc version 4.1.0 I thought the flag is
also needed for version 4.0.?, so i had an error in the check.
This is corrected in SVN since revision 985.

Ciao

Florian
icon14.gif  Re: Using cmake [message #4550 is a reply to message #4547] Mon, 25 June 2007 11:44 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Dear Florian,

the problem is fixed now. I updated to rev. 985 and it compiles.

Thank you for your help!

Tobias
Re: Using cmake [message #4551 is a reply to message #4550] Mon, 25 June 2007 12:01 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 Tobias

Nice to hear that everything works fine now.

Ciao

Florian

Error when calling config.sh [message #4569 is a reply to message #4504] Tue, 26 June 2007 14:33 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Hi! I observe the following bug. Can anyone help me, please?

sneubert@darjeeling:~/scratch/PANDA/FAIRRoot/cbuildDev$ cmake ../pandarootDev/
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- 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
-- Found root of the simulation software at /afs/e18/panda/SIM/FAIRRoot/cbmsoft
-- Looking for Root...
-- Looking for Root... - found /afs/e18/panda/SIM/FAIRRoot/cbmsoft/tools/root/bin/root
-- Looking for Root... - version 5.14/00
-- Looking for GEANT3...
-- Looking for GEANT3... - found /afs/e18/panda/SIM/FAIRRoot/cbmsoft/transport/geant3/lib/tgt_linux/libge ant321.so
-- Looking for Pluto...
-- Looking for Pluto... - found /afs/e18/panda/SIM/FAIRRoot/cbmsoft/generators/lib
-- Looking for Pythia6...
-- Looking for Pythia6... - found /afs/e18/panda/SIM/FAIRRoot/cbmsoft/generators/lib
-- Looking for GEANT4...
-- Looking for GEANT4... - found /afs/e18/panda/SIM/FAIRRoot/cbmsoft/transport/geant4/lib/Linux-g++
-- Looking for GEANT4VMC...
-- Looking for GEANT4VMC... - found /afs/e18/panda/SIM/FAIRRoot/cbmsoft/transport/geant4_vmc/lib/tgt_linux
-- Looking for VGM...
-- Looking for VGM... - found /afs/e18/panda/SIM/FAIRRoot/cbmsoft/transport/vgm.2.08.04/lib/Linux-g++
-- Looking for CLHEP...
-- Looking for CLHEP... - found /afs/e18/panda/SIM/FAIRRoot/cbmsoft/cern/clhep/lib
-- Configuring done
-- Generating done
-- Build files have been written to: /afs/e18/user/sneubert/scratch/PANDA/FAIRRoot/cbuildDev
sneubert@darjeeling:~/scratch/PANDA/FAIRRoot/cbuildDev$ . config.sh
bash: GEANT4_DIR-NOTFOUND/env.sh: No such file or directory


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Error when calling config.sh [message #4571 is a reply to message #4569] Tue, 26 June 2007 14:52 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 Sebastian

There is a file missing/at the wrong place in your GEANT4 installation. In the subdirectory transport/geant4 below $SIMPATH the file env.sh is missing. Copy the file from transport/geant4/source to transport/geant4.
Then everything should work.

Ciao

Florian
Re: Error when calling config.sh [message #4573 is a reply to message #4571] Tue, 26 June 2007 15:10 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *6-87-r.retail.telecomitalia.it
Hello,
I had this problem several weeks ago,
maybe something worng is happening in the installation of external packages.
The next (if we will ever have a next release of external packages) release should fix this problem, I don't know in which machines it does happen (with my gentoo for sure).
Re: Using cmake [message #4575 is a reply to message #4504] Tue, 26 June 2007 16:14 Go to previous message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Thank you guys!

Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Previous Topic: More than one working copy
Next Topic: Discussion Coding rules, Quality Assurance and Control
Goto Forum:
  


Current Time: Tue May 21 06:41:08 CEST 2024

Total time taken to generate the page: 0.00887 seconds