Fork me on GitHub

Opened 3 years ago

Last modified 3 years ago

#1518 new Bug

Errors while installing Delphes

Reported by: Pablo Owned by:
Priority: major Milestone:
Component: Delphes code Version: Delphes 3
Keywords: DelphesValidation.o Cc:

Description (last modified by Pavel Demin)

Hello,
I'm trying to install Delphes-3.4.2 on ubuntu 20 and I'm getting this in the terminal:

>> Compiling validation/DelphesValidation.cpp
validation/DelphesValidation.cpp: In function ‘std::pair<double, double> GausFit(TH1*)’:
validation/DelphesValidation.cpp:1196:109: error: invalid use of incomplete type ‘class TF1’
 1196 | 1", "gaus", hist->GetMean() - 2 * hist->GetRMS(), hist->GetMean() + 2 * hist->GetRMS());
      |                                                                                       ^

In file included from validation/DelphesValidation.cpp:32:
/snap/root-framework/320/usr/local/include/TGraph.h:37:7: note: forward declaration of ‘class TF1’
   37 | class TF1;
      |       ^~~
validation/DelphesValidation.cpp:1199:37: error: invalid use of incomplete type ‘class TF1’
 1199 |   TF1 *f2 = new TF1("f2", "gaus", f1->GetParameter(1) - 2 * f1->GetParameter(2), f1->GetParameter(1) + 2 * f1->GetParameter(2));
      |                                     ^~
In file included from validation/DelphesValidation.cpp:32:
/snap/root-framework/320/usr/local/include/TGraph.h:37:7: note: forward declaration of ‘class TF1’
   37 | class TF1;
      |       ^~~
validation/DelphesValidation.cpp:1199:63: error: invalid use of incomplete type ‘class TF1’
 1199 |   TF1 *f2 = new TF1("f2", "gaus", f1->GetParameter(1) - 2 * f1->GetParameter(2), f1->GetParameter(1) + 2 * f1->GetParameter(2));
      |                                                               ^~
In file included from validation/DelphesValidation.cpp:32:
/snap/root-framework/320/usr/local/include/TGraph.h:37:7: note: forward declaration of ‘class TF1’
   37 | class TF1;
      |       ^~~
validation/DelphesValidation.cpp:1199:84: error: invalid use of incomplete type ‘class TF1’
 1199 |   TF1 *f2 = new TF1("f2", "gaus", f1->GetParameter(1) - 2 * f1->GetParameter(2), f1->GetParameter(1) + 2 * f1->GetParameter(2));
      |                                                                                    ^~
In file included from validation/DelphesValidation.cpp:32:
/snap/root-framework/320/usr/local/include/TGraph.h:37:7: note: forward declaration of ‘class TF1’
   37 | class TF1;
      |       ^~~
validation/DelphesValidation.cpp:1199:110: error: invalid use of incomplete type ‘class TF1’
 1199 | ", "gaus", f1->GetParameter(1) - 2 * f1->GetParameter(2), f1->GetParameter(1) + 2 * f1->GetParameter(2));
      |                                                                                       ^~

In file included from validation/DelphesValidation.cpp:32:
/snap/root-framework/320/usr/local/include/TGraph.h:37:7: note: forward declaration of ‘class TF1’
   37 | class TF1;
      |       ^~~
validation/DelphesValidation.cpp:1199:127: error: invalid use of incomplete type ‘class TF1’
 1199 | tParameter(1) - 2 * f1->GetParameter(2), f1->GetParameter(1) + 2 * f1->GetParameter(2));
      |                                                                                       ^

In file included from validation/DelphesValidation.cpp:32:
/snap/root-framework/320/usr/local/include/TGraph.h:37:7: note: forward declaration of ‘class TF1’
   37 | class TF1;
      |       ^~~
validation/DelphesValidation.cpp:1202:20: error: invalid use of incomplete type ‘class TF1’
 1202 |   Double_t sig = f2->GetParameter(2);
      |                    ^~
In file included from validation/DelphesValidation.cpp:32:
/snap/root-framework/320/usr/local/include/TGraph.h:37:7: note: forward declaration of ‘class TF1’
   37 | class TF1;
      |       ^~~
validation/DelphesValidation.cpp:1203:23: error: invalid use of incomplete type ‘class TF1’
 1203 |   Double_t sigErr = f2->GetParError(2);
      |                       ^~
In file included from validation/DelphesValidation.cpp:32:
/snap/root-framework/320/usr/local/include/TGraph.h:37:7: note: forward declaration of ‘class TF1’
   37 | class TF1;
      |       ^~~
validation/DelphesValidation.cpp:1205:10: warning: possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
 1205 |   delete f1;
      |          ^~
validation/DelphesValidation.cpp:1196:8: warning: ‘f1’ has incomplete type
 1196 |   TF1 *f1 = new TF1("f1", "gaus", hist->GetMean() - 2 * hist->GetRMS(), hist->GetMean() + 2 * hist->GetRMS());
      |        ^~
In file included from validation/DelphesValidation.cpp:32:
/snap/root-framework/320/usr/local/include/TGraph.h:37:7: note: forward declaration of ‘class TF1’
   37 | class TF1;
      |       ^~~
validation/DelphesValidation.cpp:1205:10: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
 1205 |   delete f1;
      |          ^~
validation/DelphesValidation.cpp:1206:10: warning: possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
 1206 |   delete f2;
      |          ^~
validation/DelphesValidation.cpp:1199:8: warning: ‘f2’ has incomplete type
 1199 |   TF1 *f2 = new TF1("f2", "gaus", f1->GetParameter(1) - 2 * f1->GetParameter(2), f1->GetParameter(1) + 2 * f1->GetParameter(2));
      |        ^~
In file included from validation/DelphesValidation.cpp:32:
/snap/root-framework/320/usr/local/include/TGraph.h:37:7: note: forward declaration of ‘class TF1’
   37 | class TF1;
      |       ^~~
validation/DelphesValidation.cpp:1206:10: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
 1206 |   delete f2;
      |          ^~
validation/DelphesValidation.cpp: In function ‘void DelphesValidation(const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*)’:
validation/DelphesValidation.cpp:1497:17: warning: unused variable ‘branchParticleBJet’ [-Wunused-variable]
 1497 |   TClonesArray *branchParticleBJet = treeReaderBJet->UseBranch("Particle");
      |                 ^~~~~~~~~~~~~~~~~~
validation/DelphesValidation.cpp:1500:17: warning: unused variable ‘branchParticleCJet’ [-Wunused-variable]
 1500 |   TClonesArray *branchParticleCJet = treeReaderCJet->UseBranch("Particle");
      |                 ^~~~~~~~~~~~~~~~~~
make: *** [Makefile:2447: tmp/validation/DelphesValidation.o] Error 1

Change History (8)

comment:1 by Pavel Demin, 3 years ago

This problem is fixed in the latest version (3.5.0). Please try to use the latest version. It can be downloaded from the following link:
http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.5.0.tar.gz

comment:2 by Pavel Demin, 3 years ago

Description: modified (diff)

comment:3 by Pablo, 3 years ago

Thank you for the answer! Now I'm trying with that version and once I'm inside the Delphes folder and I run makr, I get this:

doc/Makefile.arch:19: * Please make sure root-config can be found in path. Stop.

I have root installed in /usr/local and the root-config file is in /usr/local/root/bin, but it seems that Delphes is not able to find it.

Do you have any suggestion?

Thanks in advance

comment:4 by Pavel Demin, 3 years ago

Do you have any suggestion?

Try to install ROOT following the instructions from this link.

comment:5 by Pablo, 3 years ago

Thank you, that worked! However, now I'm trying to install Delphes on ubuntu 18 and I got this:

Building hepmc2pileup

/usr/bin/ld: warning: libxxhash.so.0, needed by /snap/root-framework/320/usr/local/lib/libCore.so, not found (try using -rpath or -rpath-link)
/snap/root-framework/320/usr/local/lib/libCore.so: undefined reference to `std::cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26'
/snap/root-framework/320/usr/local/lib/libCore.so: undefined reference to `std::
cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
/snap/root-framework/320/usr/local/lib/libImt.so: undefined reference to `tbb::interface7::internal::isolate_within_arena(tbb::interface7::internal::delegate_base&, long)'
/snap/root-framework/320/usr/local/lib/libHist.so: undefined reference to `pow@GLIBC_2.29'
/snap/root-framework/320/usr/local/lib/libCore.so: undefined reference to `XXH64_canonicalFromHash'
/snap/root-framework/320/usr/local/lib/libCore.so: undefined reference to `std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::data()@GLIBCXX_3.4.26'
/snap/root-framework/320/usr/local/lib/libCore.so: undefined reference to `std::
cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::sv_wrapper::sv_wrapper(std::basic_string_view<char, std::char_traits<char> >)@GLIBCXX_3.4.26'
/snap/root-framework/320/usr/local/lib/libHist.so: undefined reference to `exp@GLIBC_2.29'
/snap/root-framework/320/usr/local/lib/libCore.so: undefined reference to `std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_to_string_view(std::basic_string_view<char, std::char_traits<char> >)@GLIBCXX_3.4.26'
/snap/root-framework/320/usr/local/lib/libCore.so: undefined reference to `std::
cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::sv_wrapper, std::allocator<char> const&)@GLIBCXX_3.4.26'
/snap/root-framework/320/usr/local/lib/libCore.so: undefined reference to `std::cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
/snap/root-framework/320/usr/local/lib/libHist.so: undefined reference to `log@GLIBC_2.29'
/snap/root-framework/320/usr/local/lib/libCore.so: undefined reference to `XXH64_hashFromCanonical'
/snap/root-framework/320/usr/local/lib/libCore.so: undefined reference to `std::
cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator std::basic_string_view<char, std::char_traits<char> >() const@GLIBCXX_3.4.26'
collect2: error: ld returned 1 exit status
Makefile:2578: recipe for target 'hepmc2pileup' failed
make: * [hepmc2pileup] Error 1

In this computer I have also installed root as you said for ubuntu 20

comment:6 by Pavel Demin, 3 years ago

I think you need to install a version compatible with Ubuntu 18. It can be downloaded from the following link:

https://root.cern/releases/release-62406/

comment:7 by Pablo, 3 years ago

Yes, sure. I have installed the one that appears for ubuntu 18 in that link. Also, root is launching when I type root in the terminal.

comment:8 by Pablo, 3 years ago

Sorry, now it worked. It was because of a previously installed version of root. Thanks a lot for your help!

Note: See TracTickets for help on using tickets.