Debugging 安装Garfield+时出错+;

Debugging 安装Garfield+时出错+;,debugging,cmake,Debugging,Cmake,事先道歉,我想这可能是以前贴过的东西,但我在搜索时找不到任何东西 我正在尝试安装Garfield++并在尝试运行cmake时收到一些错误消息。我的系统运行的是Ubuntu 18.04.5 LTS和根版本6.20/02 一切似乎都很顺利,直到我尝试make-jn 当这种情况发生时,我会得到这些错误 [ 0%] Generating GarfieldDict.cxx, libGarfieldDict_rdict.pcm, libGarfieldDict.rootmap In file includ

事先道歉,我想这可能是以前贴过的东西,但我在搜索时找不到任何东西

我正在尝试安装Garfield++并在尝试运行cmake时收到一些错误消息。我的系统运行的是Ubuntu 18.04.5 LTS和根版本6.20/02

一切似乎都很顺利,直到我尝试
make-jn

当这种情况发生时,我会得到这些错误

[  0%] Generating GarfieldDict.cxx, libGarfieldDict_rdict.pcm, libGarfieldDict.rootmap
In file included from input_line_6:3:
In file included from /home/jason/Root/build/include/TObject.h:18:
/home/jason/Root/build/include/TStorage.h:93:4: error: use of undeclared identifier 'R__likely'
   ClassDef(TStorage,0)  //Storage manager class
   ^
/home/jason/Root/build/include/Rtypes.h:327:4: note: expanded from macro 'ClassDef'
   _ClassDefOutline_(name,id,virtual,)   \
   ^
/home/jason/Root/build/include/Rtypes.h:301:4: note: expanded from macro '_ClassDefOutline_'
   _ClassDefBase_(name,id, virtual_keyword, overrd)       \
   ^
/home/jason/Root/build/include/Rtypes.h:276:11: note: expanded from macro '_ClassDefBase_'
      if (R__likely(recurseBlocker >= 2)) ...
          ^
In file included from input_line_6:3:
In file included from /home/jason/Root/build/include/TObject.h:18:
/home/jason/Root/build/include/TStorage.h:93:13: error: 'TStorage' does not refer to a value
   ClassDef(TStorage,0)  //Storage manager class
            ^
/home/jason/Root/build/include/TStorage.h:33:7: note: declared here
class TStorage {
      ^
/home/jason/Root/build/include/TStorage.h:118:1: error: use of undeclared identifier 'R__INTENTIONALLY_UNINIT_BEGIN'
R__INTENTIONALLY_UNINIT_BEGIN
^
/home/jason/Root/build/include/TStorage.h:120:1: error: use of undeclared identifier 'R__INTENTIONALLY_UNINIT_END'
R__INTENTIONALLY_UNINIT_END
^
/home/jason/Root/build/include/TStorage.h:131:1: error: unknown type name 'R__NEVER_INLINE'
R__NEVER_INLINE void TStorage::UpdateIsOnHeap(volatile const UInt_t &uni...
^
/home/jason/Root/build/include/TStorage.h:131:17: error: expected unqualified-id
R__NEVER_INLINE void TStorage::UpdateIsOnHeap(volatile const UInt_t &uni...
                ^
In file included from input_line_6:3:
/home/jason/Root/build/include/TObject.h:133:4: error: unknown type name 'R__ALWAYS_INLINE'
   R__ALWAYS_INLINE Bool_t IsOnHeap() const { return TestBit(kIsOnHeap); }
   ^
/home/jason/Root/build/include/TObject.h:133:27: error: expected ';' at end of declaration list
   R__ALWAYS_INLINE Bool_t IsOnHeap() const { return TestBit(kIsOnHeap); }
                          ^
                          ;
/home/jason/Root/build/include/TObject.h:169:30: error: unknown type name 'Bool_t'
   void     SetBit(UInt_t f, Bool_t set);
                             ^
/home/jason/Root/build/include/TObject.h:172:4: error: unknown type name 'R__ALWAYS_INLINE'
   R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const { return (Bool_t) ((f...
   ^
/home/jason/Root/build/include/TObject.h:172:21: error: duplicate member 'Bool_t'
   R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const { return (Bool_t) ((f...
                    ^
/home/jason/Root/build/include/TObject.h:133:21: note: previous declaration is here
   R__ALWAYS_INLINE Bool_t IsOnHeap() const { return TestBit(kIsOnHeap); }
                    ^
/home/jason/Root/build/include/TObject.h:172:27: error: expected ';' at end of declaration list
   R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const { return (Bool_t) ((f...
                          ^
                          ;
/home/jason/Root/build/include/TObject.h:210:11: error: unknown type name 'Bool_t'
   static Bool_t    GetObjectStat();
          ^
/home/jason/Root/build/include/TObject.h:211:35: error: unknown type name 'Bool_t'
   static void      SetObjectStat(Bool_t stat);
                                  ^
/home/jason/Root/build/include/TObject.h:215:4: error: unknown type name 'Bool_t'
   ClassDef(TObject,1)  //Basic ROOT object
   ^
/home/jason/Root/build/include/Rtypes.h:327:4: note: expanded from macro 'ClassDef'
   _ClassDefOutline_(name,id,virtual,)   \
   ^
/home/jason/Root/build/include/Rtypes.h:301:4: note: expanded from macro '_ClassDefOutline_'
   _ClassDefBase_(name,id, virtual_keyword, overrd)       \
   ^
/home/jason/Root/build/include/Rtypes.h:273:20: note: expanded from macro '_ClassDefBase_'
   virtual_keyword Bool_t CheckTObjectHashConsistency() const overr...
                   ^
In file included from input_line_6:3:
/home/jason/Root/build/include/TObject.h:215:4: error: use of undeclared identifier 'R__likely'
/home/jason/Root/build/include/Rtypes.h:327:4: note: expanded from macro 'ClassDef'
   _ClassDefOutline_(name,id,virtual,)   \
   ^
/home/jason/Root/build/include/Rtypes.h:301:4: note: expanded from macro '_ClassDefOutline_'
   _ClassDefBase_(name,id, virtual_keyword, overrd)       \
   ^
/home/jason/Root/build/include/Rtypes.h:276:11: note: expanded from macro '_ClassDefBase_'
      if (R__likely(recurseBlocker >= 2)) ...
          ^
In file included from input_line_6:3:
/home/jason/Root/build/include/TObject.h:215:13: error: 'TObject' does not refer to a value
   ClassDef(TObject,1)  //Basic ROOT object
            ^
/home/jason/Root/build/include/TObject.h:37:7: note: declared here
class TObject {
      ^
/home/jason/Root/build/include/TObject.h:237:8: error: use of undeclared identifier 'R__unlikely'
   if (R__unlikely(fgObjectStat)) TObject::AddToTObjectTable(this);
       ^
/home/jason/Root/build/include/TObject.h:261:8: error: use of undeclared identifier 'R__unlikely'
   if (R__unlikely(fgObjectStat)) TObject::AddToTObjectTable(this);
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Error: Error loading the default header files.
CMakeFiles/Garfield.dir/build.make:208: recipe for target 'GarfieldDict.cxx' failed
make[2]: *** [GarfieldDict.cxx] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Garfield.dir/all' failed
make[1]: *** [CMakeFiles/Garfield.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
坦率地说,我对这意味着什么只有一个模糊的概念。我认为这意味着Garfield++cmake可以找到我的根,但由于某种原因无法正确读取它,我不知道如何修复它

任何帮助都将不胜感激

我在办公室里按照指示做了

  • 第一阶段-- 唯一偏离链接的是必须告诉ccmake我的根目录在哪里。第一阶段检查的先决条件:C++编译器,它支持C++ 11、root(至少版本6)、GSL(GNU科学库)和CMake(至少3.3版本)。只是缺少GSL,所以我去下载并安装了2.6版

  • 第二阶段

    mkdir GARFIELD
    export GARFIELD_HOME=/home/GARFIELD
    git clone http://gitlab.cern.ch/garfield/garfieldpp.git $GARFIELD_HOME
    cd $GARFIELD_HOME
    mkdir build
    cd build
    cmake $GARFIELD_HOME
    make -j 4
    
失败的最后一步。[虽然我已经注意到,倒数第二步在运行时确实会留下一个空白字段。下面是
cmake$GARFIELD\u HOME
的结果

-- -----------------------------------------------------------
-- Garfield source files: Source/AvalancheMC.cc;Source/AvalancheMicroscopic.cc;Source/Component.cc;Source/ComponentAnalyticField.cc;Source/ComponentAnsys121.cc;Source/ComponentAnsys123.cc;Source/ComponentCST.cc;Source/ComponentComsol.cc;Source/ComponentConstant.cc;Source/ComponentElmer.cc;Source/ComponentElmer2D.cc;Source/ComponentFieldMap.cc;Source/ComponentGrid.cc;Source/ComponentNeBem2d.cc;Source/ComponentNeBem3d.cc;Source/ComponentNeBem3dMap.cc;Source/ComponentTcad2d.cc;Source/ComponentTcad3d.cc;Source/ComponentUser.cc;Source/ComponentVoxel.cc;Source/DriftLineRKF.cc;Source/GeometryRoot.cc;Source/GeometrySimple.cc;Source/KDTree.cc;Source/Medium.cc;Source/MediumCdTe.cc;Source/MediumGaAs.cc;Source/MediumGas.cc;Source/MediumMagboltz.cc;Source/MediumSilicon.cc;Source/Numerics.cc;Source/OpticalData.cc;Source/PlottingEngineRoot.cc;Source/Polygon.cc;Source/Random.cc;Source/RandomEngineRoot.cc;Source/Sensor.cc;Source/Shaper.cc;Source/Solid.cc;Source/SolidBox.cc;Source/SolidExtrusion.cc;Source/SolidHole.cc;Source/SolidRidge.cc;Source/SolidSphere.cc;Source/SolidTube.cc;Source/SolidWire.cc;Source/TetrahedralTree.cc;Source/Track.cc;Source/TrackBichsel.cc;Source/TrackElectron.cc;Source/TrackHeed.cc;Source/TrackPAI.cc;Source/TrackSimple.cc;Source/TrackSrim.cc;Source/ViewBase.cc;Source/ViewCell.cc;Source/ViewDrift.cc;Source/ViewFEMesh.cc;Source/ViewField.cc;Source/ViewGeometry.cc;Source/ViewIsochrons.cc;Source/ViewMedium.cc;Source/ViewSignal.cc;GarfieldDict.cxx
-- -----------------------------------------------------------
-- Heed source files: Heed/HeedFieldMap.cpp;Heed/heed++/code/BGMesh.cpp;Heed/heed++/code/ElElasticScat.cpp;Heed/heed++/code/EnTransfCS.cpp;Heed/heed++/code/EnTransfCS_BGM.cpp;Heed/heed++/code/EnergyMesh.cpp;Heed/heed++/code/HeedCluster.cpp;Heed/heed++/code/HeedCondElectron.cpp;Heed/heed++/code/HeedDeltaElectron.cpp;Heed/heed++/code/HeedDeltaElectronCS.cpp;Heed/heed++/code/HeedMatterDef.cpp;Heed/heed++/code/HeedParticle.cpp;Heed/heed++/code/HeedParticle_BGM.cpp;Heed/heed++/code/HeedPhoton.cpp;Heed/heed++/code/PairProd.cpp;Heed/heed++/code/PhotoAbsCS.cpp;Heed/heed++/code/PhotoAbsCSLib.cpp;;Heed/wcpplib/geometry/box.cpp;Heed/wcpplib/geometry/circumf.cpp;Heed/wcpplib/geometry/gparticle.cpp;Heed/wcpplib/geometry/mparticle.cpp;Heed/wcpplib/geometry/plane.cpp;Heed/wcpplib/geometry/polyline.cpp;Heed/wcpplib/geometry/straight.cpp;Heed/wcpplib/geometry/surface.cpp;Heed/wcpplib/geometry/trajestep.cpp;Heed/wcpplib/geometry/vec.cpp;Heed/wcpplib/geometry/volume.cpp;Heed/wcpplib/ioniz/bethe_bloch.cpp;Heed/wcpplib/ioniz/e_cont_enloss.cpp;Heed/wcpplib/math/DoubleAc.cpp;Heed/wcpplib/math/PolLeg.cpp;Heed/wcpplib/math/cubic.cpp;Heed/wcpplib/math/kinem.cpp;Heed/wcpplib/math/linexi2.cpp;Heed/wcpplib/math/lorgamma.cpp;Heed/wcpplib/math/parabola.cpp;Heed/wcpplib/matrix/inverse.cpp;Heed/wcpplib/matrix/multiply.cpp;Heed/wcpplib/matter/AtomDef.cpp;Heed/wcpplib/matter/GasDef.cpp;Heed/wcpplib/matter/GasLib.cpp;Heed/wcpplib/matter/MatterDef.cpp;Heed/wcpplib/matter/MoleculeDef.cpp;Heed/wcpplib/particle/eparticle.cpp;Heed/wcpplib/particle/particle_def.cpp;Heed/wcpplib/random/PointsRan.cpp;Heed/wcpplib/random/chisran.cpp;Heed/wcpplib/random/pois.cpp;Heed/wcpplib/random/rnorm.cpp;Heed/wcpplib/safetl/AbsArr.cpp;Heed/wcpplib/safetl/AbsPtr.cpp;Heed/wcpplib/stream/definp.cpp;Heed/wcpplib/stream/findmark.cpp;Heed/wcpplib/stream/prstream.cpp;Heed/wcpplib/util/FunNameStack.cpp
-- -----------------------------------------------------------
-- Magboltz source files: Source/magboltz-11.9.f
-- -----------------------------------------------------------
-- neBEM source files: NeBem/ComputeProperties.c;NeBem/GarfieldppInterface.cpp;NeBem/Isles.c;NeBem/ReTriM.c;NeBem/Vector.c;NeBem/luc.c;NeBem/neBEM.c;NeBem/neBEMInterface.c;NeBem/nrutil.c;NeBem/svdcmp.c
-- -----------------------------------------------------------
-- Directory used to find ROOT dict files: 
-- -----------------------------------------------------------
-- Garfield++ examples will be built. In order disable this option use -DWITH_EXAMPLES=OFF
-- Install path: /usr/local
-- If you want to change this path call cmake -DCMAKE_INSTALL_PREFIX=my_install_path ...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jason/GARFIELD/build
请注意,根目录行为空。如何修复该问题

编辑:2-

测量成功。将根目录的读取位置切换到安装位置,而不是构建位置,我收到一条新的错误消息

[  0%] Generating GarfieldDict.cxx, libGarfieldDict_rdict.pcm, libGarfieldDict.rootmap
No such file or directory
CMakeFiles/Garfield.dir/build.make:208: recipe for target 'GarfieldDict.cxx' failed
make[2]: *** [GarfieldDict.cxx] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Garfield.dir/all' failed
make[1]: *** [CMakeFiles/Garfield.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

仍在情绪化地处理全部含义。

Hmm,也许问题是您试图从
ROOT
的构建位置而不是安装位置使用
ROOT
软件包(不是手动构建它们)但是他们安装了太多的依赖项,以至于我以后无法清理:)实际上似乎有所帮助,至少从某种意义上说,我收到了一条新的错误消息。嗯,也许问题是你试图使用
ROOT
,而不是从
ROOT
的构建位置,而不是从它的安装位置?我开始安装
ROOT
软件包(不是手动构建的),但是它们安装了太多的依赖项,以至于我以后无法清理:)实际上似乎有所帮助,至少从某种意义上说,我收到了一条新的错误消息。