On 03/01/2012 05:47 PM, Niels de Vos wrote:
On 03/01/2012 03:18 PM, Peter Robinson wrote:
Hello All,
Just thought I'd do a progress/status update on packages. Most of the
information is already on the wiki [1] page but maybe a little context
might assist.
<snip>
- ceph - needs investigation, basically all cloud related things
depend on this because libvirt depends on it
Latest is ceph-0.41-2.fc17, your failed build lists ceph-0.41-1.fc17.
I have started a scratch-build with the newer version, it did not fail
yet and is already built further than the 0.41-1:
- http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=536725
Okay, a shame. The armv5tel version fails and causes the the armv7hl
build to abort. armv7hl build passes the armv5tel one, so there is
something low-level on v5tel.
TL;DR
Work in progress, identified some issues and building with a patched
spec file for testing. Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=799153.
Longer version, also available in the BZ:
Errors:
./include/atomic.h: In member function 'size_t ceph::atomic_t::inc()':
./include/atomic.h:40:36: 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:43:42: error: 'AO_fetch_and_sub1_write' was not
declared in this scope
...
The ceph.spec contain a BuildRequires for libatomic_ops-devel, which is
provided by gc.
AO_fetch_and_add1 is defined in
usr/include/atomic_ops/sysdeps/gcc/arm.h. That file only does some
useful stuff for ARMv6 and higher architectures. A possible workaround
is to define AO_USE_PTHREAD_DEFS and not use the optimised code for
armv5tel.
An unmodified v7hl-only scratch build failed as well:
- http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=537177
Errors:
/usr/bin/ld: ./.libs/libosdc.a(libcommon_la-ceph_context.o): undefined
reference to symbol 'sem_post@@GLIBC_2.4'
/usr/bin/ld: note: 'sem_post@@GLIBC_2.4' is defined in DSO
/lib/libpthread.so.0 so try adding it to the linker command line
/lib/libpthread.so.0: could not read symbols: Invalid operation
I guess that AO_USE_PTHREAD_DEFS should be defined automatically within
the libatomic_ops-devel package (created from the gc srpm) on < ARMv6.
It also requires adding -lpthread to LDFLAGS (both armv5tel and
armv7hl). But a possible workaround like the attached patch may be the
quicker solution to get ceph built.
A scratch-build with the attached patch will show if I am right or wrong:
- http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=538271
From df44cf0e475e5d8c49ef393d1c4d73f404a36c46 Mon Sep 17 00:00:00 2001
From: Niels de Vos <devos@xxxxxxxxxxxxxxxxx>
Date: Thu, 1 Mar 2012 18:51:55 +0100
Subject: [PATCH] define AO_USE_PTHREAD_DEFS for armv5tel
Fix building on armv5tel where libatomic_ops-devel does not define
AO_fetch_and_add1() and similar.
This should probably be fixed in gc, which provides the
libatomic_ops-devel subpackage.
./include/atomic.h: In member function 'size_t ceph::atomic_t::inc()':
./include/atomic.h:40:36: 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:43:42: error: 'AO_fetch_and_sub1_write' was not declared in this scope
...
Signed-off-by: Niels de Vos <devos@xxxxxxxxxxxxxxxxx>
---
ceph.spec | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/ceph.spec b/ceph.spec
index 0810e37..918ffa6 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -1,6 +1,6 @@
Name: ceph
Version: 0.41
-Release: 2%{?dist}
+Release: 2%{?dist}.0.arm1
Summary: User space components of the Ceph file system
License: LGPLv2
Group: System Environment/Base
@@ -93,7 +93,17 @@ file system.
--without-tcmalloc \
%endif
--without-hadoop --with-radosgw --with-gtk2
-make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
+
+%ifarch %arm
+# fix for: /usr/bin/ld: ./.libs/libosdc.a(libcommon_la-ceph_context.o): undefined reference to symbol 'sem_post@@GLIBC_2.4'
+EXTRA_CFLAGS="-lpthread"
+%endif
+%ifarch armv5tel
+# ARM architectures below v6 should define AO_USE_PTHREAD_DEFS (move to gc?)
+EXTRA_CFLAGS="$EXTRA_CFLAGS -DAO_USE_PTHREAD_DEFS=1"
+%endif
+
+make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS $EXTRA_CFLAGS" CXXFLAGS="$RPM_OPT_FLAGS $EXTRA_CFLAGS"
%install
rm -rf $RPM_BUILD_ROOT
@@ -239,6 +249,9 @@ fi
%{_bindir}/boto_tool
%changelog
+* Thu Mar 01 2012 Niels de Vos <devos@xxxxxxxxxxxxxxxxx> - 0.41-2.0.arm1
+- define AO_USE_PTHREAD_DEFS for armv5tel
+
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 0.41-2
- Rebuilt for c++ ABI breakage
--
1.7.1
_______________________________________________
arm mailing list
arm@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/arm