Import the Ansys LIS files to the Garfield++

Hi, I read my error files carefully,and would you please tell me where shows my ROOT binary distribution (uses gcc 7) is incompatible with my operating system (uses gcc 9). Thanks for your help again!

Hi, I have install the latest version of ROOT, but when I run the example ,the same error still has.

In this post, it tries (and fails) to execute β€œx86_64-linux-gnu-g++-7”, and in this post, it says that you have β€œgcc version 9.3.0”.

BTW. Make also sure that your β€œGarfield++” will be configured with the same C++ standard that your ROOT binaries use.

1 Like

thanks a lot for your heip! it’s really nice of you, actually I don’t know how to configure β€œGarfield++” the same C++ standard with my ROOT binaries use and whether it is needed to delete the previous ROOT version.

Hi,I have updated to the latest root version,but it still has the same error, would you please tell me how the C++ compiler compatible with the same C++ standard with which ROOT was compiled.


Please, follow the step-by-step instructions for building Garfield++, setting up the environment and building an example application from my previous post.

1 Like

Hi ,thank you for your help,I have tried to install several times according to your previous post, there is something confused me a lot, when I input the code line by line, the error shows"CMake Error: The source directory β€œ/home/xxc” does not appear to contain CMakeLists.txt".But when I input the whole code once a time, it works, the results shows in the below.

xxc@xxc-linux:~ source root-6.24.06/build/bin/thisroot.sh xxc@xxc-linux:~ export GARFIELD_HOME=/home/xxc/garfieldpp-master xxc@xxc-linux:~$ cd GARFIELD_HOME xxc@xxc-linux:~/garfieldpp-master rm -rf build xxc@xxc-linux:~/garfieldpp-master$ cd build
bash: cd: build: No such file or directory xxc@xxc-linux:~/garfieldpp-master$ cmake …
CMake Error: The source directory β€œ/home/xxc” does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI. xxc@xxc-linux:~/garfieldpp-master$ make
[ 1%] Built target magboltz
[ 2%] Generating GarfieldDict.cxx, libGarfieldDict_rdict.pcm, libGarfieldDict.rootmap Scanning dependencies of target Garfield [ 3%] Building CXX object CMakeFiles/Garfield.dir/GarfieldDict.cxx.o [ 4%] Linking CXX shared library libGarfield.so [ 70%] Built target Garfield
[ 70%] Linking CXX executable gem [ 71%] Built target gem
[ 72%] Linking CXX executable mdt_mt [ 72%] Built target mdt_mt
[ 73%] Linking CXX executable mdt [ 73%] Built target mdt
[ 74%] Linking CXX executable penning [ 74%] Built target penning
[ 75%] Linking CXX executable merge [ 75%] Built target merge
[ 76%] Linking CXX executable read [ 76%] Built target read
[ 77%] Linking CXX executable printTable [ 77%] Built target printTable
[ 77%] Linking CXX executable generate [ 78%] Built target generate
[ 78%] Linking CXX executable gallery [ 79%] Built target gallery
[ 79%] Linking CXX executable fieldlines [ 80%] Built target fieldlines
[ 81%] Linking CXX executable polar [ 81%] Built target polar
[ 81%] Linking CXX executable dipole [ 82%] Built target dipole
[ 83%] Linking CXX executable strip [ 83%] Built target strip
[ 84%] Linking CXX executable isochrons [ 84%] Built target isochrons
[ 85%] Linking CXX executable wedge [ 85%] Built target wedge
[ 85%] Linking CXX executable integrate [ 86%] Built target integrate
[ 87%] Linking CXX executable savefield [ 87%] Built target savefield
[ 88%] Linking CXX executable plotfield [ 88%] Built target plotfield
[ 89%] Linking CXX executable plotdedx [ 89%] Built target plotdedx
[ 89%] Linking CXX executable fe55 [ 90%] Built target fe55
[ 91%] Linking CXX executable rangeSi [ 91%] Built target rangeSi
[ 92%] Linking CXX executable qdepSi [ 92%] Built target qdepSi
[ 92%] Linking CXX executable edep [ 93%] Built target edep
[ 94%] Linking CXX executable trim [ 94%] Built target trim
[ 95%] Linking CXX executable srim [ 95%] Built target srim
[ 96%] Linking CXX executable parallelPlatesWeightingField [ 96%] Built target parallelPlatesWeightingField
[ 97%] Linking CXX executable parallelPlates [ 97%] Built target parallelPlates
[ 97%] Linking CXX executable MWPCbyneBEM [ 98%] Built target MWPCbyneBEM
[ 98%] Linking CXX executable crossingWires [ 99%] Built target crossingWires
[ 99%] Linking CXX executable BiconicalGemByneBEM [ 99%] Built target BiconicalGemByneBEM
[ 99%] Linking CXX executable RPCbyneBEM [100%] Built target RPCbyneBEM xxc@xxc-linux:~/garfieldpp-master$ make install
[ 1%] Built target magboltz
[ 70%] Built target Garfield
[ 71%] Built target gem
[ 72%] Built target mdt_mt
[ 73%] Built target mdt
[ 74%] Built target penning
[ 75%] Built target merge
[ 76%] Built target read
[ 77%] Built target printTable
[ 78%] Built target generate
[ 79%] Built target gallery
[ 80%] Built target fieldlines
[ 81%] Built target polar
[ 82%] Built target dipole
[ 83%] Built target strip
[ 84%] Built target isochrons
[ 85%] Built target wedge
[ 86%] Built target integrate
[ 87%] Built target savefield
[ 88%] Built target plotfield
[ 89%] Built target plotdedx
[ 90%] Built target fe55
[ 91%] Built target rangeSi
[ 92%] Built target qdepSi
[ 93%] Built target edep
[ 94%] Built target trim
[ 95%] Built target srim
[ 96%] Built target parallelPlatesWeightingField
[ 97%] Built target parallelPlates
[ 98%] Built target MWPCbyneBEM
[ 99%] Built target crossingWires
[ 99%] Built target BiconicalGemByneBEM
[100%] Built target RPCbyneBEM Install the project… – Install configuration: β€œRelWithDebInfo”
– Installing: /home/xxc/garfieldpp-master/lib/libGarfieldDict_rdict.pcm
– Up-to-date: /home/xxc/garfieldpp-master/include
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/SolidTube.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentTcad2d.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentNeBem3dMap.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ViewIsochrons.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/MediumGas.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentTcad3d.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/TrackSrim.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/PlottingEngine.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentParallelPlate.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/TrackHeed.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/KDTree.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/SolidBox.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/SolidHole.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/MediumGaN.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/MediumDiamond.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Shaper.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ViewFEMesh.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/TGeoTet.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/RandomEngine.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/MediumMagboltz.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Utilities.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/GeometrySimple.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/GeometryRoot.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Numerics.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ViewGeometry.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/QuadTree.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentGrid.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Plotting.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ViewCell.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ViewMedium.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentCST.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ViewDrift.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/SolidExtrusion.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/MagboltzInterface.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentAnsys121.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/RandomEngineRoot.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/MediumCdTe.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Medium.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Geometry.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/OpticalData.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentVoxel.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/AvalancheMicroscopic.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/TrackSimple.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentComsol.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/SolidWire.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentUser.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/TrackElectron.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Polygon.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentElmer2D.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/SolidSphere.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentElmer.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ViewBase.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Component.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/TetrahedralTree.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentAnsys123.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Track.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ViewField.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentTcadBase.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/FundamentalConstants.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/TrackBichsel.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentNeBem2d.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/MediumPlastic.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/TrackTrim.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/MediumConductor.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/MediumSilicon.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/SolidRidge.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/MediumGaAs.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/TrackPAI.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ViewSignal.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Random.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/DriftLineRKF.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/GarfieldConstants.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentNeBem3d.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentAnalyticField.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/AvalancheGrid.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Solid.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/AvalancheMC.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentFieldMap.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/Sensor.hh
– Up-to-date: /home/xxc/garfieldpp-master/include/Garfield/ComponentConstant.hh
– Installing: /home/xxc/garfieldpp-master/lib/libGarfield.so.0.3.0
– Set runtime path of β€œ/home/xxc/garfieldpp-master/lib/libGarfield.so.0.3.0” to β€œβ€
– Up-to-date: /home/xxc/garfieldpp-master/lib/libGarfield.so
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/IonMobility_Ar+_Ar.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/IonMobility_C8Hn+_iC4H10.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/IonMobility_Ne+_Ne.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/Deexcitation
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/Deexcitation/RateConstants_Ar_CO2.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/Deexcitation/RateConstants_Ar_Ar.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/Deexcitation/RateConstants_Ar_CF4.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/Deexcitation/RateConstants_Ar_iC4H10.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/Deexcitation/RateConstants_Ar_C2H6.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/Deexcitation/RateConstants_Ar_C2H2.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/Deexcitation/TransitionRates_Ar.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/Deexcitation/RateConstants_Ar_CH4.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/Deexcitation/OscillatorStrengths_Ar.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/SiM0invw.inv
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/IonMobility_CO2+_CO2.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/OpticalData_Si.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/IonMobility_He+_He.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/IonMobility_Xe+_P32_Xe.txt
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield//Data/IonMobility_Xe+_P12_Xe.txt
– Up-to-date: /home/xxc/garfieldpp-master/lib/libmagboltz.so.11
– Up-to-date: /home/xxc/garfieldpp-master/lib/libmagboltz.so
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/cbdel.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/ftbf54.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/mw3.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/shelllist.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/shellescar.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/shelltscf1.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/C_for_CH4.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/shelltsc.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/shelltscf.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Al.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/U.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Mo.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Te.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ni.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/At.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/V.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Er.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/O.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Sc.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/I.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Si.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ne.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Tl.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Dy.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Gd.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Y.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Pm.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Hf.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Kr.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Bi.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/W.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/H.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Pt.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/K.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Yb.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/La.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/S.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ra.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Li.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Co.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ge.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Po.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Rh.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Zn.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ga.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Cs.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Pd.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Br.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Zr.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ho.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Tm.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Rn.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Xe.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Fe.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ir.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Pb.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ru.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Cd.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Cl.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Au.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Pr.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Lu.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Nd.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Be.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ta.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/F.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Tc.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/B.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Os.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Nb.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Pa.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Cr.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Sm.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Na.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/He.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Rb.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/As.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Sr.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Tb.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Hg.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Sn.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Re.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Th.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ac.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ba.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ce.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/P.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Mg.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ag.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Sb.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/N.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Se.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Mn.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/In.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ca.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Fr.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ar.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Cu.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/C.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Ti.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/henke/Eu.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/ftbf36.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/shelllist_solid.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/Si_G4.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/ftb18.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/ftbf18.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/elastic_disp.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/ftb36.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/delta_path.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/ftb54.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Heed/database/elastic_disp_o.dat
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield/cmake/GarfieldTargets.cmake
– Installing: /home/xxc/garfieldpp-master/share/Garfield/cmake/GarfieldTargets-relwithdebinfo.cmake
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield/cmake/GarfieldConfig.cmake
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield/cmake/GarfieldConfigVersion.cmake
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield/setupGarfield.sh
– Up-to-date: /home/xxc/garfieldpp-master/share/Garfield/setupGarfield.csh

xxc@xxc-linux:~/garfieldpp-master$ cp -r GARFIELD_HOME/Examples/Gem . xxc@xxc-linux:~/garfieldpp-master mkdir build
xxc@xxc-linux:~/garfieldpp-master$ cd build
xxc@xxc-linux:~/garfieldpp-master/build$ cmake …
– The installation folder is set to its default value /home/xxc/garfieldpp-master
– Install path: /home/xxc/garfieldpp-master
– If you want to change this path call cmake -DCMAKE_INSTALL_PREFIX=my_install_path …
– Found OpenMP_CXX: -fopenmp
– Found OpenMP_Fortran: -fopenmp
– Found OpenMP: TRUE
– Creating a new library named magboltz with API version 11
– Creating a new library named with API version
– Garfield++ examples will be built. In order disable this option use -DWITH_EXAMPLES=OFF
– Found OpenMP_CXX: -fopenmp
– Found OpenMP_Fortran: -fopenmp
– Found OpenMP: TRUE
CMake Warning at Examples/Geant4GarfieldInterface/CMakeLists.txt:16 (find_package):
By not providing β€œFindGeant4.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by β€œGeant4”, but
CMake did not find one.

Could not find a package configuration file provided by β€œGeant4” with any
of the following names:

Geant4Config.cmake
geant4-config.cmake

Add the installation prefix of β€œGeant4” to CMAKE_PREFIX_PATH or set
β€œGeant4_DIR” to a directory containing one of the above files. If β€œGeant4”
provides a separate development package or SDK, be sure it has been
installed.

Geant4 is not found. Example cannot be built.
– Configuring done
– Generating done
– Build files have been written to: /home/xxc/garfieldpp-master
xxc@xxc-linux:~/garfieldpp-master/build$ make

No, you skipped some essential steps.

xxc@xxc-linux:~/garfieldpp-master$ rm -rf build
xxc@xxc-linux:~/garfieldpp-master$ cd build
bash: cd: build: No such file or directory
xxc@xxc-linux:~/garfieldpp-master$ cmake …
CMake Error: The source directory β€œ/home/xxc” does not appear to contain CMakeLists.txt.

Here you deleted the build directory but then did not recreate it, so β€œcd build” doesn’t work, and the subsequent cmake command also fails because you are not in the build directory but in the top-level source directory.

I don’t understand why the make command you gave afterwards still seems to work.
To which directory did you clone the Garfield++ repository? And what is the directory to which you want to copy the Gem example? Are they the same? If they are, please start from scratch and use separate directories (otherwise you’ll overwrite the CMakeLists.txt).

You also need to source the setupGarfield.sh script before building the example application.

1 Like

Thank you for your reply, I realize what the reason for the error is. I tried again,and that’s the result. should I install the Geant4 or is there anything wrong with my process?

xxc@xxc-linux:~ source root-6.24.06/build/bin/thisroot.sh xxc@xxc-linux:~ export GARFIELD_HOME=/home/xxc/garfieldpp-master
xxc@xxc-linux:~$ cd GARFIELD_HOME xxc@xxc-linux:~/garfieldpp-master rm -rf build
xxc@xxc-linux:~/garfieldpp-master$ mkdir build
xxc@xxc-linux:~/garfieldpp-master$ cd build
xxc@xxc-linux:~/garfieldpp-master/build$ cmake …
– The installation folder is set to its default value /home/xxc/garfieldpp-master
– Install path: /home/xxc/garfieldpp-master
– If you want to change this path call cmake -DCMAKE_INSTALL_PREFIX=my_install_path …
– Found OpenMP_CXX: -fopenmp
– Found OpenMP_Fortran: -fopenmp
– Found OpenMP: TRUE
– Creating a new library named magboltz with API version 11
– Creating a new library named with API version
– Garfield++ examples will be built. In order disable this option use -DWITH_EXAMPLES=OFF
– Found OpenMP_CXX: -fopenmp
– Found OpenMP_Fortran: -fopenmp
– Found OpenMP: TRUE
CMake Warning at Examples/Geant4GarfieldInterface/CMakeLists.txt:16 (find_package):
By not providing β€œFindGeant4.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by β€œGeant4”, but
CMake did not find one.

Could not find a package configuration file provided by β€œGeant4” with any
of the following names:

Geant4Config.cmake
geant4-config.cmake

Add the installation prefix of β€œGeant4” to CMAKE_PREFIX_PATH or set
β€œGeant4_DIR” to a directory containing one of the above files. If β€œGeant4”
provides a separate development package or SDK, be sure it has been
installed.

Geant4 is not found. Example cannot be built.
– Configuring done
– Generating done
– Build files have been written to: /home/xxc/garfieldpp-master
xxc@xxc-linux:~/garfieldpp-master/build$ make
make: *** No targets specified and no makefile found. Stop.
xxc@xxc-linux:~/garfieldpp-master/build$ make install

Hi, I have install the Geant 4 according to the error notice. And now the Cmake … step( Re-build Garfield++)works, but when I put the make code, the error shows in the below.

*xxc@xxc-linux:~ source root-6.24.06/build/bin/thisroot.sh xxc@xxc-linux:~ export GARFIELD_HOME=/home/xxc/garfieldpp-master
xxc@xxc-linux:~$ cd GARFIELD_HOME xxc@xxc-linux:~/garfieldpp-master rm -rf build
xxc@xxc-linux:~/garfieldpp-master$ mkdir build
xxc@xxc-linux:~/garfieldpp-master$ cd build
xxc@xxc-linux:~/garfieldpp-master/build$ cmake …
– The installation folder is set to its default value /home/xxc/garfieldpp-master
– Install path: /home/xxc/garfieldpp-master
– If you want to change this path call cmake -DCMAKE_INSTALL_PREFIX=my_install_path …
– Found OpenMP_CXX: -fopenmp
– Found OpenMP_Fortran: -fopenmp
– Found OpenMP: TRUE
– Creating a new library named magboltz with API version 11
– Creating a new library named with API version
– Garfield++ examples will be built. In order disable this option use -DWITH_EXAMPLES=OFF
– Found OpenMP_CXX: -fopenmp
– Found OpenMP_Fortran: -fopenmp
– Found OpenMP: TRUE
– Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found suitable version β€œ2.2.9”, minimum required is β€œ2.2.9”)
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Check if compiler accepts -pthread
– Check if compiler accepts -pthread - yes
– Found Threads: TRUE
– Found XercesC: /usr/lib/x86_64-linux-gnu/libxerces-c.so (found suitable version β€œ3.2.2”, minimum required is β€œ3.2.2”)
– Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
– Configuring done
– Generating done
– Build files have been written to: /home/xxc/garfieldpp-master
xxc@xxc-linux:~/garfieldpp-master/build$ sudo make
[sudo] password for xxc:
make: *** No targets specified and no makefile found. Stop.
xxc@xxc-linux:~/garfieldpp-master/build$ make
make: *** No targets specified and no makefile found. Stop.
xxc@xxc-linux:~/garfieldpp-master/build$ sudo make install
make: *** No rule to make target β€˜install’. Stop.
xxc@xxc-linux:~/garfieldpp-master/build$

Hi,
for some reason, CMake thinks that /home/xxc/garfieldpp-master is a build folder (maybe because you have some remnants of a previous build in there).
Instead of typing

cmake ..

can you try

cmake -B . -S ..

(from /home/xxc/garfieldpp-master/build)?

PS: you do not need Geant4 to build Garfield++ (only if you want to build an application that uses both Geant4 and Garfield++).

Thank you for your reply,I have input the cmake -B . -S … instead of cmake …, now It can make,but the error still has.

  1. The installation folder is set to its default value /home/xxc/garfieldpp-master
    – Install path: /home/xxc/garfieldpp-master
    – If you want to change this path call cmake -DCMAKE_INSTALL_PREFIX=my_install_path …
    – Found OpenMP_CXX: -fopenmp
    – Found OpenMP_Fortran: -fopenmp
    – Found OpenMP: TRUE
    – Creating a new library named magboltz with API version 11
    – Creating a new library named with API version
    – Garfield++ examples will be built. In order disable this option use -DWITH_EXAMPLES=OFF
    – Found OpenMP_CXX: -fopenmp
    – Found OpenMP_Fortran: -fopenmp
    – Found OpenMP: TRUE
    – Configuring done
    – Generating done
    – Build files have been written to: /home/xxc/garfieldpp-master
    xxc@xxc-linux:~ source root-6.24.06/config/thisroot.sh xxc@xxc-linux:~ export GARFIELD_HOME=/home/xxc/garfieldpp-master
    xxc@xxc-linux:~$ cd GARFIELD_HOME xxc@xxc-linux:~/garfieldpp-master rm -rf build
    xxc@xxc-linux:~/garfieldpp-master$ mkdir build
    xxc@xxc-linux:~/garfieldpp-master$ cd build
    xxc@xxc-linux:~/garfieldpp-master/build$ cmake -B . -S …
    – The CXX compiler identification is GNU 9.3.0
    – The Fortran compiler identification is GNU 9.3.0
    – Check for working CXX compiler: /usr/bin/c++
    – Check for working CXX compiler: /usr/bin/c++ – works
    – Detecting CXX compiler ABI info
    – Detecting CXX compiler ABI info - done
    – Detecting CXX compile features
    – Detecting CXX compile features - done
    – Check for working Fortran compiler: /usr/bin/gfortran
    – Check for working Fortran compiler: /usr/bin/gfortran – works
    – Detecting Fortran compiler ABI info
    – Detecting Fortran compiler ABI info - done
    – Checking whether /usr/bin/gfortran supports Fortran 90
    – Checking whether /usr/bin/gfortran supports Fortran 90 – yes
    – Install path: /home/xxc/garfieldpp-master
    – If you want to change this path call cmake -DCMAKE_INSTALL_PREFIX=my_install_path …
    – Found PkgConfig: /usr/bin/pkg-config (found version β€œ0.29.1”)
    – Found GSL: /usr/include (found version β€œ2.5”)
    – Found OpenMP_CXX: -fopenmp (found version β€œ4.5”)
    – Found OpenMP_Fortran: -fopenmp (found version β€œ4.5”)
    – Found OpenMP: TRUE (found version β€œ4.5”)
    – Creating a new library named magboltz with API version 11
    – Creating a new library named with API version
    – Garfield++ examples will be built. In order disable this option use -DWITH_EXAMPLES=OFF
    – The C compiler identification is GNU 9.3.0
    – Check for working C compiler: /usr/bin/cc
    – Check for working C compiler: /usr/bin/cc – works
    – Detecting C compiler ABI info
    – Detecting C compiler ABI info - done
    – Detecting C compile features
    – Detecting C compile features - done
    – Found OpenMP_C: -fopenmp (found version β€œ4.5”)
    – Found OpenMP_CXX: -fopenmp (found version β€œ4.5”)
    – Found OpenMP_Fortran: -fopenmp (found version β€œ4.5”)
    – Found OpenMP: TRUE (found version β€œ4.5”)
    – Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found suitable version β€œ2.2.9”, minimum required is β€œ2.2.9”)
    – Looking for pthread.h
    – Looking for pthread.h - found
    – Performing Test CMAKE_HAVE_LIBC_PTHREAD
    – Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
    – Check if compiler accepts -pthread
    – Check if compiler accepts -pthread - yes
    – Found Threads: TRUE
    – Found XercesC: /usr/lib/x86_64-linux-gnu/libxerces-c.so (found suitable version β€œ3.2.2”, minimum required is β€œ3.2.2”)
    – Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    – Configuring done
    – Generating done
    – Build files have been written to: /home/xxc/garfieldpp-master/build
    xxc@xxc-linux:~/garfieldpp-master/build$ sudo make
    [sudo] password for xxc:
    Scanning dependencies of target magboltz
    [ 0%] Building Fortran object Magboltz/CMakeFiles/magboltz.dir/magboltz.f.o
    [ 1%] Linking Fortran shared library libmagboltz.so
    [ 1%] Built target magboltz
    [ 2%] Generating GarfieldDict.cxx, libGarfieldDict_rdict.pcm, libGarfieldDict.rootmap
    Scanning dependencies of target Garfield
    [ 2%] Building CXX object CMakeFiles/Garfield.dir/Source/AvalancheGrid.cc.o
    [ 3%] Building CXX object CMakeFiles/Garfield.dir/Source/AvalancheMC.cc.o
    [ 3%] Building CXX object CMakeFiles/Garfield.dir/Source/AvalancheMicroscopic.cc.o
    [ 4%] Building CXX object CMakeFiles/Garfield.dir/Source/Component.cc.o

[ 39%] Building CXX object CMakeFiles/Garfield.dir/NeBem/svdcmp.c.o
[ 40%] Building CXX object CMakeFiles/Garfield.dir/NeBem/Vector.c.o
[ 40%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/BGMesh.cpp.o
[ 41%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/ElElasticScat.cpp.o
[ 41%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/EnTransfCS.cpp.o
[ 42%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/EnTransfCS_BGM.cpp.o
[ 42%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/EnergyMesh.cpp.o
[ 43%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/HeedCluster.cpp.o
[ 43%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/HeedCondElectron.cpp.o
[ 44%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/HeedDeltaElectron.cpp.o
[ 44%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/HeedDeltaElectronCS.cpp.o
[ 44%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/HeedMatterDef.cpp.o
[ 45%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/HeedParticle.cpp.o
[ 45%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/HeedParticle_BGM.cpp.o
[ 46%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/HeedPhoton.cpp.o
[ 46%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/PairProd.cpp.o
[ 47%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/PhotoAbsCS.cpp.o
[ 47%] Building CXX object CMakeFiles/Garfield.dir/Heed/heed++/code/PhotoAbsCSLib.cpp.o
[ 48%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/box.cpp.o
[ 48%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/circumf.cpp.o
[ 49%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/gparticle.cpp.o
[ 49%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/mparticle.cpp.o
[ 50%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/plane.cpp.o
[ 50%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/polyline.cpp.o
[ 51%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/straight.cpp.o
[ 51%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/surface.cpp.o
[ 51%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/trajestep.cpp.o
[ 52%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/vec.cpp.o
[ 52%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/geometry/volume.cpp.o
[ 53%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/ioniz/bethe_bloch.cpp.o
[ 53%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/ioniz/e_cont_enloss.cpp.o
[ 54%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/math/DoubleAc.cpp.o
[ 54%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/math/PolLeg.cpp.o
[ 55%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/math/cubic.cpp.o
[ 55%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/math/kinem.cpp.o
[ 56%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/math/linexi2.cpp.o
[ 56%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/math/lorgamma.cpp.o
[ 57%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/math/parabola.cpp.o
[ 57%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/matrix/inverse.cpp.o
[ 57%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/matrix/multiply.cpp.o
[ 58%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/matter/AtomDef.cpp.o
[ 58%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/matter/GasDef.cpp.o
[ 59%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/matter/GasLib.cpp.o
[ 59%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/matter/MatterDef.cpp.o
[ 60%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/matter/MoleculeDef.cpp.o
[ 60%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/particle/eparticle.cpp.o
[ 61%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/particle/particle_def.cpp.o
[ 61%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/random/PointsRan.cpp.o
[ 62%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/random/chisran.cpp.o
[ 62%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/random/pois.cpp.o
[ 63%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/random/rnorm.cpp.o
[ 63%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/safetl/AbsArr.cpp.o
[ 63%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/safetl/AbsPtr.cpp.o
[ 64%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/stream/definp.cpp.o
[ 64%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/stream/findmark.cpp.o
[ 65%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/stream/prstream.cpp.o
[ 65%] Building CXX object CMakeFiles/Garfield.dir/Heed/wcpplib/util/FunNameStack.cpp.o
[ 66%] Building CXX object CMakeFiles/Garfield.dir/Heed/HeedFieldMap.cpp.o
[ 66%] Linking CXX shared library libGarfield.so
[ 66%] Built target Garfield
Scanning dependencies of target gem
[ 67%] Building CXX object Examples/Gem/CMakeFiles/gem.dir/gem.C.o
[ 67%] Linking CXX executable gem
[ 67%] Built target gem
Scanning dependencies of target mdt_mt
[ 67%] Building CXX object Examples/DriftTube/CMakeFiles/mdt_mt.dir/mdt_mt.C.o
[ 68%] Linking CXX executable mdt_mt
[ 68%] Built target mdt_mt
Scanning dependencies of target mdt
[ 68%] Building CXX object Examples/DriftTube/CMakeFiles/mdt.dir/mdt.C.o
[ 69%] Linking CXX executable mdt
[ 69%] Built target mdt
Scanning dependencies of target penning
[ 70%] Building CXX object Examples/GasFile/CMakeFiles/penning.dir/penning.C.o
[ 70%] Linking CXX executable penning
[ 70%] Built target penning
Scanning dependencies of target merge
[ 70%] Building CXX object Examples/GasFile/CMakeFiles/merge.dir/merge.C.o
[ 71%] Linking CXX executable merge
[ 71%] Built target merge
Scanning dependencies of target read
[ 71%] Building CXX object Examples/GasFile/CMakeFiles/read.dir/read.C.o
[ 72%] Linking CXX executable read
[ 72%] Built target read
Scanning dependencies of target printTable
[ 73%] Building CXX object Examples/GasFile/CMakeFiles/printTable.dir/printTable.C.o
[ 73%] Linking CXX executable printTable
[ 73%] Built target printTable
Scanning dependencies of target generate
[ 74%] Building CXX object Examples/GasFile/CMakeFiles/generate.dir/generate.C.o
[ 74%] Linking CXX executable generate
[ 74%] Built target generate
Scanning dependencies of target gallery
[ 75%] Building CXX object Examples/AnalyticField/CMakeFiles/gallery.dir/gallery.C.o
[ 75%] Linking CXX executable gallery
[ 75%] Built target gallery
Scanning dependencies of target fieldlines
[ 76%] Building CXX object Examples/AnalyticField/CMakeFiles/fieldlines.dir/fieldlines.C.o
[ 76%] Linking CXX executable fieldlines
[ 76%] Built target fieldlines
Scanning dependencies of target polar
[ 77%] Building CXX object Examples/AnalyticField/CMakeFiles/polar.dir/polar.C.o
[ 77%] Linking CXX executable polar
[ 77%] Built target polar
Scanning dependencies of target dipole
[ 78%] Building CXX object Examples/AnalyticField/CMakeFiles/dipole.dir/dipole.C.o
[ 78%] Linking CXX executable dipole
[ 78%] Built target dipole
Scanning dependencies of target strip
[ 78%] Building CXX object Examples/AnalyticField/CMakeFiles/strip.dir/strip.C.o
[ 79%] Linking CXX executable strip
[ 79%] Built target strip
Scanning dependencies of target isochrons
[ 79%] Building CXX object Examples/AnalyticField/CMakeFiles/isochrons.dir/isochrons.C.o
[ 80%] Linking CXX executable isochrons
[ 80%] Built target isochrons
Scanning dependencies of target wedge
[ 80%] Building CXX object Examples/AnalyticField/CMakeFiles/wedge.dir/wedge.C.o
[ 81%] Linking CXX executable wedge
[ 81%] Built target wedge
Scanning dependencies of target integrate
[ 82%] Building CXX object Examples/AnalyticField/CMakeFiles/integrate.dir/integrate.C.o
[ 82%] Linking CXX executable integrate
[ 82%] Built target integrate
Scanning dependencies of target savefield
[ 82%] Building CXX object Examples/Grid/CMakeFiles/savefield.dir/savefield.C.o
[ 83%] Linking CXX executable savefield
[ 83%] Built target savefield
Scanning dependencies of target plotfield
[ 84%] Building CXX object Examples/Grid/CMakeFiles/plotfield.dir/plotfield.C.o
[ 84%] Linking CXX executable plotfield
[ 84%] Built target plotfield
Scanning dependencies of target plotdedx
[ 85%] Building CXX object Examples/Heed/CMakeFiles/plotdedx.dir/plotdedx.C.o
[ 85%] Linking CXX executable plotdedx
[ 85%] Built target plotdedx
Scanning dependencies of target fe55
[ 86%] Building CXX object Examples/Heed/CMakeFiles/fe55.dir/fe55.C.o
[ 86%] Linking CXX executable fe55
[ 86%] Built target fe55
Scanning dependencies of target rangeSi
[ 86%] Building CXX object Examples/Heed/CMakeFiles/rangeSi.dir/rangeSi.C.o
[ 87%] Linking CXX executable rangeSi
[ 87%] Built target rangeSi
Scanning dependencies of target qdepSi
[ 88%] Building CXX object Examples/Heed/CMakeFiles/qdepSi.dir/qdepSi.C.o
[ 88%] Linking CXX executable qdepSi
[ 88%] Built target qdepSi
Scanning dependencies of target edep
[ 89%] Building CXX object Examples/Heed/CMakeFiles/edep.dir/edep.C.o
[ 89%] Linking CXX executable edep
[ 89%] Built target edep
Scanning dependencies of target trim
[ 89%] Building CXX object Examples/Srim/CMakeFiles/trim.dir/trim.C.o
[ 90%] Linking CXX executable trim
[ 90%] Built target trim
Scanning dependencies of target srim
[ 90%] Building CXX object Examples/Srim/CMakeFiles/srim.dir/srim.C.o
[ 91%] Linking CXX executable srim
[ 91%] Built target srim
Scanning dependencies of target exampleGeant4Interface
[ 92%] Building CXX object Examples/Geant4GarfieldInterface/CMakeFiles/exampleGeant4Interface.dir/exampleGarfield.cc.o
In file included from /usr/local/include/TString.h:29,
from /usr/local/include/TNamed.h:26,
from /usr/local/include/TRandom.h:25,
from /usr/local/include/TRandom3.h:25,
from /home/xxc/garfieldpp-master/Include/Garfield/RandomEngineRoot.hh:4,
from /home/xxc/garfieldpp-master/Include/Garfield/Random.hh:6,
from /home/xxc/garfieldpp-master/Examples/Geant4GarfieldInterface/exampleGarfield.cc:46:
/usr/local/include/ROOT/RStringView.hxx:32:37: error: β€˜experimental’ in namespace β€˜std’ does not name a type
32 | using basic_string_view = ::std::experimental::basic_string_view<_CharT,_Traits>;
| ^~~~~~~~~~~~
/usr/local/include/ROOT/RStringView.hxx:35:12: error: β€˜basic_string_view’ does not name a type
35 | typedef basic_string_view string_view;
| ^~~~~~~~~~~~~~~~~
/usr/local/include/ROOT/RStringView.hxx:36:12: error: β€˜basic_string_view’ does not name a type
36 | typedef basic_string_view<char16_t> u16string_view;
| ^~~~~~~~~~~~~~~~~
/usr/local/include/ROOT/RStringView.hxx:37:12: error: β€˜basic_string_view’ does not name a type
37 | typedef basic_string_view<char32_t> u32string_view;
| ^~~~~~~~~~~~~~~~~
/usr/local/include/ROOT/RStringView.hxx:38:12: error: β€˜basic_string_view’ does not name a type
38 | typedef basic_string_view<wchar_t> wstring_view;
| ^~~~~~~~~~~~~~~~~
/usr/local/include/ROOT/RStringView.hxx:48:28: error: β€˜string_view’ is not a member of β€˜std’
48 | inline double stod(std::string_view str, size_t *pos)
| ^~~~~~~~~~~
/usr/local/include/ROOT/RStringView.hxx:48:28: note: β€˜std::string_view’ is only available from C++17 onwards
/usr/local/include/ROOT/RStringView.hxx:48:52: error: expected primary-expression before β€˜*’ token
48 | inline double stod(std::string_view str, size_t pos)
| ^
/usr/local/include/ROOT/RStringView.hxx:48:53: error: β€˜pos’ was not declared in this scope; did you mean β€˜pow’?
48 | inline double stod(std::string_view str, size_t pos)
| ^~~
| pow
/usr/local/include/ROOT/RStringView.hxx:48:56: error: expression list treated as compound expression in initializer [-fpermissive]
48 | inline double stod(std::string_view str, size_t *pos)
| ^
/usr/local/include/ROOT/RStringView.hxx:65:56: error: β€˜std::string_view’ has not been declared
65 | inline std::string &operator+=(std::string &left, std::string_view right)
| ^~~~~~~~~~~
/usr/local/include/ROOT/RStringView.hxx: In function β€˜std::string& std::__ROOT::operator+=(std::string&, int)’:
/usr/local/include/ROOT/RStringView.hxx:67:29: error: request for member β€˜data’ in β€˜right’, which is of non-class type β€˜int’
67 | return left.append(right.data(), right.size());
| ^~~~
/usr/local/include/ROOT/RStringView.hxx:67:43: error: request for member β€˜size’ in β€˜right’, which is of non-class type β€˜int’
67 | return left.append(right.data(), right.size());
| ^~~~
/usr/local/include/ROOT/RStringView.hxx: At global scope:
/usr/local/include/ROOT/RStringView.hxx:84:17: error: expected type-specifier
84 | operator std::string_view() const { return std::string_view(fData,fLength); }
| ^~~
In file included from /usr/local/include/TNamed.h:26,
from /usr/local/include/TRandom.h:25,
from /usr/local/include/TRandom3.h:25,
from /home/xxc/garfieldpp-master/Include/Garfield/RandomEngineRoot.hh:4,
from /home/xxc/garfieldpp-master/Include/Garfield/Random.hh:6,
from /home/xxc/garfieldpp-master/Examples/Geant4GarfieldInterface/exampleGarfield.cc:46:
/usr/local/include/TString.h:115:13: error: expected type-specifier
115 | operator std::string_view() const { return std::string_view(Data(),fExtent); }
| ^~~
/usr/local/include/TString.h:280:32: error: β€˜string_view’ in namespace β€˜std’ does not name a type
280 | explicit TString(const std::string_view &sub);
| ^~~~~~~~~~~
/usr/local/include/TString.h:280:27: note: β€˜std::string_view’ is only available from C++17 onwards
280 | explicit TString(const std::string_view &sub);
| ^~~
/usr/local/include/TString.h:317:37: error: β€˜string_view’ in namespace β€˜std’ does not name a type
317 | TString &operator=(const std::string_view &s);
| ^~~~~~~~~~~
/usr/local/include/TString.h:317:32: note: β€˜std::string_view’ is only available from C++17 onwards
317 | TString &operator=(const std::string_view &s);
| ^~~
/usr/local/include/TString.h:444:9: error: β€˜string_view’ in namespace β€˜std’ does not name a type
444 | std::string_view View() const { return std::string_view(GetPointer(),Length()); }
| ^~~~~~~~~~~
/usr/local/include/TString.h:444:4: note: β€˜std::string_view’ is only available from C++17 onwards
444 | std::string_view View() const { return std::string_view(GetPointer(),Length()); }
| ^~~
In file included from /usr/local/include/TNamed.h:26,
from /usr/local/include/TRandom.h:25,
from /usr/local/include/TRandom3.h:25,
from /home/xxc/garfieldpp-master/Include/Garfield/RandomEngineRoot.hh:4,
from /home/xxc/garfieldpp-master/Include/Garfield/Random.hh:6,
from /home/xxc/garfieldpp-master/Examples/Geant4GarfieldInterface/exampleGarfield.cc:46:
/usr/local/include/TString.h:839:53: error: β€˜string_view’ in namespace β€˜std’ does not name a type
839 | inline Bool_t operator==(const char *s1, const std::string_view &s2)
| ^~~~~~~~~~~
/usr/local/include/TString.h:839:48: note: β€˜std::string_view’ is only available from C++17 onwards
839 | inline Bool_t operator==(const char s1, const std::string_view &s2)
| ^~~
/usr/local/include/TString.h:839:15: error: β€˜Bool_t operator==(const char
, const int&)’ must have an argument of class or enumerated type
839 | inline Bool_t operator==(const char *s1, const std::string_view &s2)
| ^~~~~~~~
/usr/local/include/TString.h:844:37: error: β€˜string_view’ in namespace β€˜std’ does not name a type
844 | inline Bool_t operator==(const std::string_view &s1, const char *s2)
| ^~~~~~~~~~~
/usr/local/include/TString.h:844:32: note: β€˜std::string_view’ is only available from C++17 onwards
844 | inline Bool_t operator==(const std::string_view &s1, const char s2)
| ^~~
/usr/local/include/TString.h:844:15: error: β€˜Bool_t operator==(const int&, const char
)’ must have an argument of class or enumerated type
844 | inline Bool_t operator==(const std::string_view &s1, const char *s2)
| ^~~~~~~~
/usr/local/include/TString.h:857:37: error: β€˜string_view’ in namespace β€˜std’ does not name a type
857 | std::string printValue(const std::string_view
val);
| ^~~~~~~~~~~
/usr/local/include/TString.h:857:32: note: β€˜std::string_view’ is only available from C++17 onwards
857 | std::string printValue(const std::string_view
val);
| ^~~
make[2]: *** [Examples/Geant4GarfieldInterface/CMakeFiles/exampleGeant4Interface.dir/build.make:63: Examples/Geant4GarfieldInterface/CMakeFiles/exampleGeant4Interface.dir/exampleGarfield.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1174: Examples/Geant4GarfieldInterface/CMakeFiles/exampleGeant4Interface.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
xxc@xxc-linux:~/garfieldpp-master/build$

Can you try without building the examples (in particular the Geant4 interface example):

cmake -DWITH_EXAMPLES=OFF -B . -S ..

Since your source top-folder seems to be β€œpolluted” from a previous build attempt, I would recommend deleting /home/xxc/garfieldpp-master and starting from a fresh clone.

Hi, I have update the Garfield++ to the latest version, the error described above has been solved. It is just because I have install the Geant4, and the source script has some conflict. I delete the Geant4 path added in the bashrc ,then it works.
Thanks again for your help those days! and how do you know CMake thinks that /home/xxc/garfieldpp-master is a build folder (maybe because you have some remnants of a previous build in there). that 's cool.

Thanks for your reminder, I have not create a example yet. Can I establish a folder? like /home/xxc/garfieldpp-master/test ?
export GARFIELD_HOME=/home/xxc/garfieldpp-master/test
cmake -DCMAKE_INSTALL_PREFIX=/home/xxc/garfieldpp-master/test

Hi ,I have deleted the /home/xxc/garfieldpp-master file,and started from a fresh clone. but there are still errors.

  • CMake Error: The source directory β€œ/home/xxc/garfieldpp-master” does not exist.
    Specify --help for usage, or press the help button on the CMake GUI.
    bash: /home/xxc/garfieldpp-master/setupGarfield.sh: No such file or directory
    xxc@xxc-linux:~ git clone https://gitlab.cern.ch/garfield/garfieldpp.git Cloning into 'garfieldpp'... remote: Enumerating objects: 15083, done. remote: Counting objects: 100% (253/253), done. remote: Compressing objects: 100% (216/216), done. remote: Total 15083 (delta 114), reused 93 (delta 26), pack-reused 14830 Receiving objects: 100% (15083/15083), 68.75 MiB | 1.61 MiB/s, done. Resolving deltas: 100% (11011/11011), done. xxc@xxc-linux:~ source root-6.24.06/build/bin/thisroot.sh
    xxc@xxc-linux:~ export GARFIELD_HOME=/home/xxc/garfieldpp xxc@xxc-linux:~ cd GARFIELD_HOME xxc@xxc-linux:~/garfieldpp rm -rf build
    xxc@xxc-linux:~/garfieldpp$ mkdir build
    xxc@xxc-linux:~/garfieldpp$ cd build
    xxc@xxc-linux:~/garfieldpp/build$ cmake …
    – The CXX compiler identification is GNU 9.3.0
    – The Fortran compiler identification is GNU 9.3.0
    – Check for working CXX compiler: /usr/bin/c++
    – Check for working CXX compiler: /usr/bin/c++ – works
    – Detecting CXX compiler ABI info
    – Detecting CXX compiler ABI info - done
    – Detecting CXX compile features
    – Detecting CXX compile features - done
    – Check for working Fortran compiler: /usr/bin/gfortran
    – Check for working Fortran compiler: /usr/bin/gfortran – works
    – Detecting Fortran compiler ABI info
    – Detecting Fortran compiler ABI info - done
    – Checking whether /usr/bin/gfortran supports Fortran 90
    – Checking whether /usr/bin/gfortran supports Fortran 90 – yes
    – Install path: /home/xxc/garfieldpp/install
    – If you want to change this path call cmake -DCMAKE_INSTALL_PREFIX=my_install_path …
    – Found PkgConfig: /usr/bin/pkg-config (found version β€œ0.29.1”)
    – Found GSL: /usr/include (found version β€œ2.5”)
    – Found OpenMP_CXX: -fopenmp (found version β€œ4.5”)
    – Found OpenMP_Fortran: -fopenmp (found version β€œ4.5”)
    – Found OpenMP: TRUE (found version β€œ4.5”)
    – Creating a new library named magboltz with API version 11
    – Creating a new library named with API version
    – Garfield++ examples will be built. In order disable this option use -DWITH_EXAMPLES=OFF
    – The C compiler identification is GNU 9.3.0
    – Check for working C compiler: /usr/bin/cc
    – Check for working C compiler: /usr/bin/cc – works
    – Detecting C compiler ABI info
    – Detecting C compiler ABI info - done
    – Detecting C compile features
    – Detecting C compile features - done
    – Found OpenMP_C: -fopenmp (found version β€œ4.5”)
    – Found OpenMP_CXX: -fopenmp (found version β€œ4.5”)
    – Found OpenMP_Fortran: -fopenmp (found version β€œ4.5”)
    – Found OpenMP: TRUE (found version β€œ4.5”)
    CMake Warning at Examples/Geant4GarfieldInterface/CMakeLists.txt:16 (find_package):
    By not providing β€œFindGeant4.cmake” in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by β€œGeant4”, but
    CMake did not find one.

    Could not find a package configuration file provided by β€œGeant4” with any
    of the following names:

    Geant4Config.cmake
    geant4-config.cmake

    Add the installation prefix of β€œGeant4” to CMAKE_PREFIX_PATH or set
    β€œGeant4_DIR” to a directory containing one of the above files. If β€œGeant4”
    provides a separate development package or SDK, be sure it has been
    installed.

Geant4 is not found. Example cannot be built.
– Configuring done
– Generating done
– Build files have been written to: /home/xxc/garfieldpp/build

  • CMake Error: The source directory β€œ/home/xxc/garfieldpp-master” does not exist.
    Specify --help for usage, or press the help button on the CMake GUI.
    bash: /home/xxc/garfieldpp-master/setupGarfield.sh: No such file or directory
    xxc@xxc-linux:~ git clone https://gitlab.cern.ch/garfield/garfieldpp.git Cloning into 'garfieldpp'... remote: Enumerating objects: 15083, done. remote: Counting objects: 100% (253/253), done. remote: Compressing objects: 100% (216/216), done. remote: Total 15083 (delta 114), reused 93 (delta 26), pack-reused 14830 Receiving objects: 100% (15083/15083), 68.75 MiB | 1.61 MiB/s, done. Resolving deltas: 100% (11011/11011), done. xxc@xxc-linux:~ source root-6.24.06/build/bin/thisroot.sh
    xxc@xxc-linux:~ export GARFIELD_HOME=/home/xxc/garfieldpp xxc@xxc-linux:~ cd GARFIELD_HOME xxc@xxc-linux:~/garfieldpp rm -rf build
    xxc@xxc-linux:~/garfieldpp$ mkdir build
    xxc@xxc-linux:~/garfieldpp$ cd build
    xxc@xxc-linux:~/garfieldpp/build$ cmake …
    – The CXX compiler identification is GNU 9.3.0
    – The Fortran compiler identification is GNU 9.3.0
    – Check for working CXX compiler: /usr/bin/c++
    – Check for working CXX compiler: /usr/bin/c++ – works
    – Detecting CXX compiler ABI info
    – Detecting CXX compiler ABI info - done
    – Detecting CXX compile features
    – Detecting CXX compile features - done
    – Check for working Fortran compiler: /usr/bin/gfortran
    – Check for working Fortran compiler: /usr/bin/gfortran – works
    – Detecting Fortran compiler ABI info
    – Detecting Fortran compiler ABI info - done
    – Checking whether /usr/bin/gfortran supports Fortran 90
    – Checking whether /usr/bin/gfortran supports Fortran 90 – yes
    – Install path: /home/xxc/garfieldpp/install
    – If you want to change this path call cmake -DCMAKE_INSTALL_PREFIX=my_install_path …
    – Found PkgConfig: /usr/bin/pkg-config (found version β€œ0.29.1”)
    – Found GSL: /usr/include (found version β€œ2.5”)
    – Found OpenMP_CXX: -fopenmp (found version β€œ4.5”)
    – Found OpenMP_Fortran: -fopenmp (found version β€œ4.5”)
    – Found OpenMP: TRUE (found version β€œ4.5”)
    – Creating a new library named magboltz with API version 11
    – Creating a new library named with API version
    – Garfield++ examples will be built. In order disable this option use -DWITH_EXAMPLES=OFF
    – The C compiler identification is GNU 9.3.0
    – Check for working C compiler: /usr/bin/cc
    – Check for working C compiler: /usr/bin/cc – works
    – Detecting C compiler ABI info
    – Detecting C compiler ABI info - done
    – Detecting C compile features
    – Detecting C compile features - done
    – Found OpenMP_C: -fopenmp (found version β€œ4.5”)
    – Found OpenMP_CXX: -fopenmp (found version β€œ4.5”)
    – Found OpenMP_Fortran: -fopenmp (found version β€œ4.5”)
    – Found OpenMP: TRUE (found version β€œ4.5”)
    CMake Warning at Examples/Geant4GarfieldInterface/CMakeLists.txt:16 (find_package):
    By not providing β€œFindGeant4.cmake” in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by β€œGeant4”, but
    CMake did not find one.

    Could not find a package configuration file provided by β€œGeant4” with any
    of the following names:

    Geant4Config.cmake
    geant4-config.cmake

    Add the installation prefix of β€œGeant4” to CMAKE_PREFIX_PATH or set
    β€œGeant4_DIR” to a directory containing one of the above files. If β€œGeant4”
    provides a separate development package or SDK, be sure it has been
    installed.

Geant4 is not found. Example cannot be built.
– Configuring done
– Generating done
– Build files have been written to: /home/xxc/garfieldpp/build

Why do you say there are still errors? The above output looks ok to me, you just need to continue with make and make install.

1 Like

sorry, my bad. I found the sentence β€œ Geant4 is not found. Example cannot be built.” I will continue to install it. And would you please tell me what is the different between the root/build/bin/thisroot.sh and root/config/this root.sh. When source the thisroot.sh, which should be chosen? Thanks a lot!