In addition, I faced with the following issue when -DGEANT4_USE_INVENTOR=ON
:
CMake Error at cmake/Modules/G4InterfaceOptions.cmake:125 (find_package):
By not providing "FindSoXt.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "SoXt", but
CMake did not find one.
Could not find a package configuration file provided by "SoXt" (requested
version 1.4.0) with any of the following names:
SoXtConfig.cmake
soxt-config.cmake
Add the installation prefix of "SoXt" to CMAKE_PREFIX_PATH or set
"SoXt_DIR" to a directory containing one of the above files. If "SoXt"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
cmake/Modules/G4CMakeMain.cmake:64 (include)
CMakeLists.txt:49 (include)
but I just turned -DGEANT4_USE_INVENTOR=OFF
now to proceed with the installation first. This is because the installation of SoQt-1.6.0 and SoXt-1.4.0 are needed and I could not seen clear and quick solutions to it.
The installation is successful (at least 100% built target foo → Install the project) and to verify that I can run Geant4, I try the B1\basic\example. The following is the message after make -j
command:
nucef@nucef:~/Desktop/geant4Run/examples-build/basic-build/B1-build$ make
[ 12%] Building CXX object CMakeFiles/exampleB1.dir/exampleB1.cc.o
[ 25%] Building CXX object CMakeFiles/exampleB1.dir/src/ActionInitialization.cc.o
[ 37%] Building CXX object CMakeFiles/exampleB1.dir/src/DetectorConstruction.cc.o
[ 50%] Building CXX object CMakeFiles/exampleB1.dir/src/EventAction.cc.o
[ 62%] Building CXX object CMakeFiles/exampleB1.dir/src/PrimaryGeneratorAction.cc.o
[ 75%] Building CXX object CMakeFiles/exampleB1.dir/src/RunAction.cc.o
[ 87%] Building CXX object CMakeFiles/exampleB1.dir/src/SteppingAction.cc.o
[100%] Linking CXX executable exampleB1
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4MuBremsstrahlung::MinPrimaryEnergy(G4ParticleDefinition const*, G4Material const*, double)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4ITNavigator::ResetNavigatorState()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4MuBremsstrahlungModel::InitialiseLocal(G4ParticleDefinition const*, G4VEmModel*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4DNAGillespieDirectMethod::G4DNAGillespieDirectMethod()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VEmProcess::GetMeanFreePath(G4Track const&, double, G4ForceCondition*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4DNAGillespieDirectMethod::Initialize()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4DummyModel::G4DummyModel(G4String const&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VHighEnergyGenerator::G4VHighEnergyGenerator(G4String const&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VEnergyLossProcess::AlongStepGetPhysicalInteractionLength(G4Track const&, double, double, double&, G4GPILSelection*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4OpticalParameters::SetVerboseLevel(int)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VITTrackHolder::Instance()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4LossTableManager::EmSaturation()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4HadronicProcess::StartTracking(G4Track*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4VEmProcess::~G4VEmProcess()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4OpticalParameters::SetRayleighVerboseLevel(int)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface(G4VPreCompoundModel*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4OpticalParameters::Dump() const'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VITStepModel::GetApplicable(G4ITType&, G4ITType&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4AugerTransition::AugerTransitionEnergy(int, int) const'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4Cerenkov::G4Cerenkov(G4String const&, G4ProcessType)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VMscModel::G4VMscModel(G4String const&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4hICRU49He::G4hICRU49He()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `typeinfo for G4VEmModel'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4NeutrinoElectronTotXsc::G4NeutrinoElectronTotXsc()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4LossTableManager::Instance()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4ITNavigator::SetNavigatorState(G4ITNavigatorState_Lock*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4eplusTo2GammaOKVIModel::G4eplusTo2GammaOKVIModel(G4ParticleDefinition const*, G4String const&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4BraggIonModel::MinEnergyCut(G4ParticleDefinition const*, G4MaterialCutsCouple const*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4HadronicProcess::G4HadronicProcess(G4String const&, G4ProcessType)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4WentzelVIModel::ComputeTrueStepLength(double)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4BraggIonModel::GetParticleCharge(G4ParticleDefinition const*, G4Material const*, double)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4MoleculeShoot::~G4MoleculeShoot()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4ITStepProcessor::SetTrack(G4Track*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VCrossSectionDataSet::ComputeIsoCrossSection(double, double, G4ParticleDefinition const*, int, int, G4Isotope const*, G4Element const*, G4Material const*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4BinaryLightIonReaction::G4BinaryLightIonReaction(G4VPreCompoundModel*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4CascadParticle::G4CascadParticle(G4InuclElementaryParticle const&, CLHEP::Hep3Vector const&, int, double, int)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4MuNeutrinoNucleusTotXsc::G4MuNeutrinoNucleusTotXsc()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4PenelopeBremsstrahlungModel::G4PenelopeBremsstrahlungModel(G4ParticleDefinition const*, G4String const&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VITProcess::~G4VITProcess()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VMultipleScattering::AlongStepGetPhysicalInteractionLength(G4Track const&, double, double, double&, G4GPILSelection*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `vtable for G4BigBanger'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4UniversalFluctuation::G4UniversalFluctuation(G4String const&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4HadronicProcess::CheckResult(G4HadProjectile const&, G4Nucleus const&, G4HadFinalState*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4EmDataHandler::~G4EmDataHandler()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4CrossSectionInelastic::G4CrossSectionInelastic(G4VComponentCrossSection*, int, int, double, double)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4ComponentGGHadronNucleusXsc::G4ComponentGGHadronNucleusXsc()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VIntraNuclearTransportModel::G4VIntraNuclearTransportModel(G4String const&, G4VPreCompoundModel*)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4Decay::PostStepDoIt(G4Track const&, G4Step const&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VEmModel::SelectRandomAtom(G4Material const*, G4ParticleDefinition const*, double, double, double)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4HadronicProcess::ProcessDescription(std::ostream&) const'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4EnergyLossTables::GetRange(G4ParticleDefinition const*, double, G4MaterialCutsCouple const*, bool)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4OpticalParameters::SetWLS2VerboseLevel(int)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4eBremsstrahlungRelModel::gBremFactor'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `typeinfo for G4VAtomDeexcitation'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4DNARuddIonisationExtendedModel::G4DNARuddIonisationExtendedModel(G4ParticleDefinition const*, G4String const&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4OpticalParameters::GetWLS2TimeProfile() const'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4VHighEnergyGenerator::~G4VHighEnergyGenerator()'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4WentzelVIModel::G4WentzelVIModel(bool, G4String const&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4MuIonisation::G4MuIonisation(G4String const&)'
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4physicslists.so: undefined reference to `G4EmDataHandler::SetMasterProcess(G4VEmProcess const*)'
...
...
...
/usr/bin/ld: /usr/local/include/geant4-v11.1.2-install/lib/libG4processes.so: undefined reference to `G4eBremsstrahlungRelModel::~G4eBremsstrahlungRelModel()'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/exampleB1.dir/build.make:240: exampleB1] Error 1
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/exampleB1.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I have also configure the environment as
source /usr/local/include/geant4-v11.1.2-install/bin/geant4.sh
source /usr/local/include/geant4-v11.1.2-install/share/Geant4/geant4make/geant4make.sh
I’m checking the forum