Re[2]: [Gc] atomic-ops on arm trouble, again

Ivan Maidanski ivmai at mail.ru
Fri Mar 18 13:09:08 PST 2011


Hi Gregory,

For pre-v6 ARMs, libatomic_ops emulates the missing primitives (using thread_lock/unlock) if  AO_REQUIRE_CAS is defined.

Regards.

Fri, 18 Mar 2011 10:57:55 -0700 Gregory Farnum <gregf at hq.newdream.net>:
> Ivan:
> Thanks. As it turns out I should have checked earlier, but these are ARMv5
> machines (other people set these up and I just wasn't expecting it...). IIRC
> libatomic-ops don't support these, is that correct?
> -Greg
> On Friday, March 11, 2011 at 11:54 PM, Ivan Maidanski wrote:
> Hi,
> > 
> > Quick fix that should work for you: -D AO_REQUIRE_CAS
> > 
> > Really, the problem is here:
> > 
> > /* NEC LE-IT: gcc has no way to easily check the arm architecture
> >  * but defines only one of __ARM_ARCH_x__ to be true */
> > #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
> >  || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__) \
> >  || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
> >  || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7R__)
> > 
> > If your target is arm 6+ then we should update this list (send me please
> your target's predefined ARM macro).
> > 
> > Regards. 
> > 
> > Fri, 11 Mar 2011 13:11:11 -0800 Gregory Farnum
> <gregory.farnum at dreamhost.com>:
> > 
> > > Hello all,
> > > Last September I wrote about an issue we were having with the atomic-ops
> > > implementation on ARM in Ubuntu. [1][2] This apparently got solved (I
> > > submitted a patch and a more generalized solution was implemented), but a
> week
> > > or two ago I got a report from our Debian maintainer that Ceph on ARM was
> > > failing due to issues with the atomic ops. He sent along the full build
> log.
> > > [3] There are no issues with any of the other debian architectures (well,
> > > relevant ones -- an unrelated issue popped up on s390).
> > > The relevant bit of the log is included below, but the gist of it is that
> none
> > > of the AO_* functions seem to be working. I've managed to reproduce this
> in a
> > > QEMU ARM install on both the 7.2~alpha5+cvs20100601-1 and 1.2-4+lenny1
> > > versions (from Debian packages), and the Debian build system is using
> > > 7.2~alpha5+cvs20101124-1 (I'm afraid I don't know exactly how these
> versions
> > > correspond to the cvs versions, sorry). Unlike the last time, I've been
> unable
> > > to find a simple fix that I think will fix things. :(
> > > Any suggestions? Requests for more data? Patches to try?
> > > Thanks!
> > > -Greg
> > > 
> > > [1]: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/635388
> > > [2]:
> > >
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2010-September/004137.html[3]:
> > >
> https://buildd.debian.org/fetch.cgi?pkg=ceph&arch=armel&ver=0.24.3-2&stamp=1298712439&file=log&as=raw
> > > 
> > > g++ -DHAVE_CONFIG_H -I. -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64
> -D_REENTRANT
> > > -D_THREAD_SAFE -rdynamic -g -O2 -MT AuthAuthorizeHandler.o -MD -MP -MF
> > > .deps/AuthAuthorizeHandler.Tpo -c -o AuthAuthorizeHandler.o `test -f
> > > 'auth/AuthAuthorizeHandler.cc' || echo './'`auth/AuthAuthorizeHandler.cc
> > > In file included from ./include/buffer.h:55,
> > > from ./include/encoding.h:20,
> > > from ./include/object.h:29,
> > > from ./include/types.h:64,
> > > from auth/Crypto.h:17,
> > > from auth/Auth.h:18,
> > > from auth/AuthAuthorizeHandler.cc:1:
> > > ./include/atomic.h: In member function 'void ceph::atomic_t::inc()':
> > > ./include/atomic.h:33: error: 'AO_fetch_and_add1' was not declared in this
> > > scope
> > > ./include/atomic.h: In member function 'size_t ceph::atomic_t::dec()':
> > > ./include/atomic.h:36: error: 'AO_fetch_and_sub1_write' was not declared
> in
> > > this scope
> > > ./include/atomic.h: In member function 'void ceph::atomic_t::add(size_t)':
> > > ./include/atomic.h:39: error: 'AO_fetch_and_add' was not declared in this
> > > scope
> > > ./include/atomic.h: In member function 'void ceph::atomic_t::sub(int)':
> > > ./include/atomic.h:43: error: 'AO_fetch_and_add_write' was not declared in
> > > this scope
> > > make[3]: *** [AuthAuthorizeHandler.o] Error 1
> > > make[2]: *** [all] Error 2
> > > make[1]: *** [all-recursive] Error 1
> > > make: *** [build-stamp] Error 2
> > > dpkg-buildpackage: error: debian/rules build gave error exit status 2 
> > > _______________________________________________
> > > Gc mailing list
> > > Gc at linux.hpl.hp.com
> > > http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> > 
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/



More information about the Gc mailing list