Message: Geant 4 10.0 linking against system clhep on Mac Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Warning Geant 4 10.0 linking against system clhep on Mac 

Forum: Installation and Configuration
Date: 28 Jun, 2013
From: Mojca Miklavec <Mojca Miklavec>

I have CLHEP installed on the system (the latest released version). When trying to install Geant 4 10.0 compilation breaks with

    /usr/bin/clang++   -pipe -O2 -arch x86_64 -W -Wall -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wno-variadic-macros -Wshadow -pipe -Qunused-arguments -std=c++98 -O2 -DNDEBUG -arch x86_64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  -L/opt/local/lib -arch x86_64 CMakeFiles/nanobeam.dir/nanobeam.cc.o CMakeFiles/nanobeam.dir/src/DetectorConstruction.cc.o CMakeFiles/nanobeam.dir/src/DetectorMessenger.cc.o CMakeFiles/nanobeam.dir/src/EventAction.cc.o CMakeFiles/nanobeam.dir/src/PhysicsList.cc.o CMakeFiles/nanobeam.dir/src/PrimaryGeneratorAction.cc.o CMakeFiles/nanobeam.dir/src/PrimaryGeneratorMessenger.cc.o CMakeFiles/nanobeam.dir/src/RunAction.cc.o CMakeFiles/nanobeam.dir/src/SteppingAction.cc.o CMakeFiles/nanobeam.dir/src/SteppingVerbose.cc.o CMakeFiles/nanobeam.dir/src/TabulatedField3D.cc.o CMakeFiles/nanobeam.dir/src/TrackingAction.cc.o  -o ../../../outputs/runtime/nanobeam  ../../../outputs/library/Darwin-clang/libG4Tree.dylib ../../../outputs/library/Darwin-clang/libG4FR.dylib ../../../outputs/library/Darwin-clang/libG4GMocren.dylib ../../../outputs/library/Darwin-clang/libG4visHepRep.dylib ../../../outputs/library/Darwin-clang/libG4RayTracer.dylib ../../../outputs/library/Darwin-clang/libG4VRML.dylib ../../../outputs/library/Darwin-clang/libG4OpenGL.dylib ../../../outputs/library/Darwin-clang/libG4gl2ps.dylib ../../../outputs/library/Darwin-clang/libG4vis_management.dylib ../../../outputs/library/Darwin-clang/libG4modeling.dylib ../../../outputs/library/Darwin-clang/libG4interfaces.dylib ../../../outputs/library/Darwin-clang/libG4persistency.dylib ../../../outputs/library/Darwin-clang/libG4analysis.dylib ../../../outputs/library/Darwin-clang/libG4error_propagation.dylib ../../../outputs/library/Darwin-clang/libG4readout.dylib ../../../outputs/library/Darwin-clang/libG4physicslists.dylib ../../../outputs/library/Darwin-clang/libG4run.dylib ../../../outputs/library/Darwin-clang/libG4event.dylib ../../../outputs/library/Darwin-clang/libG4tracking.dylib ../../../outputs/library/Darwin-clang/libG4parmodels.dylib ../../../outputs/library/Darwin-clang/libG4processes.dylib ../../../outputs/library/Darwin-clang/libG4digits_hits.dylib ../../../outputs/library/Darwin-clang/libG4track.dylib ../../../outputs/library/Darwin-clang/libG4particles.dylib ../../../outputs/library/Darwin-clang/libG4geometry.dylib ../../../outputs/library/Darwin-clang/libG4materials.dylib ../../../outputs/library/Darwin-clang/libG4graphics_reps.dylib ../../../outputs/library/Darwin-clang/libG4intercoms.dylib ../../../outputs/library/Darwin-clang/libG4global.dylib ../../../outputs/library/Darwin-clang/libG4clhep.dylib ../../../outputs/library/Darwin-clang/libG4zlib.dylib ../../../outputs/library/Darwin-clang/libG4FR.dylib ../../../outputs/library/Darwin-clang/libG4vis_management.dylib ../../../outputs/library/Darwin-clang/libG4modeling.dylib -framework AGL -framework OpenGL /usr/X11R6/lib/libGL.dylib /usr/X11R6/lib/libGLU.dylib /opt/local/lib/libSM.dylib /opt/local/lib/libICE.dylib /opt/local/lib/libX11.dylib /opt/local/lib/libXext.dylib /opt/local/lib/libXmu.dylib /opt/local/lib/libQtOpenGL.dylib /opt/local/lib/libQtGui.dylib /opt/local/lib/libQtCore.dylib ../../../outputs/library/Darwin-clang/libG4run.dylib ../../../outputs/library/Darwin-clang/libG4event.dylib ../../../outputs/library/Darwin-clang/libG4tracking.dylib ../../../outputs/library/Darwin-clang/libG4processes.dylib ../../../outputs/library/Darwin-clang/libG4zlib.dylib /opt/local/lib/libexpat.dylib ../../../outputs/library/Darwin-clang/libG4digits_hits.dylib ../../../outputs/library/Darwin-clang/libG4track.dylib ../../../outputs/library/Darwin-clang/libG4particles.dylib ../../../outputs/library/Darwin-clang/libG4geometry.dylib ../../../outputs/library/Darwin-clang/libG4materials.dylib ../../../outputs/library/Darwin-clang/libG4graphics_reps.dylib ../../../outputs/library/Darwin-clang/libG4intercoms.dylib ../../../outputs/library/Darwin-clang/libG4global.dylib ../../../outputs/library/Darwin-clang/libG4clhep.dylib 
    Undefined symbols for architecture x86_64:
      "CLHEP::HepMatrix::invert(int&)", referenced from:
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::HepMatrix::HepMatrix(CLHEP::HepMatrix const&)", referenced from:
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::HepMatrix::HepMatrix(int, int)", referenced from:
          PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction*) in PrimaryGeneratorAction.cc.o
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::HepMatrix::~HepMatrix()", referenced from:
          PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction*) in PrimaryGeneratorAction.cc.o
          PrimaryGeneratorAction::~PrimaryGeneratorAction() in PrimaryGeneratorAction.cc.o
          PrimaryGeneratorAction::~PrimaryGeneratorAction() in PrimaryGeneratorAction.cc.o
          PrimaryGeneratorAction::~PrimaryGeneratorAction() in PrimaryGeneratorAction.cc.o
          RunAction::~RunAction() in RunAction.cc.o
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::HepMatrix::operator=(CLHEP::HepMatrix const&)", referenced from:
          PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction*) in PrimaryGeneratorAction.cc.o
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::HepVector::sub(int, int)", referenced from:
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::HepVector::HepVector(int)", referenced from:
          RunAction::BeginOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::HepVector::HepVector(int, int)", referenced from:
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::HepVector::~HepVector()", referenced from:
          RunAction::~RunAction() in RunAction.cc.o
          RunAction::BeginOfRunAction(G4Run const*) in RunAction.cc.o
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::HepVector::operator=(CLHEP::HepVector const&)", referenced from:
          RunAction::BeginOfRunAction(G4Run const*) in RunAction.cc.o
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::operator<<(std::ostream&, CLHEP::HepVector const&)", referenced from:
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "CLHEP::operator*(CLHEP::HepMatrix const&, CLHEP::HepVector const&)", referenced from:
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      "vtable for CLHEP::HepMatrix", referenced from:
          PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction*) in PrimaryGeneratorAction.cc.o
          RunAction::RunAction(DetectorConstruction*, PrimaryGeneratorAction*) in RunAction.cc.o
          RunAction::RunAction(DetectorConstruction*, PrimaryGeneratorAction*) in RunAction.cc.o
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
      "vtable for CLHEP::HepVector", referenced from:
          RunAction::RunAction(DetectorConstruction*, PrimaryGeneratorAction*) in RunAction.cc.o
          RunAction::RunAction(DetectorConstruction*, PrimaryGeneratorAction*) in RunAction.cc.o
          RunAction::EndOfRunAction(G4Run const*) in RunAction.cc.o
      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

I checked and noticed that the built-in clhep library links against the system-wide one:

    > otool -L outputs/library/Darwin-clang/libG4clhep.dylib 
    outputs/library/Darwin-clang/libG4clhep.dylib:
    	/opt/local/lib/libG4clhep.dylib (compatibility version 0.0.0, current version 0.0.0)
    	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

despite having set GEANT4_USE_SYSTEM_CLHEP:BOOL=OFF. I will try to uninstall CLHEP first (the problem is that I need it for Gate though) and try to recompile everything. If I uninstall CLHEP and try to continue compiling, I get errors saying

    nanobeam/include/PrimaryGeneratorAction.hh:33:10: fatal error: 
          'CLHEP/Matrix/Matrix.h' file not found
    #include <CLHEP/Matrix/Matrix.h>
             ^
    1 error generated.

which means that the built-in CLHEP probably wasn't found as it should be. I will be grateful for any hints, but I will keep playing.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Note: Re: Geant 4 10.0 linking against system clhep on Mac   (Ben Morgan - 01 Jul, 2013)
1 Ok: Re: Geant 4 10.0 linking against system clhep on Mac   (Mojca Miklavec - 02 Jul, 2013)
2 Question: Re: Geant 4 10.0 linking against system clhep on Mac   (Mojca Miklavec - 03 Jul, 2013)
1 Warning: Re: Geant 4 10.0 linking against system clhep on Mac   (Ben Morgan - 04 Jul, 2013)
... 2 Message(s)
 Add Message Add Message
to: "Geant 4 10.0 linking against system clhep on Mac"

 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 ]