[Gate-users] Installing Gate v6.2 and Geant4 on OSX 10.8.3, problems with CLHEP (Jenny Nilsson)

Jenny Nilsson jenny.nilsson at radfys.gu.se
Fri May 10 10:19:25 CEST 2013


Hello Gate users.

I've now managed to install Gate v6.2 with great help from Andrew Green. Just wanted to give a short summary on how my problem got solved in case someone browse the user forum with the same problem as I.

I didn't knew what to do with the CLHEP_CONFIG_EXECUTABLE, CLHEP_INCLUDE_DIR and CLHEP_LIBRARY            
when installing Geant. I had tried setting the environment but got error messages. I thought I made something wrong when defining the environment variables. With the correct variables I got the error message:

BUILD_STATIC_LIBS /applications/2.1.1.0/CLHEP/bin/clhep-config: line 14: [: -eq: unary operator expected 

Andrew pointed out that this was due to CLHEP not installed properly. I tried to recompile CLHEP but got the same error. Since Geant and Gate should be compiled with gcc 4.2,

http://permalink.gmane.org/gmane.comp.science.opengate.user/2458

I also tried to compile CLHEP with gcc 4.2 without any success.  I then  "cheated" and used a versions of CLHEP 2.1.0.1 compiled on OS X 10.6 and this worked fine together with Geant4.9.p01 and Gate v6.2 (using gcc 4.2). Since I need ascii output I also made a change in the Gate GateConfiguration.h.in file described here

http://article.gmane.org/gmane.comp.science.opengate.user/2602/match=sneha+nidhi

I didn't try to figure out why CLHEP 2.1.1.0 wouldn't compile properly. However, for future problems Andrew gave the advice to use home-brew to install compilers for OS X found here:

http://mxcl.github.io/homebrew/

Maybe this information could be helpful for someone else.

Regards 
Jenny












3 maj 2013 kl. 15:58 skrev Andrew Green <Andrew.Green at hep.manchester.ac.uk>:

> Hi Jenny,
> 
> I think the problem is that you haven't set the CLHEP_... variables correctly.
> 
> CLHEP_CONFIG_EXECUTABLE should point to an executable script created during the installation of CLHEP, usually this is /Applications/2.1.1.0/CLHEP/bin/clhep-config
> 
> One thing to make sure of is that this script is actually executable! Something like 'chmod a+x /Applications/2.1.1.0/CLHEP/bin/clhep-config' would make sure.
> 
> CLHEP_INCLUDE_DIR should point to the directory where CLHEP's header files are.  This will usually be something like /Applications/2.1.1.0/CLHEP/include/
> 
> I think the CLHEP_LIBRARY variable should point to the library compiled when you installed CLHEP. This is probably something like
> /Applications/2.1.1.0/CLHEP/lib/libCLHEP-2.1.1.0.(a for static, dylib for dynamic)
> 
> I suggest you tell it to use the dylib.
> 
> Once you set the CLHEP_CONFIG_EXECUTABLE variable right, it *should* sort the other variables out for you, so try that first.
> 
> About the Geant4 version, I'm not sure if the difference between 9.5.p01 and 9.5.p02 is something that will upset Gate, but I think the official answer is something along the lines "may produce invalid results". Reading the p02 release notes, they did something with the internal CLHEP modules, so I suggest you use p01 if you can.
> 
> Hope this helps,
> Andrew
> 
> 
> On 3 May 2013, at 14:29, <gate-users-request at lists.opengatecollaboration.org>
> wrote:
> 
>> Send Gate-users mailing list submissions to
>> 	gate-users at lists.opengatecollaboration.org
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 	http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>> or, via email, send a message with subject or body 'help' to
>> 	gate-users-request at lists.opengatecollaboration.org
>> 
>> You can reach the person managing the list at
>> 	gate-users-owner at lists.opengatecollaboration.org
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Gate-users digest..."
>> 
>> 
>> Today's Topics:
>> 
>>  1. Installing Gate v6.2 and Geant4 on OSX 10.8.3,	problems with
>>     CLHEP (Jenny Nilsson)
>> 
>> 
>> ----------------------------------------------------------------------
>> 
>> Message: 1
>> Date: Fri, 3 May 2013 13:31:55 +0000
>> From: Jenny Nilsson <jenny.nilsson at radfys.gu.se>
>> To: "gate-users at lists.opengatecollaboration.org"
>> 	<gate-users at lists.opengatecollaboration.org>
>> Subject: [Gate-users] Installing Gate v6.2 and Geant4 on OSX 10.8.3,
>> 	problems with CLHEP
>> Message-ID:
>> 	<6F412DC8CE42274EAFE20336B015C64701131C9A94 at GU-MBX06.ad.gumail.local>
>> Content-Type: text/plain; charset="windows-1252"
>> 
>> Hello all.
>> I?ve been trying to install Geant4.9.5.p02 and using external CLHEP on Mac OS X 10.8.3, Mountain Lion. There seems to be some problems with Cmake finding the CLHEP installation.
>> 
>> I?ve installed CLHEP 2.1.1.0, which seems to have worked fine. CLHEP is in directory /Applications/2.1.1.0 and the variable paths are updated
>> 
>> export PATH=$Applications/2.1.1.0/CLHEP/bin
>> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/Applications/2.1.1.0/CLHEP/lib
>> 
>> When installing Geant4 using ccmake I get the following for CLHEP:
>> 
>> CLHEP_CONFIG_EXECUTABLE    /Applications/2.1.1.0/CLHEP
>> CLHEP_INCLUDE_DIR          /Applications/2.1.1.0
>> CLHEP_LIBRARY              /Applications/2.1.1.0/lib
>> 
>> And when configuring I get the following message:
>> 
>> CMake Error at cmake/Modules/FindCLHEP.cmake:179 (file):
>>  file Internal CMake error when trying to open file:
>>  /Applications/2.1.1.0/CLHEP/Units/defs.h for reading.
>> Call Stack (most recent call first):
>>  cmake/Modules/Geant4OptionalComponents.cmake:41 (find_package)
>>  CMakeLists.txt:79 (include)
>> 
>> CMake Error at /Applications/CMake
>> 2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmak
>> e:97 (message):
>>  Could NOT find CLHEP:
>> 
>>  Incompatible versions, (found) < 2.1.0.1(required)
>> 
>>   (missing:  CLHEP_VERSION_COMPATIBLE) (Required is at least version
>> "2.1.0.1")
>> 
>> 
>> Any suggestion on what has gone wrong?
>> Does it matter, with respect to Gate 6.2 if I use Geant4.9.5p01 or Geant4.9.5.p02
>> 
>> Also, the manual mention CLHEP_ROOT_DIR, but I can?t seem to find this when using ccmake. Is this something of concern?
>> Regards,
>> Jenny
>> 
>> 
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20130503/981273f0/attachment.html>
>> 
>> ------------------------------
>> 
>> _______________________________________________
>> Gate-users mailing list
>> Gate-users at lists.opengatecollaboration.org
>> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>> 
>> End of Gate-users Digest, Vol 84, Issue 2
>> *****************************************
> 
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20130510/047e6c2a/attachment-0001.html>


More information about the Gate-users mailing list