Message: Error when trying to using ROOT Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Error when trying to using ROOT  

Forum: Analysis
Date: 29 Dec, 2015
From: ckying <ckying>

Hi

I am trying the Brachytherapy example. The example get in from Geant4 version Geant4.10.2. The root installed is root version 6.06. I also write

source /home/ck/geant4.10.2-install/bin/geant4.sh source /home/ck/root-6.06.00/bin/thisroot.sh

in the bashrc file.

The example working well with cmake if without implement ROOT. When trying to enable root analysis by following the README step, built with WITH_ANALYSIS_USE=ON option, so I do

 cmake -DWITH_ANALYSIS_USE=ON -DGeant4_DIR= /home/ck/geant4.10.2-install/lib/Geant4-10.2.0/ /home/ck/g4work/brachytherapy/

compilation no problem and some files write in the build folder. Then I do 'make' in the build directory. The error as below occurred and executable file not produce , seem is the root linking error. The root analysis working well in the example AnaEx02, but AnaEx02 evoke the root by different method. I have no idea what cause the errors, can anyone help me to have a look what is the problem.

thanks

Best Regards CK

Below is part of the output

[73%] Building CXX object CMakeFiles/Brachy.dir/src/BrachyDetectorConstructionLeipzig.cc.o
[ 78%] Building CXX object CMakeFiles/Brachy.dir/src/BrachyMaterial.cc.o
[ 84%] Building CXX object CMakeFiles/Brachy.dir/src/BrachyFactoryLeipzig.cc.o
[ 89%] Building CXX object CMakeFiles/Brachy.dir/src/BrachyPrimaryGeneratorAction.cc.o
In file included from /home/ck/root-6.06.00/include/TObject.h:238:0,
                 from /home/ck/root-6.06.00/include/TNamed.h:26,
                 from /home/ck/root-6.06.00/include/TDirectory.h:25,
                 from /home/ck/root-6.06.00/include/TROOT.h:29,
                 from /home/ck/g4work/brachytherapy/include/BrachyAnalysisManager.hh:38,
                 from /home/ck/g4work/brachytherapy/src/BrachyPrimaryGeneratorAction.cc:53:
/home/ck/root-6.06.00/include/TBuffer.h: In function ‘TBuffer& operator>>(TBuffer&, Short_t&)’:
/home/ck/root-6.06.00/include/TBuffer.h:333:52: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TBuffer &operator>>(TBuffer &buf, Short_t &s)  { buf.ReadShort(s);  return buf; }
                                                    ^
/home/ck/root-6.06.00/include/TBuffer.h: In function ‘TBuffer& operator>>(TBuffer&, UShort_t&)’:
/home/ck/root-6.06.00/include/TBuffer.h:334:53: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TBuffer &operator>>(TBuffer &buf, UShort_t &s) { buf.ReadUShort(s); return buf; }
                                                     ^
/home/ck/root-6.06.00/include/TBuffer.h: In function ‘TBuffer& operator>>(TBuffer&, TString&)’:
/home/ck/root-6.06.00/include/TBuffer.h:344:52: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TBuffer &operator>>(TBuffer &buf, TString &s)  { buf.ReadTString(s);return buf; }
                                                    ^
/home/ck/root-6.06.00/include/TBuffer.h: In function ‘TBuffer& operator<<(TBuffer&, Short_t)’:
/home/ck/root-6.06.00/include/TBuffer.h:349:51: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TBuffer &operator<<(TBuffer &buf, Short_t s)  { buf.WriteShort(s);  return buf; }
                                                   ^
/home/ck/root-6.06.00/include/TBuffer.h: In function ‘TBuffer& operator<<(TBuffer&, UShort_t)’:
/home/ck/root-6.06.00/include/TBuffer.h:350:52: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TBuffer &operator<<(TBuffer &buf, UShort_t s) { buf.WriteUShort(s); return buf; }
                                                    ^
/home/ck/root-6.06.00/include/TBuffer.h: In function ‘TBuffer& operator<<(TBuffer&, const TString&)’:
/home/ck/root-6.06.00/include/TBuffer.h:360:58: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TBuffer &operator<<(TBuffer &buf, const TString &s) { buf.WriteTString(s);return buf; }
                                                          ^
In file included from /home/ck/root-6.06.00/include/TNamed.h:29:0,
                 from /home/ck/root-6.06.00/include/TDirectory.h:25,
                 from /home/ck/root-6.06.00/include/TROOT.h:29,
                 from /home/ck/g4work/brachytherapy/include/BrachyAnalysisManager.hh:38,
                 from /home/ck/g4work/brachytherapy/src/BrachyPrimaryGeneratorAction.cc:53:
/home/ck/root-6.06.00/include/TString.h: In copy constructor ‘TSubString::TSubString(const TSubString&)’:
/home/ck/root-6.06.00/include/TString.h:106:6: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
      : fStr(s.fStr), fBegin(s.fBegin), fExtent(s.fExtent) { }
      ^
/home/ck/root-6.06.00/include/TString.h: In static member function ‘static Ssiz_t TString::Align(Ssiz_t)’:
/home/ck/root-6.06.00/include/TString.h:213:35: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    static Ssiz_t  Align(Ssiz_t s) { return (s + (kAlignment-1)) & ~(kAlignment-1); }
                                   ^
/home/ck/root-6.06.00/include/TString.h: In static member function ‘static Ssiz_t TString::Recommend(Ssiz_t)’:
/home/ck/root-6.06.00/include/TString.h:214:39: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    static Ssiz_t  Recommend(Ssiz_t s) { return (s < kMinCap ? kMinCap : Align(s+1)) - 1; }
                                       ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘void TString::SetShortSize(Ssiz_t)’:
/home/ck/root-6.06.00/include/TString.h:220:42: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    void           SetShortSize(Ssiz_t s) { fRep.fShort.fSize = (unsigned char)(s << 1); }
                                          ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘void TString::SetLongSize(Ssiz_t)’:
/home/ck/root-6.06.00/include/TString.h:226:41: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    void           SetLongSize(Ssiz_t s) { fRep.fLong.fSize = s; }
                                         ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘void TString::SetSize(Ssiz_t)’:
/home/ck/root-6.06.00/include/TString.h:228:37: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    void           SetSize(Ssiz_t s) { IsLong() ? SetLongSize(s) : SetShortSize(s); }
                                     ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘void TString::SetLongCap(Ssiz_t)’:
/home/ck/root-6.06.00/include/TString.h:229:40: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    void           SetLongCap(Ssiz_t s) { fRep.fLong.fCap = kLongMask | s; }
                                        ^
In file included from /home/ck/root-6.06.00/include/TNamed.h:29:0,
                 from /home/ck/root-6.06.00/include/TDirectory.h:25,
                 from /home/ck/root-6.06.00/include/TROOT.h:29,
                 from /home/ck/g4work/brachytherapy/include/BrachyAnalysisManager.hh:38,
                 from /home/ck/g4work/brachytherapy/src/BrachyPrimaryGeneratorAction.cc:53:
/home/ck/root-6.06.00/include/TString.h: In function ‘UInt_t Hash(const TString&)’:
/home/ck/root-6.06.00/include/TString.h:459:36: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline UInt_t Hash(const TString &s) { return s.Hash(); }
                                    ^
/home/ck/root-6.06.00/include/TString.h: In function ‘UInt_t Hash(const TString*)’:
/home/ck/root-6.06.00/include/TString.h:460:36: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline UInt_t Hash(const TString *s) { return s->Hash(); }
                                    ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::Append(const TString&)’:
/home/ck/root-6.06.00/include/TString.h:498:49: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TString &TString::Append(const TString &s)
                                                 ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::Append(const TString&, Ssiz_t)’:
/home/ck/root-6.06.00/include/TString.h:501:59: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TString &TString::Append(const TString &s, Ssiz_t n)
                                                           ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::operator+=(const TString&)’:
/home/ck/root-6.06.00/include/TString.h:507:53: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TString &TString::operator+=(const TString &s)
                                                     ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::operator+=(Long_t)’:
/home/ck/root-6.06.00/include/TString.h:514:12: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 { char s[32]; sprintf(s, "%ld", i); return operator+=(s); }
            ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::operator+=(ULong_t)’:
/home/ck/root-6.06.00/include/TString.h:517:12: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 { char s[32]; sprintf(s, "%lu", i); return operator+=(s); }
            ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::operator+=(Double_t)’:
/home/ck/root-6.06.00/include/TString.h:533:13: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    char s[32];
             ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::operator+=(Long64_t)’:
/home/ck/root-6.06.00/include/TString.h:544:13: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    char s[32];
             ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::operator+=(ULong64_t)’:
/home/ck/root-6.06.00/include/TString.h:552:13: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    char s[32];
             ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘Bool_t TString::BeginsWith(const char*, TString::ECaseCompare) const’:
/home/ck/root-6.06.00/include/TString.h:558:68: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline Bool_t TString::BeginsWith(const char *s, ECaseCompare cmp) const
                                                                    ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘Bool_t TString::Contains(const char*, TString::ECaseCompare) const’:
/home/ck/root-6.06.00/include/TString.h:567:66: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline Bool_t TString::Contains(const char *s, ECaseCompare cmp) const
                                                                  ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘Ssiz_t TString::Index(const char*, Ssiz_t, TString::ECaseCompare) const’:
/home/ck/root-6.06.00/include/TString.h:582:73: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline Ssiz_t TString::Index(const char *s, Ssiz_t i, ECaseCompare cmp) const
                                                                         ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘Ssiz_t TString::Index(const TString&, Ssiz_t, TString::ECaseCompare) const’:
/home/ck/root-6.06.00/include/TString.h:585:76: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline Ssiz_t TString::Index(const TString &s, Ssiz_t i, ECaseCompare cmp) const
                                                                            ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::Insert(Ssiz_t, const TString&)’:
/home/ck/root-6.06.00/include/TString.h:598:61: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TString &TString::Insert(Ssiz_t pos, const TString &s)
                                                             ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::Insert(Ssiz_t, const TString&, Ssiz_t)’:
/home/ck/root-6.06.00/include/TString.h:601:71: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TString &TString::Insert(Ssiz_t pos, const TString &s, Ssiz_t n)
                                                                       ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::Prepend(const TString&)’:
/home/ck/root-6.06.00/include/TString.h:610:50: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TString &TString::Prepend(const TString &s)
                                                  ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::Prepend(const TString&, Ssiz_t)’:
/home/ck/root-6.06.00/include/TString.h:613:60: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TString &TString::Prepend(const TString &s, Ssiz_t n)
                                                            ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::Replace(Ssiz_t, Ssiz_t, const TString&)’:
/home/ck/root-6.06.00/include/TString.h:628:72: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TString &TString::Replace(Ssiz_t pos, Ssiz_t n, const TString& s)
                                                                        ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TString& TString::Replace(Ssiz_t, Ssiz_t, const TString&, Ssiz_t)’:
/home/ck/root-6.06.00/include/TString.h:632:43: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
                                  Ssiz_t n2)
                                           ^
/home/ck/root-6.06.00/include/TString.h: In member function ‘TSubString& TSubString::operator=(const TSubString&)’:
/home/ck/root-6.06.00/include/TString.h:695:61: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
 inline TSubString &TSubString::operator=(const TSubString &s)
                                                             ^
In file included from /home/ck/root-6.06.00/include/TMap.h:32:0,
                 from /home/ck/root-6.06.00/include/TFile.h:29,
                 from /home/ck/g4work/brachytherapy/include/BrachyAnalysisManager.hh:39,
                 from /home/ck/g4work/brachytherapy/src/BrachyPrimaryGeneratorAction.cc:53:
/home/ck/root-6.06.00/include/THashTable.h: In member function ‘Int_t THashTable::GetHashValue(TString&) const’:
/home/ck/root-6.06.00/include/THashTable.h:50:47: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    Int_t       GetHashValue(TString &s) const { return s.Hash() % fSize; }
                                               ^
In file included from /home/ck/root-6.06.00/include/TClass.h:34:0,
                 from /home/ck/root-6.06.00/include/TTree.h:62,
                 from /home/ck/root-6.06.00/include/TNtuple.h:25,
                 from /home/ck/g4work/brachytherapy/include/BrachyAnalysisManager.hh:40,
                 from /home/ck/g4work/brachytherapy/src/BrachyPrimaryGeneratorAction.cc:53:
/home/ck/root-6.06.00/include/TObjString.h: In constructor ‘TObjString::TObjString(const char*)’:
/home/ck/root-6.06.00/include/TObjString.h:38:35: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    TObjString(const char *s = "") : fString(s) { }
                                   ^
/home/ck/root-6.06.00/include/TObjString.h: In copy constructor ‘TObjString::TObjString(const TObjString&)’:
/home/ck/root-6.06.00/include/TObjString.h:39:36: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    TObjString(const TObjString &s) : TObject(), fString(s.fString) { }
                                    ^
/home/ck/root-6.06.00/include/TObjString.h: In member function ‘void TObjString::SetString(const char*)’:
/home/ck/root-6.06.00/include/TObjString.h:49:41: warning: declaration of ‘s’ shadows a global declaration [-Wshadow]
    void        SetString(const char *s) { fString = s; }
                                         ^
[ 94%] Building CXX object CMakeFiles/Brachy.dir/src/BrachyFactoryIr.cc.o
[100%] Linking CXX executable Brachy
CMakeFiles/Brachy.dir/Brachy.cc.o: In function `__static_initialization_and_destruction_0(int, int)':
Brachy.cc:(.text+0x5b6): undefined reference to `TVersionCheck::TVersionCheck(int)'
CMakeFiles/Brachy.dir/src/BrachyAnalysisManager.cc.o: In function `BrachyAnalysisManager::book()':
BrachyAnalysisManager.cc:(.text+0xd6): undefined reference to `TFile::TFile(char const*, char const*, char const*, int)'
BrachyAnalysisManager.cc:(.text+0x118): undefined reference to `TH1F::TH1F(char const*, char const*, int, double, double)'
BrachyAnalysisManager.cc:(.text+0x14a): undefined reference to `TNtuple::TNtuple(char const*, char const*, char const*, int)'
BrachyAnalysisManager.cc:(.text+0x15f): undefined reference to `TObject::operator delete(void*)'
BrachyAnalysisManager.cc:(.text+0x175): undefined reference to `TObject::operator delete(void*)'
BrachyAnalysisManager.cc:(.text+0x18b): undefined reference to `TObject::operator delete(void*)'
CMakeFiles/Brachy.dir/src/BrachyAnalysisManager.cc.o: In function `__static_initialization_and_destruction_0(int, int)':
BrachyAnalysisManager.cc:(.text+0x34f): undefined reference to `TVersionCheck::TVersionCheck(int)'
CMakeFiles/Brachy.dir/src/BrachyAnalysisManager.cc.o: In function `TObject::operator new(unsigned long)':
BrachyAnalysisManager.cc:(.text._ZN7TObjectnwEm[_ZN7TObjectnwEm]+0x14): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
CMakeFiles/Brachy.dir/src/BrachyUserScoreWriter.cc.o: In function `__static_initialization_and_destruction_0(int, int)':
BrachyUserScoreWriter.cc:(.text+0x7ef): undefined reference to `TVersionCheck::TVersionCheck(int)'
CMakeFiles/Brachy.dir/src/BrachySteppingAction.cc.o: In function `__static_initialization_and_destruction_0(int, int)':
BrachySteppingAction.cc:(.text+0x34a): undefined reference to `TVersionCheck::TVersionCheck(int)'
CMakeFiles/Brachy.dir/src/BrachyPrimaryGeneratorAction.cc.o: In function `__static_initialization_and_destruction_0(int, int)':
BrachyPrimaryGeneratorAction.cc:(.text+0x2e5): undefined reference to `TVersionCheck::TVersionCheck(int)'
collect2: error: ld returned 1 exit status
make[2]: *** [Brachy] Error 1
make[1]: *** [CMakeFiles/Brachy.dir/all] Error 2
make: *** [all] Error 2
ck@ck-22-2011d:~/g4work/brachytherapy/build$
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------End

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Error when trying to using ROOT   (Ivana Hrivnacova - 04 Jan, 2016)
 Add Message Add Message
to: "Error when trying to using ROOT "

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]