Error while installing delphes in MA

Asked by Mustafa Ashry

Hello,

I am trying to install delphes in MA but I obtain the following error message in the compilation.log
MA5-ERROR: impossible to build the project. For more details, see the log file:
MA5-ERROR: /home/mustafa/hep/madanalysis5/tools/delphes/compilation.log

Any hint for help is appreciated
Cheers
Mustafa

compilation.log
>> Generating tmp/classes/ClassesDict.cc
>> Generating tmp/external/ExRootAnalysis/ExRootAnalysisDict.cc
>> Compiling classes/DelphesClasses.cc
>> Generating tmp/modules/ModulesDict.cc
>> Compiling classes/DelphesCylindricalFormula.cc
>> Compiling classes/DelphesFactory.cc
>> Compiling classes/DelphesFormula.cc
>> Compiling classes/DelphesHepMCReader.cc
>> Compiling classes/DelphesLHEFReader.cc
>> Compiling classes/DelphesModule.cc
>> Compiling classes/DelphesPileUpReader.cc
>> Compiling classes/DelphesPileUpWriter.cc
>> Compiling classes/DelphesSTDHEPReader.cc
>> Compiling classes/DelphesStream.cc
>> Compiling classes/DelphesTF2.cc
>> Compiling classes/DelphesXDRReader.cc
classes/DelphesXDRReader.cc: In member function ‘void DelphesXDRReader::ReadRaw(void*, int)’:
classes/DelphesXDRReader.cc:76:10: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   76 | fread(value, 1, size + rndup, fFile);
      | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Compiling classes/DelphesXDRWriter.cc
>> Compiling external/ExRootAnalysis/ExRootConfReader.cc
>> Compiling external/ExRootAnalysis/ExRootFilter.cc
>> Compiling external/ExRootAnalysis/ExRootProgressBar.cc
classes/DelphesTF2.cc: In constructor ‘DelphesTF2::DelphesTF2()’:
classes/DelphesTF2.cc:35:27: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<TFormula>’ and ‘TFormula*’)
   35 | fFormula = new TFormula();
      | ^
In file included from /usr/include/c++/9/memory:80,
                 from /home/mustafa/hep/buildroot/include/ROOT/TypeTraits.hxx:15,
                 from /home/mustafa/hep/buildroot/include/TString.h:30,
                 from /home/mustafa/hep/buildroot/include/TNamed.h:26,
                 from /home/mustafa/hep/buildroot/include/TFormula.h:15,
                 from /home/mustafa/hep/buildroot/include/TF1.h:29,
                 from /home/mustafa/hep/buildroot/include/TF2.h:26,
                 from ./classes/DelphesTF2.h:22,
                 from classes/DelphesTF2.cc:19:
/usr/include/c++/9/bits/unique_ptr.h:305:7: note: candidate: ‘std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = TFormula; _Dp = std::default_delete<TFormula>]’
  305 | operator=(unique_ptr&& __u) noexcept
      | ^~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:305:30: note: no known conversion for argument 1 from ‘TFormula*’ to ‘std::unique_ptr<TFormula>&&’
  305 | operator=(unique_ptr&& __u) noexcept
      | ~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/unique_ptr.h:325:2: note: candidate: ‘template<class _Up, class _Ep> typename std::enable_if<std::__and_<std::__and_<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::__uniq_ptr_impl<_Tp, _Dp>::pointer>, std::__not_<std::is_array<_Up> > >, std::is_assignable<_T2&, _U2&&> >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = _Up; _Ep = _Ep; _Tp = TFormula; _Dp = std::default_delete<TFormula>]’
  325 | operator=(unique_ptr<_Up, _Ep>&& __u) noexcept
      | ^~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:325:2: note: template argument deduction/substitution failed:
classes/DelphesTF2.cc:35:27: note: mismatched types ‘std::unique_ptr<_Tp, _Dp>’ and ‘TFormula*’
   35 | fFormula = new TFormula();
      | ^
In file included from /usr/include/c++/9/memory:80,
                 from /home/mustafa/hep/buildroot/include/ROOT/TypeTraits.hxx:15,
                 from /home/mustafa/hep/buildroot/include/TString.h:30,
                 from /home/mustafa/hep/buildroot/include/TNamed.h:26,
                 from /home/mustafa/hep/buildroot/include/TFormula.h:15,
                 from /home/mustafa/hep/buildroot/include/TF1.h:29,
                 from /home/mustafa/hep/buildroot/include/TF2.h:26,
                 from ./classes/DelphesTF2.h:22,
                 from classes/DelphesTF2.cc:19:
/usr/include/c++/9/bits/unique_ptr.h:334:7: note: candidate: ‘std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = TFormula; _Dp = std::default_delete<TFormula>; std::nullptr_t = std::nullptr_t]’
  334 | operator=(nullptr_t) noexcept
      | ^~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:334:17: note: no known conversion for argument 1 from ‘TFormula*’ to ‘std::nullptr_t’
  334 | operator=(nullptr_t) noexcept
      | ^~~~~~~~~
make: *** [Makefile:2430: tmp/classes/DelphesTF2.o] Error 1
make: *** Waiting for unfinished jobs....

Question information

Language:
English Edit question
Status:
Answered
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Benjamin Fuks (fuks) said :
#1

Hi Mustafa,

Which version of MA5 are you using? Could you please make sure it is the one of the v1.9 branch?

Regards,

Benjamin

> On 22 Sep 2021, at 08:20, Mustafa Ashry <email address hidden> wrote:
>
> New question #698822 on MadAnalysis 5:
> https://answers.launchpad.net/madanalysis5/+question/698822
>
> Hello,
>
> I am trying to install delphes in MA but I obtain the following error message in the compilation.log
> MA5-ERROR: impossible to build the project. For more details, see the log file:
> MA5-ERROR: /home/mustafa/hep/madanalysis5/tools/delphes/compilation.log
>
> Any hint for help is appreciated
> Cheers
> Mustafa
>
> compilation.log
>>> Generating tmp/classes/ClassesDict.cc
>>> Generating tmp/external/ExRootAnalysis/ExRootAnalysisDict.cc
>>> Compiling classes/DelphesClasses.cc
>>> Generating tmp/modules/ModulesDict.cc
>>> Compiling classes/DelphesCylindricalFormula.cc
>>> Compiling classes/DelphesFactory.cc
>>> Compiling classes/DelphesFormula.cc
>>> Compiling classes/DelphesHepMCReader.cc
>>> Compiling classes/DelphesLHEFReader.cc
>>> Compiling classes/DelphesModule.cc
>>> Compiling classes/DelphesPileUpReader.cc
>>> Compiling classes/DelphesPileUpWriter.cc
>>> Compiling classes/DelphesSTDHEPReader.cc
>>> Compiling classes/DelphesStream.cc
>>> Compiling classes/DelphesTF2.cc
>>> Compiling classes/DelphesXDRReader.cc
> classes/DelphesXDRReader.cc: In member function ‘void DelphesXDRReader::ReadRaw(void*, int)’:
> classes/DelphesXDRReader.cc:76:10: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
> 76 | fread(value, 1, size + rndup, fFile);
> | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> Compiling classes/DelphesXDRWriter.cc
>>> Compiling external/ExRootAnalysis/ExRootConfReader.cc
>>> Compiling external/ExRootAnalysis/ExRootFilter.cc
>>> Compiling external/ExRootAnalysis/ExRootProgressBar.cc
> classes/DelphesTF2.cc: In constructor ‘DelphesTF2::DelphesTF2()’:
> classes/DelphesTF2.cc:35:27: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<TFormula>’ and ‘TFormula*’)
> 35 | fFormula = new TFormula();
> | ^
> In file included from /usr/include/c++/9/memory:80,
> from /home/mustafa/hep/buildroot/include/ROOT/TypeTraits.hxx:15,
> from /home/mustafa/hep/buildroot/include/TString.h:30,
> from /home/mustafa/hep/buildroot/include/TNamed.h:26,
> from /home/mustafa/hep/buildroot/include/TFormula.h:15,
> from /home/mustafa/hep/buildroot/include/TF1.h:29,
> from /home/mustafa/hep/buildroot/include/TF2.h:26,
> from ./classes/DelphesTF2.h:22,
> from classes/DelphesTF2.cc:19:
> /usr/include/c++/9/bits/unique_ptr.h:305:7: note: candidate: ‘std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = TFormula; _Dp = std::default_delete<TFormula>]’
> 305 | operator=(unique_ptr&& __u) noexcept
> | ^~~~~~~~
> /usr/include/c++/9/bits/unique_ptr.h:305:30: note: no known conversion for argument 1 from ‘TFormula*’ to ‘std::unique_ptr<TFormula>&&’
> 305 | operator=(unique_ptr&& __u) noexcept
> | ~~~~~~~~~~~~~^~~
> /usr/include/c++/9/bits/unique_ptr.h:325:2: note: candidate: ‘template<class _Up, class _Ep> typename std::enable_if<std::__and_<std::__and_<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::__uniq_ptr_impl<_Tp, _Dp>::pointer>, std::__not_<std::is_array<_Up> > >, std::is_assignable<_T2&, _U2&&> >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = _Up; _Ep = _Ep; _Tp = TFormula; _Dp = std::default_delete<TFormula>]’
> 325 | operator=(unique_ptr<_Up, _Ep>&& __u) noexcept
> | ^~~~~~~~
> /usr/include/c++/9/bits/unique_ptr.h:325:2: note: template argument deduction/substitution failed:
> classes/DelphesTF2.cc:35:27: note: mismatched types ‘std::unique_ptr<_Tp, _Dp>’ and ‘TFormula*’
> 35 | fFormula = new TFormula();
> | ^
> In file included from /usr/include/c++/9/memory:80,
> from /home/mustafa/hep/buildroot/include/ROOT/TypeTraits.hxx:15,
> from /home/mustafa/hep/buildroot/include/TString.h:30,
> from /home/mustafa/hep/buildroot/include/TNamed.h:26,
> from /home/mustafa/hep/buildroot/include/TFormula.h:15,
> from /home/mustafa/hep/buildroot/include/TF1.h:29,
> from /home/mustafa/hep/buildroot/include/TF2.h:26,
> from ./classes/DelphesTF2.h:22,
> from classes/DelphesTF2.cc:19:
> /usr/include/c++/9/bits/unique_ptr.h:334:7: note: candidate: ‘std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = TFormula; _Dp = std::default_delete<TFormula>; std::nullptr_t = std::nullptr_t]’
> 334 | operator=(nullptr_t) noexcept
> | ^~~~~~~~
> /usr/include/c++/9/bits/unique_ptr.h:334:17: note: no known conversion for argument 1 from ‘TFormula*’ to ‘std::nullptr_t’
> 334 | operator=(nullptr_t) noexcept
> | ^~~~~~~~~
> make: *** [Makefile:2430: tmp/classes/DelphesTF2.o] Error 1
> make: *** Waiting for unfinished jobs....
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
Mustafa Ashry (mashry) said :
#2

Hello Benjamin,

I used MA v1.1.9 this time but when I ./bin/ma5 it gives
Checking mandatory packages:
     - python [OK]
     - python library: numpy [OK]
     - g++ [OK]
     - Root [FAILURE]
 ** ERROR: ROOT library called 'libPyROOT.so' not found. Please check that ROOT is properly installed.
But ROOT is properly installed and read by both c++ and python.

I also added the ROOTSYS path and the source root to the bashrc file as follows:
export ROOTSYS=/home/mustafa/hep/root
export PATH=$PATH:$ROOTSYS/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$ROOTSYS/lib
source /home/mustafa/hep/root/bin/thisroot.sh

Any recommendations?

Regards

Mustafa

Revision history for this message
Benjamin Fuks (fuks) said :
#3

Hi Mustafa,

I cannot unfortunately recommend anything with so little pieces of information. Do you mind running the code in debug mode and copying the screen output?

Regards,

Benjamin

> On 28 Sep 2021, at 10:11, Mustafa Ashry <email address hidden> wrote:
>
> Question #698822 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/698822
>
> Status: Answered => Open
>
> Mustafa Ashry is still having a problem:
> Hello Benjamin,
>
> I used MA v1.1.9 this time but when I ./bin/ma5 it gives
> Checking mandatory packages:
> - python [OK]
> - python library: numpy [OK]
> - g++ [OK]
> - Root [FAILURE]
> ** ERROR: ROOT library called 'libPyROOT.so' not found. Please check that ROOT is properly installed.
> But ROOT is properly installed and read by both c++ and python.
>
> I also added the ROOTSYS path and the source root to the bashrc file as follows:
> export ROOTSYS=/home/mustafa/hep/root
> export PATH=$PATH:$ROOTSYS/bin
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
> export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$ROOTSYS/lib
> source /home/mustafa/hep/root/bin/thisroot.sh
>
> Any recommendations?
>
> Regards
>
> Mustafa
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Can you help with this problem?

Provide an answer of your own, or ask Mustafa Ashry for more information if necessary.

To post a message you must log in.