0x90

一回休み

Compiling CERN ROOT 6.08.06 on Debian sid

I am not sure the detail, but the configuration files of CERN ROOT 6.08.06 looks only for the scientific linux and the build fails on Debian sid.

Here is what I did to compile CERN ROOT 6.08.06 successfully on Debian sid.

ld name resolution on libFITSIO.so

The linker cannot find the symbols like BZ2_bzReadOpen when compiling libFITSIO.so.

After the linking fails, you can link it manually with libbz2.

g++ -shared -Wl,-soname,libFITSIO.so -m64 -O2 -DNDEBUG -Wl,--no-undefined -Wl,--as-needed -o lib/libFITSIO.so graf2d/fitsio/src/TFITS.o graf2d/fitsio/src/G__FITSIO.o -Llib -lCore -ldl -Llib -lHist -lGpad -lGraf -lMatrix /usr/lib/x86_64-linux-gnu/libcfitsio.a -lpthread -lz -lbz2

libgsl is not position independent binary

The link process for libMathMore.so also fails. This is because the static library libgslcblas.a (and libgsl.a) is not a position independent ELF file.

Hence, you should link it manually with the shared library.

g++ -fPIC -shared -Wl,-soname,libMathMore.so -m64 -O2 -DNDEBUG -Wl,--no-undefined -Wl,--as-needed -o lib/libMathMore.so math/mathmore/src/SpecFuncMathMore.o math/mathmore/src/MultiNumGradFunction.o math/mathmore/src/GSLMinimizer.o math/mathmore/src/Interpolator.o math/mathmore/src/zsolve_cubic.o math/mathmore/src/GSLMinimizer1D.o math/mathmore/src/GSLSimAnnealing.o math/mathmore/src/ChebyshevApprox.o math/mathmore/src/QuantFuncMathMore.o math/mathmore/src/Polynomial.o math/mathmore/src/GSLMCIntegrator.o math/mathmore/src/VavilovAccuratePdf.o math/mathmore/src/GSLRootFinderDeriv.o math/mathmore/src/GSLDerivator.o math/mathmore/src/VavilovAccurateCdf.o math/mathmore/src/KelvinFunctions.o math/mathmore/src/Vavilov.o math/mathmore/src/GSLRndmEngines.o math/mathmore/src/VavilovAccurateQuantile.o math/mathmore/src/RootFinderAlgorithms.o math/mathmore/src/cblas.o math/mathmore/src/Derivator.o math/mathmore/src/GSLRootHelper.o math/mathmore/src/GSLIntegrator.o math/mathmore/src/GSLRootFinder.o math/mathmore/src/PdfFuncMathMore.o math/mathmore/src/GSLNLSMinimizer.o math/mathmore/src/GSLQuasiRandom.o math/mathmore/src/MCParameters.o math/mathmore/src/GSLSimAnMinimizer.o math/mathmore/src/GSLInterpolator.o math/mathmore/src/VavilovAccurate.o math/mathmore/src/GSLMultiRootFinder.o math/mathmore/src/VavilovFast.o math/mathmore/src/G__MathMore.o -Llib -lCore -ldl -Llib -lMathCore -lgsl -lgslcblas

With above two modifications, I could at least compile the root successfully. I am not sure whether the binary works well as the authors expected, but so far it seems so.

(Maybe I should report the dev team?)