Linking of root libraries fails in newest version

Hello,

I’m trying to compile a shared library with dependencies on RooFit and Root in general. With root v5.34.09 everything is working fine. Yesterday i checked out the newest trunk v5.34.15 via GIT, compilation of root and running root work perfectly but unfortunately my library doesn’t compile anymore.
I’m trying to compile via:

"/opt/local/bin/g++-mp-4.4" -dynamiclib -Wl,-single_module -install_name "libTools.dylib" -o "Tools/bin/darwin-4.4/debug/libTools.dylib" "Tools/bin/darwin-4.4/debug/RooCB2.o" "Tools/bin/darwin-4.4/debug/RooMBC.o" "Tools/bin/darwin-4.4/debug/VarHistArray.o" "Tools/bin/darwin-4.4/debug/VarHist.o" -headerpad_max_install_names -g -L/work/external/boost_1_54_0/build/lib -L/work/external/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -Wl,-rpath,/work/external/root/lib -stdlib=libc++ -lm -ldl -L/work/rootAnalysis/Utilities/lib -lRooFit -lRooFitCore
And I get a couple for error messages like this:

[quote]“RooAbsReal::readFromStream(std::basic_istream<char, std::char_traits >&, bool, bool)”, referenced from:
vtable for RooCB2 in RooCB2.o
vtable for RooMBC in RooMBC.o
[/quote]
This symbol should be defined in RooFitCore.so:

nm libRooFitCore.so|grep readFromStream

I compiled root with ./configure “macosx64” “–all”. I’m running on OSx Maverik.

Can somebody help me here? Thanks in advance!

Best wishes, Peter

I assume the reason is that root was compiled using clang and I’m trying to compile my library with gcc. So I tried to compile root using gcc as well:

./configure --all --with-cxx=/opt/local/bin/g++-mp-4.4 --with-ld=/opt/local/bin/g++-mp-4.4 --with-cc=/opt/local/bin/gcc-mp-4.4

This unfortunately didn’t work:

Is it not possible to compile root using gcc, anymore?

[quote=“weidenka”]I assume the reason is that root was compiled using clang and I’m trying to compile my library with gcc. So I tried to compile root using gcc as well:

./configure --all --with-cxx=/opt/local/bin/g++-mp-4.4 --with-ld=/opt/local/bin/g++-mp-4.4 --with-cc=/opt/local/bin/gcc-mp-4.4

This unfortunately didn’t work:

Is it not possible to compile root using gcc, anymore?[/quote]

Hmm. You have ROOT built with clang. And your app built with gcc. Ok, you have link problems. Now let’s build ROOT with gcc. Problems. So, may be, compile both ROOT and your program with clang now?

The answer to other your question - I was able to build ROOT on OS X 10.9 with my custom gcc (4.8.2).