Compiling ROOT V4.00.08 on Scientific Linux : Pb with cernli

Compilation of ROOT V4.00.08 fails here :

g++ -O -o bin/h2root main/src/h2root.o hbook/src/hntvar2.o
-Llib -lCore -lCint -lHist -lGraf -lGraf3d -lTree -lMatrix
/usr/remote/prive/cernlib/pro/lib/libpacklib.a /usr/remote/prive/cernlib/pro/lib/libkernlib.a
-lg2c -lnsl -lm -ldl -lpthread -rdynamic
/usr/remote/prive/cernlib/pro/lib/libpacklib.a(error.o)(.text+0x5c5): In function rfio_serror_r': /afs/’ is deprecated; use strerror' orstrerror_r’ instead
/usr/remote/prive/cernlib/pro/lib/libpacklib.a(serror.o)(.text+0x29b): In function sstrerror_r': /afs/’ is deprecated; use strerror' orstrerror_r’ instead
/usr/remote/prive/cernlib/pro/lib/libpacklib.a(u64subr.o)(.text+0x2f): In function strtou64': /afs/ undefined reference to__ctype_b’
/usr/remote/prive/cernlib/pro/lib/libpacklib.a(u64subr.o)(.text+0x61):/afs/ undefined reference to __ctype_b' /usr/remote/prive/cernlib/pro/lib/libpacklib.a(u64subr.o)(.text+0x20f): In functionstrutou64’:
/afs/ undefined reference to __ctype_b' /usr/remote/prive/cernlib/pro/lib/libpacklib.a(u64subr.o)(.text+0x241):/afs/ undefined reference to__ctype_b’
collect2: ld returned 1 exit status
make: *** [bin/h2root] Error 1

GCC is SL native (3.2.3).

CERNLIB is 2001. I tried to disable the use of CERNLIB (–disable-cern) but could not.

=> What do I have to do to compile ROOT V4 without CERNLIB ? Then If I want
h2root, which version of cernlib is supported ?

=> By the way, what is the standard way to configure ROOT ? I used to do it with
the script : /afs/
This script creates empty Pyhtia shared libraries… which I do not understand…


upgrade to cernlib 2003 or newer

The ROOT install procedure is described at:


Thanks Rene,

Yes ROOT 4.00.08 compiles with cernlib 2003. I had checked the install doc but this
requirement does not show or I missed it.

There is still a problem on Scientific Linux that I never came accross on RedHat 7.3.
It seems that creating an empty does not fool anymore the linker :

g++ -shared -Wl,-soname, -O -o lib/ pythia/src/TMCParticle.o pythia/src/TPythia.o pythia/src/G__Pythia.o -L/scratch/info/build/root_4.00.08-sl302/lib -lPythia
/scratch/info/build/root_4.00.08-sl302/lib/ file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [lib/] Error 1

I am not sure if we need to compile ROOT with Pythia support but the script
/afs/ was not causing problems before.

Why do you want to create an empty
You better do not enable Pythia when you run the configure command.


Thanks René,

I was always doing this way because ROOT is for AliRoot and the AliRoot documentation
states that ROOT should be compiled this way : … e.html#1.7

The configuation script /afs/ looks like this :

#! /bin/sh
command cd $ROOTSYS
if [ ! -d $ROOTSYS/lib ]; then
command mkdir -p $ROOTSYS/lib
command touch lib/ lib/ lib/
command ./configure linux --with-shift-libdir=/opt/shift/lib
–enable-rfio --enable-cern

I have to understand better the relationship between AliRoot/ROOT and Pythia.
The script above was working before I switch for Scientific Linux.

Now the problem is more with AliRoot than with ROOT. Thanks again.

JM Barbet.