GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » CBM » CBMROOT » General » New safety feature
New safety feature [message #8359] Thu, 30 April 2009 14:13 Go to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi

Since more and more people run into the problem that they compile CbmRoot on one platform and then accidentally run the macros on another platform i put a new safety feature to CbmRoot
which should avoid this type of problems.

When runing cmake information about the OS is put to the config script. During execution of the config script it is automatically checked if the run system is the same as the compile system. In cases were the systems are different the execution of the script is stoped and you will see an error message.

If you find some problems with the new behaviour of the configure script please let me know.

Ciao

Florian
icon7.gif  It works! [message #8417 is a reply to message #8359] Tue, 05 May 2009 17:19 Go to previous messageGo to next message
Volker Friese is currently offline  Volker Friese
Messages: 365
Registered: April 2004
Location: GSI CBM
first-grade participant
From: *gsi.de
Note that you have to rerun cmake on your existing installation in order to use the new safety feature.

I tested it and it works (installation on sarge32, attempted to run on etch32):

friese@lxetch32:/misc/friese> . cbmroot/dev/sarge32/config.sh
On this machine the G4SYSTEM=Linux-g++
On this machine the G4INSTALL=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4
On this machine the G4INCLUDE=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4/include/
On this machine the G4LIB=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4/lib
On this machine the G4LEVELGAMMADATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/PhotonEvaporation
On this machine the G4RADIOACTIVEDATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/RadioactiveDecay
On this machine the G4LEDATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4EMLOW
On this machine the NeutronHPCrossSections=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4NDL
On this machine the G4ELASTICDATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4ELASTIC
On this machine the G4ABLADATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4ABLA
On this machine the CLHEP_BASE_DIR=/misc/cbmsoft/Sarge32/jul08/fairsoft/cern/clhep
On this machine the CLHEP_INCLUDE_DIR=/misc/cbmsoft/Sarge32/jul08/fairsoft/cern/clhep/include
On this machine the CLHEP_LIB_DIR=/misc/cbmsoft/Sarge32/jul08/fairsoft/cern/clhep/lib
On this machine the CLHEP_LIB=CLHEP
On this machine the G4DEBUG=1
On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=1
On this machine the G4VIS_USE_RAYTRACERX=1
On this machine the G4VIS_USE_VRML=1
On this machine the G4LIB_BUILD_G3TOG4=1
On this machine the G4LIB_USE_G3TOG4=1
On this machine the G4LIB_BUILD_ZLIB=1
On this machine the G4LIB_USE_ZLIB=1
On this machine the G4LIB_BUILD_SHARED=1
On this machine the G4LIB_USE_GRANULAR=1
On this machine the G4UI_USE_TCSH=1
G4WORKDIR will be set to HOME/geant4=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4


System during compilation: Debian GNU/Linux 3.1  n  l
                           i686
System now               : Debian GNU/Linux 4.0  n  l
                           i686
You try to run the software on a different
linux flavour than it was compuiled on.
This is normaly a serious error, so we stop
the execution at this point.
If you know what you do you can change the
config.sh script to bypass this security issue.
Connection to lxetch32 closed.



There is only one issue: The script throws you out of your shell with the exit command. Is there some way to prevent this?
icon8.gif  ... it is too safe! [message #8418 is a reply to message #8359] Tue, 05 May 2009 17:52 Go to previous messageGo to next message
Volker Friese is currently offline  Volker Friese
Messages: 365
Registered: April 2004
Location: GSI CBM
first-grade participant
From: *gsi.de
Ooops, I was too quick with my previous statement. Now I tried to execute the configuration macro on the same machine the installation was made on, and I am rejected as well:

friese@lxg1403:/misc/friese> . /misc/cbmsoft/cbmroot/DEC08/sarge32/config.sh
On this machine the G4SYSTEM=Linux-g++
On this machine the G4INSTALL=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4
On this machine the G4INCLUDE=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4/include/
On this machine the G4LIB=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4/lib
On this machine the G4LEVELGAMMADATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/PhotonEvaporation
On this machine the G4RADIOACTIVEDATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/RadioactiveDecay
On this machine the G4LEDATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4EMLOW
On this machine the NeutronHPCrossSections=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4NDL
On this machine the G4ELASTICDATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4ELASTIC
On this machine the G4ABLADATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4ABLA
On this machine the CLHEP_BASE_DIR=/misc/cbmsoft/Sarge32/jul08/fairsoft/cern/clhep
On this machine the CLHEP_INCLUDE_DIR=/misc/cbmsoft/Sarge32/jul08/fairsoft/cern/clhep/include
On this machine the CLHEP_LIB_DIR=/misc/cbmsoft/Sarge32/jul08/fairsoft/cern/clhep/lib
On this machine the CLHEP_LIB=CLHEP
On this machine the G4DEBUG=1
On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=1
On this machine the G4VIS_USE_RAYTRACERX=1
On this machine the G4VIS_USE_VRML=1
On this machine the G4LIB_BUILD_G3TOG4=1
On this machine the G4LIB_USE_G3TOG4=1
On this machine the G4LIB_BUILD_ZLIB=1
On this machine the G4LIB_USE_ZLIB=1
On this machine the G4LIB_BUILD_SHARED=1
On this machine the G4LIB_USE_GRANULAR=1
On this machine the G4UI_USE_TCSH=1
G4WORKDIR will be set to HOME/geant4=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4
root/dev/sarge32/config.sh                                                    <
On this machine the G4SYSTEM=Linux-g++
On this machine the G4INSTALL=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4
On this machine the G4INCLUDE=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4/include/
On this machine the G4LIB=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4/lib
On this machine the G4LEVELGAMMADATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/PhotonEvaporation
On this machine the G4RADIOACTIVEDATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/RadioactiveDecay
On this machine the G4LEDATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4EMLOW
On this machine the NeutronHPCrossSections=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4NDL
On this machine the G4ELASTICDATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4ELASTIC
On this machine the G4ABLADATA=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/data/geant4/G4ABLA
On this machine the CLHEP_BASE_DIR=/misc/cbmsoft/Sarge32/jul08/fairsoft/cern/clhep
On this machine the CLHEP_INCLUDE_DIR=/misc/cbmsoft/Sarge32/jul08/fairsoft/cern/clhep/include
On this machine the CLHEP_LIB_DIR=/misc/cbmsoft/Sarge32/jul08/fairsoft/cern/clhep/lib
On this machine the CLHEP_LIB=CLHEP
On this machine the G4DEBUG=1
On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=1
On this machine the G4VIS_USE_RAYTRACERX=1
On this machine the G4VIS_USE_VRML=1
On this machine the G4LIB_BUILD_G3TOG4=1
On this machine the G4LIB_USE_G3TOG4=1
On this machine the G4LIB_BUILD_ZLIB=1
On this machine the G4LIB_USE_ZLIB=1
On this machine the G4LIB_BUILD_SHARED=1
On this machine the G4LIB_USE_GRANULAR=1
On this machine the G4UI_USE_TCSH=1
In your environment you have the G4WORKDIR=/misc/cbmsoft/Sarge32/jul08/fairsoft/transport/geant4
tr: invalid backslash escape at end of string


System during compilation: Debian GNU/Linux 3.1  n  l
                           i686
System now               :
                           i686
You try to run the software on a different
linux flavour than it was compuiled on.
This is normaly a serious error, so we stop
the execution at this point.
If you know what you do you can change the
config.sh script to bypass this security issue.
friese@lxg1403:/misc/friese>   


The reason is that in Debian Sarge, the tr program regards the backslash an escape sequence. You have to precess it with another backslash: tr '\\' ' ' in the script check_system.sh.in. In Debian Etch, both variants work.
Re: ... it is too safe! [message #8448 is a reply to message #8418] Wed, 06 May 2009 17:09 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: 120.28.8*
I chnaged the script. Now it should work correct.

Ciao

Florian
icon14.gif  OK [message #8449 is a reply to message #8448] Wed, 06 May 2009 17:54 Go to previous message
Volker Friese is currently offline  Volker Friese
Messages: 365
Registered: April 2004
Location: GSI CBM
first-grade participant
From: *gsi.de
... and it does. Thanks!
Previous Topic: Release DEC08
Next Topic: FairMCEventHeader
Goto Forum:
  


Current Time: Mon Dec 02 00:23:44 CET 2024

Total time taken to generate the page: 0.00769 seconds