Message: Re: Installation of Geant4.10.p02 on OS X 10.9.3 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Ok Re: Installation of Geant4.10.p02 on OS X 10.9.3 

Forum: Installation and Configuration
Re: Question Installation of Geant4.10.p02 on OS X 10.9.3 (Stefan E. Mueller)
Re: News Re: Installation of Geant4.10.p02 on OS X 10.9.3 (Stefan E. Mueller)
Date: 01 Jul, 2014
From: Stefan E. Mueller <Stefan E. Mueller>


I finally succeeded both in installing Geant4.10.p02 on Mavericks (10.9.3) and also building and running example B1. In the end, apart from (re)moving the directory /include, the addition of the flag


to the "cmake" command did the trick. I figured that since I migrated to 10.9.3 from 10.6.8, some libraries might still be built using GCC's libstdc++ runtime library, so I considered for the moment to use this runtime library also for my Geant4.10 build.

This is what I did:



make -j2

make install

(and then I included the line

source /Applications/geant4.10.00.p02/bin/geant4.csh /Applications/geant4.10.00.p02/bin/

in my .cshrc-file).

Then to compile and build example B1 (note the use of -stdlib=libstdc++ and clang/clang++):

cmake -DCMAKE_C_FLAGS="-stdlib=libstdc++" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGeant4_DIR=/Applications/geant4.10.00.p02-build/ /Applications/geant4.10.00.p02/examples/basic/B1/



and after a short time, the OpenGLStoredQt-viewer opened.

I do not know if it is the most elegant solution to link with the libstdc++ libraries (if I understood correctly, there is no support from APPLE anymore), but for the moment it seems to work.

I think all the problems came up because I was migrating all my settings and files from older OS X systems (going partially back to OS X 10.1!!). MigrationManager doesn't clean up old libraries (nor did I), which created unwanted interferences. So next time, I'll do a clean install and migrate my files by hand!


On Fri, 27 Jun 2014 15:13:54 GMT, Stefan E. Mueller wrote:

> OK,
> thanks to the suggestion by Ben Morgan, I managed to build and install
> Geant4.10.p02 on OS X 10.9.3.
> I moved the directory /install to /old_install by doing (as root)
> >> mv /install /old_install (just to make sure I could move it back in
> case it turns out it is really used by some application)
> Then I used the following flags with CMAKE
> -DCMAKE_INSTALL_PREFIX=/Applications/geant4.10.00.p02
> /Applications/geant4.10.00.p02
> and this time, it ran till the end without error.
> Then simply the commands
> >> make -j2
> >> make install
> completed the installation.
> But now when I try to build example B1, I get an error when linking:
> Linking CXX executable exampleB1
> Undefined symbols for architecture x86_64:
>   "G4Exception(char const*, char const*, G4ExceptionSeverity, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >&)", referenced from:
>       B1PrimaryGeneratorAction::GeneratePrimaries(G4Event*)       in
>   "operator<<(std::basic_ostream<char, std::char_traits<char> >&, G4BestUnit)", referenced from:
>       B1RunAction::EndOfRunAction(G4Run const*)  in
>   "___emutls_v.G4cout_p", referenced from:
>       B1RunAction::EndOfRunAction(G4Run const*)  in
>   "___emutls_v._ZN14G4GeomSplitterI8G4LVDataE6offsetE", referenced from:
>       G4LogicalVolume::GetSolid() const in
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> make[2]: *** [exampleB1] Error 1
> make[1]: *** [CMakeFiles/exampleB1.dir/all] Error 2
> make: *** [all] Error 2
> Not there yet.
> Stefan

 Add Message Add Message
to: "Re: Installation of Geant4.10.p02 on OS X 10.9.3"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]