ROOT6.04/08 and Fasjet3.1.3 in Mac OS 10.11

Dear experts

I am trying to run Fastjet inside ROOT
root [0] gSystem->Load("…/FASTJET/lib/libfastjet.so");
root [4] .L test.C+
Info in TMacOSXSystem::ACLiC: creating shared library $PWD/./FastjetaaWW_C.so

but is returning error msgs

Undefined symbols for architecture x86_64:
“fastjet::sorted_by_E(std::__1::vector<fastjet::PseudoJet, std::__1::allocatorfastjet::PseudoJet > const&)”, referenced from:
FastjetaaWW(int, double, TString, int, int, TString, int, int) in FastjetaaWW_C_ACLiC_dict.o
"fastjet::sorted_by_pt(std::__1::vector<fastjet::PseudoJet, std::__1::allocatorfastjet::PseudoJet > const&)", referenced from:
FastjetaaWW(int, double, TString, int, int, TString, int, int) in FastjetaaWW_C_ACLiC_dict.o
"fastjet::JetDefinition::JetDefinition(fastjet::JetAlgorithm, double, fastjet::Strategy, fastjet::RecombinationScheme, int)", referenced from:
fastjet::JetDefinition::JetDefinition(fastjet::JetAlgorithm, fastjet::RecombinationScheme, fastjet::Strategy) in FastjetaaWW_C_ACLiC_dict.o
"fastjet::ClusterSequence::_decant_options_partial()", referenced from:
fastjet::ClusterSequence::ClusterSequencefastjet::PseudoJet(std::__1::vector<fastjet::PseudoJet, std::__1::allocatorfastjet::PseudoJet > const&, fastjet::JetDefinition const&, bool const&) in FastjetaaWW_C_ACLiC_dict.o
"fastjet::ClusterSequence::_initialise_and_run_no_decant()", referenced from:
fastjet::ClusterSequence::ClusterSequencefastjet::PseudoJet(std::__1::vector<fastjet::PseudoJet, std::__1::allocatorfastjet::PseudoJet > const&, fastjet::JetDefinition const&, bool const&) in FastjetaaWW_C_ACLiC_dict.o
"fastjet::ClusterSequence::~ClusterSequence()", referenced from:
FastjetaaWW(int, double, TString, int, int, TString, int, int) in FastjetaaWW_C_ACLiC_dict.o
"fastjet::PseudoJet::PseudoJet(double, double, double, double)", referenced from:
FastjetaaWW(int, double, TString, int, int, TString, int, int) in FastjetaaWW_C_ACLiC_dict.o
"fastjet::JetDefinition::description() const", referenced from:
FastjetaaWW(int, double, TString, int, int, TString, int, int) in FastjetaaWW_C_ACLiC_dict.o
"fastjet::ClusterSequence::exclusive_jets(int) const", referenced from:
FastjetaaWW(int, double, TString, int, int, TString, int, int) in FastjetaaWW_C_ACLiC_dict.o
"fastjet::ClusterSequence::strategy_string(fastjet::Strategy) const", referenced from:
FastjetaaWW(int, double, TString, int, int, TString, int, int) in FastjetaaWW_C_ACLiC_dict.o
"fastjet::PseudoJet::pseudorapidity() const", referenced from:
FastjetaaWW(int, double, TString, int, int, TString, int, int) in FastjetaaWW_C_ACLiC_dict.o
"vtable for fastjet::JetDefinition::DefaultRecombiner", referenced from:
fastjet::JetDefinition::JetDefinition(fastjet::JetAlgorithm, fastjet::RecombinationScheme, fastjet::Strategy) in FastjetaaWW_C_ACLiC_dict.o
fastjet::ClusterSequence::ClusterSequencefastjet::PseudoJet(std::__1::vector<fastjet::PseudoJet, std::__1::allocatorfastjet::PseudoJet > const&, fastjet::JetDefinition const&, bool const&) in FastjetaaWW_C_ACLiC_dict.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
“vtable for fastjet::ClusterSequence”, referenced from:
fastjet::ClusterSequence::ClusterSequencefastjet::PseudoJet(std::__1::vector<fastjet::PseudoJet, std::__1::allocatorfastjet::PseudoJet > const&, fastjet::JetDefinition const&, bool const&) in FastjetaaWW_C_ACLiC_dict.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
“vtable for fastjet::ClusterSequenceStructure”, referenced from:
fastjet::ClusterSequence::ClusterSequencefastjet::PseudoJet(std::__1::vector<fastjet::PseudoJet, std::__1::allocatorfastjet::PseudoJet > const&, fastjet::JetDefinition const&, bool const&) in FastjetaaWW_C_ACLiC_dict.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
“vtable for fastjet::PseudoJet”, referenced from:
FastjetaaWW(int, double, TString, int, int, TString, int, int) in FastjetaaWW_C_ACLiC_dict.o
void std::__1::vector<fastjet::PseudoJet, std::__1::allocatorfastjet::PseudoJet >::__push_back_slow_path<fastjet::PseudoJet const&>(fastjet::PseudoJet const&&&) in FastjetaaWW_C_ACLiC_dict.o
void fastjet::ClusterSequence::_transfer_input_jetsfastjet::PseudoJet(std::__1::vector<fastjet::PseudoJet, std::__1::allocatorfastjet::PseudoJet > const&) in FastjetaaWW_C_ACLiC_dict.o
std::__1::vector<fastjet::PseudoJet, std::__1::allocatorfastjet::PseudoJet >::reserve(unsigned long) in FastjetaaWW_C_ACLiC_dict.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in : Compilation failed!

What should I do?

Thank you in advance. Kind regards Patricia

Please read .L FastjetaaWW.C+ instead of .L test.C+
Sorry for the typo.

The first message you get:

Undefined symbols for architecture x86_64:

makes it more or less clear that the .so you are trying to load is not of the required type.
Wrong architecture … not for the machine you are running on.

Thank you. But I can run Fastjet standalone without any problem.

The error msg is only when linked with ROOT.

Any idea about the reason?

Using Fastjet standalone:

$ ./01-basic < data/single-event.dat
#--------------------------------------------------------------------------

FastJet release 3.1.3

M. Cacciari, G.P. Salam and G. Soyez

A software package for jet finding and analysis at colliders

fastjet.fr

Please cite EPJC72(2012)1896 [arXiv:1111.6097] if you use this package

for scientific work and optionally PLB641(2006)57 [hep-ph/0512210].

FastJet is provided without warranty under the terms of the GNU GPLv2.

It uses T. Chan’s closest pair algorithm, S. Fortune’s Voronoi code,

CGAL and 3rd party plugin jet algorithms. See COPYING file for details.

#--------------------------------------------------------------------------
Ran Longitudinally invariant anti-kt algorithm with R = 0.6 and E scheme recombination
jet # rapidity phi pt
0 -0.86713954 2.90515650 983.27961921
1 0.22020770 6.03158364 901.74525462
2 -1.18094729 6.08357229 67.99406627
3 0.39856668 0.67288619 12.46517757
4 -2.58095820 1.13304325 6.56849267
5 -1.71938196 4.03506179 6.49839pb-d-pb-d-1pb-d-1pb-dpb-dpb-pbpb-pbpbppbppppb-

Nevertheless, the code I am testing has to be run inside ROOT for using Fastjet + Pythia6.

I would appreciate any suggestion for fixing it.

Regards Patricia

Thanks for the info. I have forwarded your question to experts in that area.

Hi Patricia,

When you link your example ./01-basic what is the exact command line? (I suspect a missing library and/or mismatch architecture)

Thanks,
Philippe.

Hi,

fastjet not built against libc++ or without -std=c++11 are other possible causes.

Axel.

[quote=“pcanal”]Hi Patricia,

When you link your example ./01-basic what is the exact command line? (I suspect a missing library and/or mismatch architecture)

Thanks,
Philippe.[/quote]

Hi Philippe

the command line is exactly ./01-basic (this executable is generated after Makefile in fastjet/examples directory)

Thank you.

[quote=“Axel”]Hi,

fastjet not built against libc++ or without -std=c++11 are other possible causes.

Axel.[/quote]

Hi Axel, could you please tell me what exactly to do while compiling fastjet? should I specify the C++ compiler?

I configured

Fastjet
./configure ‘–prefix=$HOME/TOOLS/FASTJET’ ‘–enable-allplugins’ ‘–enable-cgal’ ‘–with-cgaldir=/opt/local/include’ ‘CPPFLAGS=-I/opt/local/include’ ‘LDFLAGS=-L/opt/local/lib’ ‘–enable-shared’

and ROOT
./configure macosx64 --prefix=$HOME/TOOLS/ROOT --enable-minuit2 --enable-pythia6 --enable-pythia8 --enable-python --enable-qt --enable-roofit --enable-tmva --enable-x11 --enable-xrootd --with-pythia6-libdir=$HOME/TOOLS/pythia6 -with-pythia8-incdir=$HOME/TOOLS/pythia8212/include -with-pythia8-libdir=$HOME/TOOLS/pythia8212/lib

Thank you

Regards Patricia

Hi Patricia,

What I would like to see is the line/command that the Makefile executes to build the executable.

Cheers,
Philippe.