Message: HepMCEx01: ld: library not found for -lgfortran Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question HepMCEx01: ld: library not found for -lgfortran 

Forum: Documentation and Examples
Date: Apr 22, 10:07
From: Sergio Lo Meo <Sergio Lo Meo>

Dear Experts,

I'd like to compile and run HepMCx01 in Geant4 version 10.05.p1 on MacOS Mojave 10.14.4

In my .bashrc I have:

export HEPMC_DIR=/Users/sergiolomeo/HepMC/install export PYTHIA6=/Users/sergiolomeo/pythia6/pythia6/ export PYTHIA6_VERSION=6.4.28

At the end of this email you can find the complete output for cmake and make.

My problem is:

[100%] Linking CXX executable HepMCEx01 ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [HepMCEx01] Error 1 make[1]: *** [CMakeFiles/HepMCEx01.dir/all] Error 2 make: *** [all] Error 2

What's the problem?

gfortan is already installed...

How can I do?

Thanks in advance.

Best Regards.

Sergio Lo Meo

-------------- CMAKE:

-- The C compiler identification is AppleClang 10.0.1.10010046 -- The CXX compiler identification is AppleClang 10.0.1.10010046 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found HepMC: /Users/sergiolomeo/HepMC/install/include -- G4 Examples: Pythia6 found. --> HepMCEx01 example with Pythia6 enabled. -- Configuring done -- Generating done -- Build files have been written to: /Users/sergiolomeo/myWork/HepMCEx01-build

-------------- MAKE:

[ 7%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04CalorimeterHit.cc.o [ 7%] Building CXX object CMakeFiles/HepMCEx01.dir/HepMCEx01.cc.o [ 10%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04CalorimeterParametrisation.cc.o [ 14%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04CalorimeterROGeometry.cc.o [ 17%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04CalorimeterSD.cc.o [ 21%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04DetectorConstruction.cc.o [ 25%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04EventAction.cc.o [ 28%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04Field.cc.o [ 32%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04MuonHit.cc.o [ 35%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04MuonSD.cc.o [ 39%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04PrimaryGeneratorAction.cc.o [ 42%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04PrimaryGeneratorMessenger.cc.o [ 46%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04RunAction.cc.o [ 50%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04StackingAction.cc.o [ 53%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04StackingActionMessenger.cc.o [ 57%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04SteppingAction.cc.o [ 60%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04SteppingVerbose.cc.o [ 64%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04TrackerHit.cc.o [ 67%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04TrackerParametrisation.cc.o [ 71%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04TrackerSD.cc.o [ 75%] Building CXX object CMakeFiles/HepMCEx01.dir/src/ExN04TrackingAction.cc.o [ 78%] Building CXX object CMakeFiles/HepMCEx01.dir/src/HEPEvtcom.cc.o [ 82%] Building CXX object CMakeFiles/HepMCEx01.dir/src/HepMCG4AsciiReader.cc.o [ 85%] Building CXX object CMakeFiles/HepMCEx01.dir/src/HepMCG4AsciiReaderMessenger.cc.o [ 89%] Building CXX object CMakeFiles/HepMCEx01.dir/src/HepMCG4Interface.cc.o [ 92%] Building CXX object CMakeFiles/HepMCEx01.dir/src/HepMCG4PythiaInterface.cc.o [ 96%] Building CXX object CMakeFiles/HepMCEx01.dir/src/HepMCG4PythiaMessenger.cc.o [100%] Linking CXX executable HepMCEx01 ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [HepMCEx01] Error 1 make[1]: *** [CMakeFiles/HepMCEx01.dir/all] Error 2 make: *** [all] Error 2

 Add Message Add Message
to: "HepMCEx01: ld: library not found for -lgfortran"

 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 ]