"ld: symbol(s) not found for architecture x86_64" when including lhapdf

Asked by junho.lee

Hi,
I am facing a problem on my mac(version 10.11.1) with including lhapdf.

I have installed MG, SysCalc, pythia-pgs, MadAnalysis, and ExRootAnalysis with no error.
Also I have installed LHAPDF-6.1.5, boost, ROOT before installing MG.

But it seems that there is some problem with SysClac (lhapdf).
Because when I try to include lhapdf, error occurs like :

____________________________________________________________________________

INFO: NNPDF23_nlo_as_0119 successfully downloaded and stored in /Users/junho/share/share/LHAPDF
compile Source Directory
Error detected in "generate_events run_02"
write debug file /Users/junho/Downloads/MG5_aMC_v2_3_2_2/bin/rm/run_02_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/madgraph5
MadGraph5Error : A compilation Error occurs when trying to compile /Users/junho/Downloads/MG5_aMC_v2_3_2_2/bin/rm/Source.
 The compilation fails with the following output message:
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o combine_events.o combine_events.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -o ../bin/internal/combine_events combine_events.o rw_events.o ranmar.o kin_functions.o open_file.o rw_routines.o alfas_functions.o setrun.o -L../lib/ -lmodel -lpdf -lLHAPDF -lstdc++
     Undefined symbols for architecture x86_64:
       "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char, unsigned long) const", referenced from:
           boost::basic_format<char, std::__1::char_traits<char>, std::__1::allocator<char> >::parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libLHAPDF.a(PDFSet.o)
           int boost::io::detail::upper_bound_from_fstring<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::ctype<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type, std::__1::ctype<char> const&, unsigned char) in libLHAPDF.a(PDFSet.o)
       "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(char const*) const", referenced from:
           _initpdfsetm_ in libLHAPDF.a(libLHAPDFGlue_la-LHAGlue.o)
           _initpdfsetbynamem_ in libLHAPDF.a(libLHAPDFGlue_la-LHAGlue.o)
.
.
.
.
.
.
.
.
.
.
.

"virtual thunk to std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:
           construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(libLHAPDFInfo_la-Info.o)
           construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(Factories.o)
           construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(PDFSet.o)
           construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(liblhapdf_yaml_cpp_la-parser.o)
           construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(liblhapdf_yaml_cpp_la-iterator.o)
           construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(PDFInfo.o)
           construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(PDF.o)
           ...
     ld: symbol(s) not found for architecture x86_64
     collect2: error: ld returned 1 exit status
     make: *** [../bin/internal/combine_events] Error 1

 Please try to fix this compilations issue and retry.
 Help might be found at https://answers.launchpad.net/madgraph5.
 If you think that this is a bug, you can report this at https://bugs.launchpad.net/madgraph5

____________________________________________________________________________

Thank you!

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
marco zaro Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Looks like a problem with lhapdf.
Did you test that lhapdf is working correctly?

Cheers,

Olivier
> On Nov 2, 2015, at 11:27, junho.lee <email address hidden> wrote:
>
> New question #273572 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/273572
>
> Hi,
> I am facing a problem on my mac(version 10.11.1) with including lhapdf.
>
> I have installed MG, SysCalc, pythia-pgs, MadAnalysis, and ExRootAnalysis with no error.
> Also I have installed LHAPDF-6.1.5, boost, ROOT before installing MG.
>
> But it seems that there is some problem with SysClac (lhapdf).
> Because when I try to include lhapdf, error occurs like :
>
> ____________________________________________________________________________
>
> INFO: NNPDF23_nlo_as_0119 successfully downloaded and stored in /Users/junho/share/share/LHAPDF
> compile Source Directory
> Error detected in "generate_events run_02"
> write debug file /Users/junho/Downloads/MG5_aMC_v2_3_2_2/bin/rm/run_02_tag_1_debug.log
> If you need help with this issue please contact us on https://answers.launchpad.net/madgraph5
> MadGraph5Error : A compilation Error occurs when trying to compile /Users/junho/Downloads/MG5_aMC_v2_3_2_2/bin/rm/Source.
> The compilation fails with the following output message:
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o combine_events.o combine_events.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -o ../bin/internal/combine_events combine_events.o rw_events.o ranmar.o kin_functions.o open_file.o rw_routines.o alfas_functions.o setrun.o -L../lib/ -lmodel -lpdf -lLHAPDF -lstdc++
> Undefined symbols for architecture x86_64:
> "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char, unsigned long) const", referenced from:
> boost::basic_format<char, std::__1::char_traits<char>, std::__1::allocator<char> >::parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libLHAPDF.a(PDFSet.o)
> int boost::io::detail::upper_bound_from_fstring<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::ctype<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type, std::__1::ctype<char> const&, unsigned char) in libLHAPDF.a(PDFSet.o)
> "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(char const*) const", referenced from:
> _initpdfsetm_ in libLHAPDF.a(libLHAPDFGlue_la-LHAGlue.o)
> _initpdfsetbynamem_ in libLHAPDF.a(libLHAPDFGlue_la-LHAGlue.o)
> .
> .
> .
> .
> .
> .
> .
> .
> .
> .
> .
>
> "virtual thunk to std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:
> construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(libLHAPDFInfo_la-Info.o)
> construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(Factories.o)
> construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(PDFSet.o)
> construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(liblhapdf_yaml_cpp_la-parser.o)
> construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(liblhapdf_yaml_cpp_la-iterator.o)
> construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(PDFInfo.o)
> construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libLHAPDF.a(PDF.o)
> ...
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> make: *** [../bin/internal/combine_events] Error 1
>
> Please try to fix this compilations issue and retry.
> Help might be found at https://answers.launchpad.net/madgraph5.
> If you think that this is a bug, you can report this at https://bugs.launchpad.net/madgraph5
>
>
>
> ____________________________________________________________________________
>
> Thank you!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
junho.lee (skyblue1294) said :
#2

Thanks Oliver.

I believe there is no problem with lhapdf, because I can get lhapdf list, lhapdf data.
But I am not sure. How can I test lhapdf??

Thank you.

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#3

One way is to run madgraph, asking for a pdf set from lhapdf and see if the code compiles.

They are probably other way but for that you should ask the lhapdf author.

Cheers,

Olivier
> On Nov 2, 2015, at 11:57, junho.lee <email address hidden> wrote:
>
> Question #273572 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/273572
>
> Status: Answered => Open
>
> junho.lee is still having a problem:
> Thanks Oliver.
>
> I believe there is no problem with lhapdf, because I can get lhapdf list, lhapdf data.
> But I am not sure. How can I test lhapdf??
>
> Thank you.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Patricia Rebello Teles (athenafma) said :
#4

Dear Olivier

I have the same problem with LHAPDF 6.1.5

Madgraph does not compile asking

     lhapdf = pdlabel ! PDF set
     263400 = lhaid ! if pdlabel=lhapdf, this is the lhapdf number

I have configured the LHAPDF with

./configure --prefix=<install directory> CC=clang CXX=clang++

Any idea on how to fix it?

I am trying to run Madgraph following CMS instructions to use the NNPDF30_lo_as_0130_nf_4.tar.gz for Run 2 LO processes.

Thank you

Regards Patricia

Revision history for this message
marco zaro (marco-zaro) said :
#5

Hi,
there is a known problem of lhapdf+mh5amcnlo+mac os...
see also this question
https://answers.launchpad.net/mg5amcnlo/+question/256099
Cheers,

Marco

Revision history for this message
Patricia Rebello Teles (athenafma) said :
#6

Thank you Marco

But did MG5 fixed it? I could not find a solution in that thread.

Cheers Pat

Revision history for this message
junho.lee (junho-lee) said :
#7

I just found that, Mac is not available with LHAPDF6, but with lhapdf5 it works.

When configurate the lhapdf5, use gcc to compile like below :

./configure --prefix=*** FC=gfortran CC=gcc-5 CXX=g++-5

Can you help with this problem?

Provide an answer of your own, or ask junho.lee for more information if necessary.

To post a message you must log in.