Hi
I have checked-out the latest root version 5.30.00 by typing
svn co root.cern.ch/svn/root/tags/v5-30-00 root
then
sudo ./configure
it went ok, then
sudo make
and it crashed after sometime(see the message below)
g++ -D_ALL_SOURCE -D_REENTRANT -D_GNU_SOURCE -fPIC -rdynamic -Wall -Wno-deprecated -D__linux__ -m32 -O2 …/…/obj/XrdCmsAdmin.o …/…/obj/XrdCmsBaseFS.o …/…/obj/XrdCmsCache.o …/…/obj/XrdCmsCluster.o …/…/obj/XrdCmsConfig.o …/…/obj/XrdCmsJob.o …/…/obj/XrdCmsKey.o …/…/obj/XrdCmsManList.o …/…/obj/XrdCmsManTree.o …/…/obj/XrdCmsManager.o …/…/obj/XrdCmsMeter.o …/…/obj/XrdCmsNash.o …/…/obj/XrdCmsNode.o …/…/obj/XrdCmsPList.o …/…/obj/XrdCmsPrepArgs.o …/…/obj/XrdCmsPrepare.o …/…/obj/XrdCmsProtocol.o …/…/obj/XrdCmsReq.o …/…/obj/XrdCmsRouting.o …/…/obj/XrdCmsRRQ.o …/…/obj/XrdCmsRTable.o …/…/obj/XrdCmsState.o …/…/obj/XrdCmsSupervisor.o …/…/obj/XrdCmsXmiReq.o …/…/obj/XrdCmsLogin.o …/…/obj/XrdCmsParser.o …/…/obj/XrdCmsRRData.o …/…/obj/XrdCmsSecurity.o …/…/obj/XrdCmsTalk.o -L…/…/lib -lXrdOss -lXrdFrm -lXrdNet -lXrdOuc -lXrdNetUtil -lXrd -lXrdSys -lnsl -lpthread -lrt -ldl -lc -o …/…/bin/cmsd
…/…/lib/libXrd.a(XrdLink.o): In function XrdLink::syncStats(int*)': XrdLink.cc:(.text+0x110): undefined reference to
__sync_fetch_and_add_8’
XrdLink.cc :(.text+0x145): undefined reference to __sync_fetch_and_and_8' XrdLink.cc:(.text+0x15f): undefined reference to
__sync_fetch_and_add_8’
XrdLink.cc :(.text+0x175): undefined reference to __sync_fetch_and_add_8' XrdLink.cc:(.text+0x1d1): undefined reference to
__sync_fetch_and_and_8’
XrdLink.cc :(.text+0x1eb): undefined reference to __sync_fetch_and_add_8' XrdLink.cc:(.text+0x201): undefined reference to
__sync_fetch_and_add_8’
…/…/lib/libXrd.a(XrdLink.o): In function XrdLink::Stats(char*, int, int)': XrdLink.cc:(.text+0x337): undefined reference to
__sync_fetch_and_or_8’
XrdLink.cc :(.text+0x359): undefined reference to __sync_fetch_and_or_8' XrdLink.cc:(.text+0x37d): undefined reference to
__sync_fetch_and_or_8’
XrdLink.cc :(.text+0x3a1): undefined reference to __sync_fetch_and_or_8' ../../lib/libXrd.a(XrdLink.o): In function
XrdLink::Send(char const*, int)’:
XrdLink.cc :(.text+0x901): undefined reference to __sync_fetch_and_add_8' XrdLink.cc:(.text+0x951): undefined reference to
__sync_fetch_and_add_8’
XrdLink.cc :(.text+0x9b7): undefined reference to __sync_fetch_and_add_8' ../../lib/libXrd.a(XrdLink.o): In function
XrdLink::Send(XrdLink::sfVec const*, int)’:
XrdLink.cc :(.text+0xbe3): undefined reference to __sync_fetch_and_add_8' ../../lib/libXrd.a(XrdLink.o): In function
XrdLink::Send(iovec const*, int, int)’:
XrdLink.cc :(.text+0xda4): undefined reference to __sync_fetch_and_add_8' ../../lib/libXrd.a(XrdLink.o):XrdLink.cc:(.text+0xdf8): more undefined references to
__sync_fetch_and_add_8’ follow
collect2: ld returned 1 exit status
make[5]: *** […/…/bin/cmsd] Error 1
make[4]: *** [Linuxall] Error 2
make[3]: *** [all] Error 2
make[2]: *** [XrdCms] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/root/net/xrootd/src/xrootd’
*** Error condition reported by make (rc = 2):
make: *** [net/xrootd/src/xrootd/LastBuild.d] Error 1
Hi,
On which platform? Using which compiler?
If you do not need xrootd, add --disable-xrootd to the call to configure.
Cheers,
Philippe.
Hi,
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
Axel
July 7, 2011, 3:05pm
4
Hi,
looks like these object files were built with an incompatible compiler. I’d run make distclean; make.
Cheers, Axel.
Hi,
I am getting the same exact error when trying to compile root v5-30-00-rc2.
-lnsl -lpthread -lrt -ldl -lc -o ../../bin/cmsd
../../lib/libXrd.a(XrdLink.o): In function `XrdLink::syncStats(int*)':
XrdLink.cc:(.text+0x110): undefined reference to `__sync_fetch_and_add_8'
XrdLink.cc:(.text+0x145): undefined reference to `__sync_fetch_and_and_8'
XrdLink.cc:(.text+0x15f): undefined reference to `__sync_fetch_and_add_8'
XrdLink.cc:(.text+0x175): undefined reference to `__sync_fetch_and_add_8'
XrdLink.cc:(.text+0x1d1): undefined reference to `__sync_fetch_and_and_8'
XrdLink.cc:(.text+0x1eb): undefined reference to `__sync_fetch_and_add_8'
XrdLink.cc:(.text+0x201): undefined reference to `__sync_fetch_and_add_8'
../../lib/libXrd.a(XrdLink.o): In function `XrdLink::Stats(char*, int, int)':
XrdLink.cc:(.text+0x337): undefined reference to `__sync_fetch_and_or_8'
XrdLink.cc:(.text+0x359): undefined reference to `__sync_fetch_and_or_8'
XrdLink.cc:(.text+0x37d): undefined reference to `__sync_fetch_and_or_8'
XrdLink.cc:(.text+0x3a1): undefined reference to `__sync_fetch_and_or_8'
../../lib/libXrd.a(XrdLink.o): In function `XrdLink::Send(char const*, int)':
XrdLink.cc:(.text+0x901): undefined reference to `__sync_fetch_and_add_8'
XrdLink.cc:(.text+0x951): undefined reference to `__sync_fetch_and_add_8'
XrdLink.cc:(.text+0x9b7): undefined reference to `__sync_fetch_and_add_8'
../../lib/libXrd.a(XrdLink.o): In function `XrdLink::Send(XrdLink::sfVec const*, int)':
XrdLink.cc:(.text+0xbe3): undefined reference to `__sync_fetch_and_add_8'
../../lib/libXrd.a(XrdLink.o): In function `XrdLink::Send(iovec const*, int, int)':
XrdLink.cc:(.text+0xda4): undefined reference to `__sync_fetch_and_add_8'
../../lib/libXrd.a(XrdLink.o):XrdLink.cc:(.text+0xdf8): more undefined references to `__sync_fetch_and_add_8' follow
collect2: ld returned 1 exit status
make[5]: *** [../../bin/cmsd] Error 1
make[4]: *** [Linuxall] Error 2
make[3]: *** [all] Error 2
make[2]: *** [XrdCms] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/zkohley/root-v5-30-00-rc2/net/xrootd/src/xrootd'
*** Error condition reported by make (rc = 2):
make: *** [net/xrootd/src/xrootd/LastBuild.d] Error 1
make: *** Waiting for unfinished jobs....
I tried a distclean and then make again but no luck.
Using Ubuntu 10.04LTS and gcc version 4.4.3.
I appreciate any help. Thanks
samcy
July 14, 2011, 5:56am
6
Hi,
I too have a similar problem. My system configuration is:
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
While it is not an absolute fix:
Philippe’s suggestion of disabling xrootd did work and allow me to compile root.
Hi,
I have exact same problem.
Could you tell what is xrootd for?
pcanal
July 19, 2011, 7:42pm
9
See xrootd.slac.stanford.edu
It is also used by PROOF in some configurations.
Cheers,
Philippe.
Hi,
sorry for digging out that old thread, just stumbled upon the solution. I suppose your error is caused by this bug in the xrootd build system: savannah.cern.ch/bugs/?81746
The test for gcc’s atomics fails on some platforms (e.g. 64 bit PowerPC).
As a quick workaround you can comment out the ill-defined atomics and return to the standard in src/xrootd/src/XrdSys/XrdSysAtomics.hh or simply exhange the #ifdef by #ifndef .
/*#ifdef HAVE_ATOMICS
#define AtomicBeg(Mtx)
#define AtomicEnd(Mtx)
#define AtomicAdd(x, y) __sync_fetch_and_add(&x, y)
#define AtomicCAS(x, y, z) __sync_bool_compare_and_swap(&x, y, z)
#define AtomicDec(x) __sync_fetch_and_sub(&x, 1)
#define AtomicDTZ(x) if (!(__sync_fetch_and_sub(&x, 1))) AtomicFAZ(x)
#define AtomicFAZ(x) __sync_fetch_and_and(&x, 0)
#define AtomicGet(x) __sync_fetch_and_or(&x, 0)
#define AtomicInc(x) __sync_fetch_and_add(&x, 1)
#define AtomicISM(x, y) AtomicCAS(y, AtomicInc(x), x)
#define AtomicSub(x, y) __sync_fetch_and_sub(&x, y)
#else*/
#define AtomicBeg(Mtx) Mtx.Lock()
#define AtomicEnd(Mtx) Mtx.UnLock()
#define AtomicAdd(x, y) x += y
#define AtomicCAS(x, y, z) if (x == y) x = z
#define AtomicDTZ(x) if (!(x--)) x = 0
#define AtomicDec(x) x--
#define AtomicFAZ(x) x; x = 0
#define AtomicGet(x) x
#define AtomicInc(x) x++
#define AtomicISM(x, y) if (y == x++) y = x
#define AtomicSub(x, y) x -= y
/*#endif*/
#endif
It would be helpful to post your platform.
Regards
Kwyjibo
Dear Kwyjibo,
thank you very much. All my machines compiled the 5.30 ok, but one. Finally, we found that this is 64bit one and the problem was immediately solved after applying your recommendation.
jaromir