Compiling in 32bits on a x86_64 machine

I am trying to compile root_v5-24-00 on a x86_64 machine running Scientific Linux.

The compilation failed with the following error :

g++ -shared -Wl,-soname, -m32 -O2 -o lib/ net/netx/src/TXNetFile.o net/netx/src/TXNetFileStager.o net/netx/src/TXNetSystem.o net/netx/src/G__Netx.o -Lnet/xrootd/src/xrootd/lib -lXrdOuc -lXrdSys -Llib -lXrdClient
/usr/bin/ld: cannot find -lXrdClient
collect2: ld returned 1 exit status
make: *** [lib/] Error 1

Do you have any guess ?



PS : Here are few more information you may need :

Configure option : [11:37] : more config.status 
linux --with-pythia6-uscore=SINGLE --with-f77=g77 --enable-xrootd --with-xml-libdir=/usr/lib --enable-alien --with-alien-incdir=/gridgroup/ALICE/AliSof
t/alien/api/include --with-alien-libdir=/gridgroup/ALICE/AliSoft/alien/api/lib --with-ld=g++ --with-ssl=/gridgroup/ALICE/AliSoft/alien

Machine Config : [11:39] : uname -a Linux 2.6.9-89.0.9.ELsmp #1 SMP Mon Aug 24 08:50:41 CDT 2009 x86_64 x86_64 x86_64 GNU/Linux

Dear Raphael,

There must be an error in building xrootd.

Please do

make distclean-xrootd
make all-xrootd

and report the full log.

G. Ganis

You are right there is an error in building xrootd. see the log output below.
It is looking for 32bits version of which can not be find.
In my /usr/lib there is no file but one named


g++ -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_ALL_SOURCE -D_REENTRANT -D_GNU_SOURCE -fPIC -rdynamic -Wall -Wno-deprecated -D__linux__ -O2 -DXrdDEBUG=0 -DHAVE_LIBZ -I. -I.. -o ../../obj/XrdFrmAdminUnlink.o Creating executable ../../bin/frm_admin g++ -m32 -D_ALL_SOURCE -D_REENTRANT -D_GNU_SOURCE -fPIC -rdynamic -Wall -Wno-deprecated -D__linux__ -O2 ../../obj/XrdFrmAdminMain.o ../../obj/XrdFrmAdmin.o ../../obj/XrdFrmAdminAudit.o ../../obj/XrdFrmAdminFiles.o ../../obj/XrdFrmAdminFind.o ../../obj/XrdFrmAdminQuery.o ../../obj/XrdFrmAdminUnlink.o ../../obj/XrdXrootdMonitor.o ../../obj/XrdScheduler.o -lreadline -lcurses -lnsl -lpthread -lrt -ldl -lc -L../../lib -lXrdFrm -lXrdCms -lXrdOss -lXrdNet -lXrdOuc -lXrdSys -o ../../bin/frm_admin /usr/bin/ld: skipping incompatible /usr/lib64/ when searching for -lreadline /usr/bin/ld: skipping incompatible /usr/lib64/libreadline.a when searching for -lreadline /usr/bin/ld: cannot find -lreadline collect2: ld returned 1 exit status make[5]: *** [../../bin/frm_admin] Error 1 make[4]: *** [Linuxall] Error 2 make[3]: *** [all] Error 2 make[2]: *** [XrdFrm] Error 2 make[1]: *** [all] Error 2

Dear Raphael,

If you want to build 32-bits binaries you must be sure that you have 32-bits versions of all the libraries that you need in the standard paths.
Unfortunately xrootd is not very solid in finding configuration problems of this kind. We will see what we can do about that.

I was able to reproduce the problem on one of our machines. A possible workaround is to add the missing symlink:

  $ ln -sf /usr/lib/ /usr/lib/

G. Ganis