Building ROOT v5.18b


Due to some bug fixes in xrootd, we are trying to move to ROOT v5.18b. I obtained the source from subversion:
svn co

I’m building on RHEL3, gcc3.2.3 with the following configuration:
./configure linux --disable-cern --enable-mysql --enable-xrootd --with-python-incdir=/afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/python/2.5.1/include/python2.5 --with-python-libdir=/afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/python/2.5.1/lib/python2.5/config --enable-mathcore --enable-mathmore --enable-reflex --enable-cintex --enable-roofit --with-oracle-incdir=/usr/oracle/rdbms/public --with-oracle-libdir=/usr/oracle/lib --enable-minuit2 --enable-unuran --enable-table --enable-explicitlink

The build fails in xrootd:
Creating executable …/…/bin/xrd
g++ -D_ALL_SOURCE -D_REENTRANT -D_GNU_SOURCE -fPIC -rdynamic -Wall -Wno-deprecated -D__linux__ -g …/…/obj/XrdCommandLine.o …/…/lib/libXrdClient.a …/…/lib/libXrdCrypto.a …/…/lib/libXrdSut.a …/…/lib/libXrdNet.a …/…/lib/libXrdOuc.a …/…/lib/libXrdSys.a -lnsl -lpthread -lrt -ldl -lc -o …/…/bin/xrd
Compiling XrdClientAdmin_c_wrap.c
g++ -g -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_ALL_SOURCE -D_REENTRANT -D_GNU_SOURCE -fPIC -rdynamic -Wall -Wno-deprecated -D__linux__ -g -DXrdDEBUG=1 -I. -I… -I/afs/ -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -o …/…/obj/XrdClientAdmin_c_wrap.o XrdClientAdmin_c_wrap.c
XrdClientAdmin_c_wrap.c:1186: syntax error before __attribute__' XrdClientAdmin_c_wrap.c:1186: syntax error before)’ token
XrdClientAdmin_c_wrap.c:1187: syntax error before *' token XrdClientAdmin_c_wrap.c:1192: 'SwigPerlWrapperPtr' is used as a type, but is not defined as a type. XrdClientAdmin_c_wrap.c:1744: syntax error beforeattribute
XrdClientAdmin_c_wrap.c: In function void _wrap_XrdInitialize(...)': XrdClientAdmin_c_wrap.c:1758: syntax error beforeif’
XrdClientAdmin_c_wrap.c:1760: syntax error before }' token XrdClientAdmin_c_wrap.c:1761: ISO C++ forbids declaration ofres1’ with no

much more, and then ends with:
{standard input}:4198: Error: symbol res2' is already defined {standard input}:4246: Error: symbolargvi’ is already defined
{standard input}:4253: Error: symbol mark' is already defined {standard input}:4259: Error: symbolPL_stack_base’ is already defined
{standard input}:4265: Error: symbol PL_stack_base' is already defined {standard input}:4271: Error: symbolPL_stack_base’ is already defined
{standard input}:4277: Error: symbol PL_stack_base' is already defined {standard input}:4283: Error: symbolPL_stack_base’ is already defined
{standard input}:4289: Error: symbol PL_stack_base' is already defined {standard input}:4295: Error: symbolPL_stack_base’ is already defined
{standard input}:4301: Error: symbol PL_stack_base' is already defined {standard input}:4307: Error: symbolPL_stack_base’ is already defined
{standard input}:4313: Error: symbol PL_stack_sp' is already defined {standard input}:4320: Error: symbolPerl_croak’ is already defined
{standard input}:4505: Error: symbol mark' is already defined {standard input}:4525: Error: symbolPL_stack_base’ is already defined
{standard input}:4531: Error: symbol PL_stack_sp' is already defined make[5]: *** [../../obj/XrdClientAdmin_c_wrap.o] Error 1 make[4]: *** [Linuxall] Error 2 make[3]: *** [all] Error 2 make[2]: *** [XrdClient] Error 2 make[1]: *** [all] Error 2 make[1]: Leaving directory/a/surrey01/vol/vol2/g.glast_users/glground/heather/ROOT-v5.18b/v5.18.00b/root/xrootd/src/xrootd’
make: *** [xrootd/src/xrootd/lib/] Error 2

Is there a known problem? I notice that this version isn’t mentioned on the ROOT pages, so perhaps I should not even be using it.



I remember that in most of the SLAC shared machines I was never able to compile the xrootd perl wrapper, with neither version of swig in the latest 4 years (that module is automatically generated). This was due to perl being installed in afs and with parameters which are nonstandard with respect to a pure RH (or whatever distro) setup. I got the same kind of (nonsense) errors that you get.

So, if you don’t need the xrootd perl interface, I’d suggest to disable it while you try to compile at slac. I will check here if there is a ROOT configure option to do that.

But, since this is a problem that arose only in the shared machines at SLAC, it is highly probable that Wilko has some magic to get it compiled there, you can also check with him, he is a good user of the xrootd perl interface since years.



Yes, actually I did contact Wilko, and he directed me to do the following:
Edit xrootd/ file in the root release:
At around line 186 I added --disable-perlint:

 182                 if [ ! "x$(AFSINCDIR)" = "x" ] ; then \
 183                    xinc=`echo $(AFSINCDIR)`; \
 184                    xopt="$$xopt --with-afs-incdir=$$xinc"; \
 185                 fi; \

–> 186 xopt="$$xopt --disable-krb4 --enable-echo --no-arch-subdirs
186 --disable-mon --disable-perlint";
187 cd xrootd; \

That got me part of the way there - is there a way this could be configurable via some --enable flag so we don’t have to modify anything in the future? We are compiling ROOT with xrootd support for GLAST, and as much as possible, we prefer to compile and distribute a vanilla form of ROOT.

Now, that got me part of the way there… I also tried using --enable-explicit-link during configure, but if I do that and enable xrootd, we fail during the link:

bin/rmkdepend -R -fnetx/src/G__Netx.d -Y -w 1000 –
-pipe -m32 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -Ixrootd/src/xrootd/src -D__cplusplus -Icint/lib/prec_stl
-Icint/stl – netx/src/G__Netx.cxx
g++ -pipe -m32 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -Ixrootd/src/xrootd/src -I. -o netx/src/G__Netx.o -c netx/src/G__Netx.cxx
g++ -shared -Wl,-soname, -m32 -g -o lib/ netx/src/TXNetFile.o netx/src/TXNetFileStager.o netx/src/TXNetSystem.o netx/src/G__Netx.o -Llib -lNet -lRIO -lThread -Lxrootd/src/xrootd/lib -lXrdOuc -lXrdSys -Llib -lXrdClient -Llib -lCore -lCint
/usr/bin/ld: cannot find -lXrdOuc
collect2: ld returned 1 exit status
make: *** [lib/] Error 1
rm utils/src/RStl_tmp.cxx utils/src/rootcint_tmp.cxx

Perhaps I just need to bild libXrdOuc first… is --enable-explicit-link and xrootd not recommended?



for the --disable-perlint I believe that this is the most straightforward action to do, even if maybe there should be some way to get it correctly built at SLAC.

Having learnt from the lesson, we are going to find a way to solve that trouble in a more general way, to make you able to install the vanilla ROOT also under those circumstances.

For the --enable-explicit-link business, personally I have no idea, it looks like a modifier for how actually xrootd is bundled inside ROOT. I will ask, however.


Hi Heather,

Unfortunately currently it is not possible to modify the xrootd configuration flags while building ROOT. I am implementing this possibility in the trunk and it will be included in 5.18.00c .

I am not aware of problems with --enable-explicitlink and xrootd. Furthermore, xrootd should get built before netx. It may be that your build got confused from previous errors.
Could you give a try by distclean-ing netx and xrootd? I mean

$ gmake distclean-netx
$ gmake distclean-xrootd
$ gmake