# Import the Ansys LIS files to the Garfield++

**URL:** <https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774>\
**Category:** Garfield++\
**Created:** [November 23, 2021, 2:38am UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774 "2021-11-23T02:38:48Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 27, 2021, 12:26pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/21 "2021-11-27T12:26:03Z")

</div>

> [@Wile\_E\_Coyote](#):
>
> ROOT binary distribution (uses gcc 7) is incompatible with your operating system (uses gcc 9).

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!

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 27, 2021, 2:24pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/22 "2021-11-27T14:24:07Z")

</div>

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

 ![error](https://root-forum.cern.ch/uploads/default/original/3X/7/e/7e32558a5ab31897da8a4880cf8fffd65e72c080.png)

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 27, 2021, 2:35pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/23 "2021-11-27T14:35:19Z")

</div>

In [this post](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/17), it tries (and fails) to execute “`x86_64-linux-gnu-g++-7`”, and in [this post](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/14), 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.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 28, 2021, 1:22am UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/24 "2021-11-28T01:22:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 28, 2021, 1:24pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/25 "2021-11-28T13:24:17Z")

</div>

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.

 ![029bcb1144197fc1b0468f70dd5cd0f](https://root-forum.cern.ch/uploads/default/original/3X/2/3/23eb720127503eca54f00709f13b33495b3c1700.png)  
 ![error](https://root-forum.cern.ch/uploads/default/original/3X/7/e/7e32558a5ab31897da8a4880cf8fffd65e72c080.png)

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [November 28, 2021, 1:30pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/26 "2021-11-28T13:30:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 28, 2021, 2:45pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/27 "2021-11-28T14:45:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 28, 2021, 2:46pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/28 "2021-11-28T14:46:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [November 28, 2021, 3:14pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/29 "2021-11-28T15:14:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 29, 2021, 12:59am UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/30 "2021-11-29T00:59:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 29, 2021, 3:55am UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/31 "2021-11-29T03:55:22Z")

</div>

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$

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [November 29, 2021, 7:32am UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/32 "2021-11-29T07:32:17Z")

</div>

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

```auto
cmake ..

```

can you try

```auto
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++).

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 29, 2021, 10:04am UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/33 "2021-11-29T10:04:01Z")

</div>

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$

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [November 29, 2021, 10:20am UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/34 "2021-11-29T10:20:20Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 29, 2021, 10:50am UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/35 "2021-11-29T10:50:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 29, 2021, 11:19am UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/36 "2021-11-29T11:19:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 29, 2021, 1:31pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/37 "2021-11-29T13:31:36Z")

</div>

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.

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

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 29, 2021, 1:33pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/38 "2021-11-29T13:33:19Z")

</div>

- 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.

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

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [November 29, 2021, 1:44pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/39 "2021-11-29T13:44:23Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [November 29, 2021, 2:49pm UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774/40 "2021-11-29T14:49:03Z")

</div>

> [@XiCheng](#):
>
> Geant4 is not found. Example cannot be built.

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!

[Previous page](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774.md?page=1)

[Next page](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774.md?page=3)
