Pythia8 from MadGraph: Pythia8::LHAPDF error

Asked by Antonio Costantini on 2018-08-10

Dear Olivier,

I'm having a problem a using Pythia8 from MadGraph. In particular
after trying to make the main file produced by MadGraph I got the
following error

~/MG5_aMC_v2_6_3_2/HEPTools/pythia8/examples$ make -f /home/antonio/MG5_aMC_v2_6_3_2/HEPTools/pythia8/examples/Makefile_sm_1
g++ -I../include -I../Processes_sm -c -o main_sm_1.o main_sm_1.cc
cd ../Processes_sm; make
make[1]: Entering directory '/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/pythia8/Processes_sm'
Making dependency for file Sigma_sm_qq_ttx.cc
Making dependency for file HelAmps_sm.cc
Making dependency for file Sigma_sm_gg_ttx.cc
Making dependency for file Parameters_sm.cc
g++ -c -I../include -I. Parameters_sm.cc -o tmp/archive/Parameters_sm.o
g++ -c -I../include -I. Sigma_sm_gg_ttx.cc -o tmp/archive/Sigma_sm_gg_ttx.o
g++ -c -I../include -I. HelAmps_sm.cc -o tmp/archive/HelAmps_sm.o
g++ -c -I../include -I. Sigma_sm_qq_ttx.cc -o tmp/archive/Sigma_sm_qq_ttx.o
ar cru ../lib/archive/libProcesses_sm.a tmp/archive/Parameters_sm.o tmp/archive/Sigma_sm_gg_ttx.o tmp/archive/HelAmps_sm.o tmp/archive/Sigma_sm_qq_ttx.o
ar: `u' modifier ignored since `D' is the default (see `U')
make[1]: Leaving directory '/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/pythia8/Processes_sm'
g++ -o main_sm_1 main_sm_1.o -L../lib/archive -L../lib -lpythia8 -lProcesses_sm -lz
../lib/libpythia8.a(PartonDistributions.o): In function `Pythia8::LHAPDF::LHAPDF(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Pythia8::Info*)':
PartonDistributions.cc:(.text+0x10e73): undefined reference to `dlopen'
PartonDistributions.cc:(.text+0x10e89): undefined reference to `dlerror'
PartonDistributions.cc:(.text+0x1103a): undefined reference to `dlerror'
../lib/libpythia8.a(PartonDistributions.o): In function `Pythia8::LHAPDF::~LHAPDF()':
PartonDistributions.cc:(.text+0x115b3): undefined reference to `dlclose'
PartonDistributions.cc:(.text+0x115b8): undefined reference to `dlerror'
../lib/libpythia8.a(PartonDistributions.o): In function `Pythia8::LHAPDF::symbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
PartonDistributions.cc:(.text+0x1174a): undefined reference to `dlsym'
PartonDistributions.cc:(.text+0x11753): undefined reference to `dlerror'
PartonDistributions.cc:(.text+0x117ec): undefined reference to `dlerror'
collect2: error: ld returned 1 exit status
/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/pythia8/examples/Makefile_sm_1:35: recipe for target 'main_sm_1' failed
make: *** [main_sm_1] Error 1

Here I put the libs/config of Pythia

./pythia8-config --libs
-L/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/pythia8//lib -lpythia8 -L/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/boost/lib -lboost_iostreams -L/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/zlib/lib -lz -ldl

./pythia8-config --config
./configure --prefix=/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/pythia8/ --with-hepmc2=/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/hepmc --with-hepmc2-include=/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/hepmc/include --with-gzip=/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/zlib --with-lhapdf6=/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/lhapdf6 --with-boost=/home/antonio/MG5_aMC_v2_6_3_2/HEPTools/boost --cxx-common='-ldl -fPIC -lstdc++ -DHEPMC2HACK'

Do You have any suggestion to fix this issue?

Thanks in advance

Antonio

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
2018-08-10
Last reply:
2018-08-10

Hi,

What you need to do is to edit the file
 /home/antonio/MG5_aMC_v2_6_3_2/HEPTools/pythia8/examples/Makefile_sm_1
in order to add all the dependencies that you need, so add -ldl in that program.

Cheers,

Olivier

On 10 Aug 2018, at 11:52, Antonio Costantini <<email address hidden><mailto:<email address hidden>>> wrote:

 /home/antonio/MG5_aMC_v2_6_3_2/HEPTools/pythia8/examples/Makefile_sm_1

Can you help with this problem?

Provide an answer of your own, or ask Antonio Costantini for more information if necessary.

To post a message you must log in.