|Message: Re: Installation of Geant4.10.p02 on OS X 10.9.3||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
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:
cmake -DCMAKE_CXX_FLAGS="-U__STRICT_ANSI__" -DGEANT4_BUILD_CXXSTD=c++11 -DCMAKE_C_FLAGS="-stdlib=libstdc++" -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_USE_QT=ON -DGEANT4_USE_RAYTRACER_X11=ON -DCMAKE_INSTALL_PREFIX=/Applications/geant4.10.00.p02 /Applications/geant4.10.00.p02
(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 > > >> cmake -DCMAKE_CXX_FLAGS="-U__STRICT_ANSI__" > -DGEANT4_BUILD_CXXSTD=c++11 -DGEANT4_INSTALL_DATA=ON > -DGEANT4_USE_OPENGL_X11=ON -DCMAKE_C_COMPILER=clang > -DCMAKE_CXX_COMPILER=clang++ -DGEANT4_BUILD_MULTITHREADED=ON > -DGEANT4_USE_QT=ON -DGEANT4_USE_RAYTRACER_X11=ON > -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 B1PrimaryGeneratorAction.cc.o > "operator<<(std::basic_ostream<char, std::char_traits<char> >&, G4BestUnit)", referenced from: > B1RunAction::EndOfRunAction(G4Run const*) in B1RunAction.cc.o > "___emutls_v.G4cout_p", referenced from: > B1RunAction::EndOfRunAction(G4Run const*) in B1RunAction.cc.o > "___emutls_v._ZN14G4GeomSplitterI8G4LVDataE6offsetE", referenced from: > G4LogicalVolume::GetSolid() const in B1PrimaryGeneratorAction.cc.o > ld: symbol(s) not found for architecture x86_64 > collect2: error: ld returned 1 exit status > make: *** [exampleB1] Error 1 > make: *** [CMakeFiles/exampleB1.dir/all] Error 2 > make: *** [all] Error 2 > > Not there yet. > > Stefan >