Building ROOT Ubuntu 11.10

Hi,

I recently built ROOT 5.30/04 on x64 and had to do some “non-standard” stuff to get the build to complete:

svn co http://root.cern.ch/svn/root/tags/v5-30-04 root
cd root/
./configure linuxx8664gcc --enable-roofit --enable-minuit2 --enable-mathmore --enable-python --enable-fftw3 --enable-tmva --enable-x11 --enable-mysql
make
(fails with undefined reference errors)
g++ -m64 -O2  -o bin/hist2workspace roofit/histfactory/src/MakeModelAndMeasurements.o     \
                    -Llib -lCore -lCint -lMathCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix -lThread  -lRint -Llib -lRooFit -lRooFitCore -lTree -lRIO -lMatrix -lHist -lMathCore -lGraf -lGpad -lMinuit -lFoam -lRooStats -lXMLParser -lHistFactory -lNet -lm -ldl -lRooFit -lRooFitCore -lGpad -pthread   -rdynamic
make
(fails again)
g++ -m64 -O2  -o bin/pq2 proof/pq2/src/pq2actions.o proof/pq2/src/pq2main.o proof/pq2/src/pq2ping.o proof/pq2/src/pq2wrappers.o proof/pq2/src/redirguard.o  -Llib -lRIO -lNet -lHist -lTree -lMatrix -lProof -lThread -lCore -lCint -lMathCore -lTree -lm -ldl  -pthread   -rdynamic
make

The fix was to take the -lRooFit and -lGpad and add them to the very end of the linking options. In the second case it was -lTree.

The build finished successfully after these changes, and I have no clue why they failed in the first place, I’m just documenting it here for posterity.

uname -a:
Linux calypso 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
g++ --version:
g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

RootSplash:
ROOT 5.30/04 (tags/v5-30-04@41807, Nov 09 2011, 11:35:12 on linuxx8664gcc)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010

in this case, posterity is 5 days later…

thanks for the help!