Hi All,

On 20-May-14, at 6:41 PM, Sage Weil wrote:

On Wed, 21 May 2014, Dmitry Smirnov wrote:
On Sun, 18 May 2014 11:14:51 John David Anglin wrote:
The attached patch resolves the issue with the undeclared atomic functions.

Thanks, John. I passed this patch to upstream through

   https://github.com/ceph/ceph/pull/1844

I merged this, but shortly after Greg pointed out that using our spinlock implementation on this architecture might be better. Hard to say either way, though, knowing almost nothing about this architecture, and I suspect
it would be more work to #ifdef around it than to simply #define this
variable.


The pthread spinlock and GCC sync support are probably better than the atomic_ops
library on Linux.  For hpux, it would be best stay with atomic_ops.

I have continued to hack trying to get ceph to build. I forced the cast and reached the following
point:

libtool: link: g++-4.8 -I/usr/include/nss -I/usr/include/nspr -Wall - Wtype-limit s -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format- security -fno- strict-aliasing -fsigned-char -rdynamic -ftemplate-depth-1024 -Wnon- virtual-dtor -Wno-invalid-offsetof -Wstrict-null-sentinel -g -O2 -Wformat - Werror=format-sec urity -o .libs/ceph_rgw_multiparser rgw/rgw_multiparser.o /usr/lib/ libatomic_op s.a -Wl,--as-needed ./.libs/librgw.a ./.libs/librados.so ./.libs/ libcls_rgw_clie nt.a libcls_log_client.a libcls_statelog_client.a libcls_user_client.a libcls_re plica_log_client.a ./.libs/libcls_lock_client.a ./.libs/ libcls_refcount_client.a libcls_version_client.a /usr/lib/hppa-linux-gnu/libcurl-gnutls.so / usr/lib/hppa -linux-gnu/libexpat.so /usr/lib/libfcgi.so ./.libs/libglobal.a ./.libs/ libcommon .a -ldl -lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4 - luuid -lm -lrt
 -lboost_thread -lboost_system -lleveldb -lsnappy -pthread
./.libs/librados.so: undefined reference to `AO_fetch_compare_and_swap_emulation
(unsigned int volatile*, unsigned int, unsigned int)'
./.libs/librados.so: undefined reference to `AO_store_full_emulation(unsigned in
t volatile*, unsigned int)'
collect2: error: ld returned 1 exit status
Makefile:7148: recipe for target 'ceph_rgw_multiparser' failed
make[5]: *** [ceph_rgw_multiparser] Error 1

There are two issues here:
1) I think "-latomic_ops" should be added to EXTRALIBS, not LDFLAGS in the Makefile. 2) The libatomic-ops package doesn't work with c++ at least when libatomic_ops.a contains
needed functions.  The header file emul_cas.h the standard

#ifdef __cplusplus
extern "C" {
#endif

...

#ifdef __cplusplus
}
#endif

namespace stuff.  There might be other places as well.

Hacking this got me to here:

libtool: link: g++-4.8 -I/usr/include/nss -I/usr/include/nspr -Wall - Wtype-limit s -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format- security -fno- strict-aliasing -fsigned-char -rdynamic -ftemplate-depth-1024 -Wnon- virtual-dtor -Wno-invalid-offsetof -Wstrict-null-sentinel -g -O2 -Wformat - Werror=format-sec urity -o ceph_erasure_code_benchmark test/erasure-code/ ceph_erasure_code_benchma rk.o -Wl,--as-needed ./.libs/libosd.a ./.libs/libosdc.a ./.libs/ libos.a -laio . /.libs/libperfglue.a -lboost_program_options ./.libs/ libglobal.a ./.libs/libcomm on.a -lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4 -luuid - lm /usr/li b/libatomic_ops.a -lrt -ldl -lboost_thread -lboost_system -lleveldb - lsnappy /usr/bin/ld.bfd.real: ./.libs/libglobal.a(HeartbeatMap.o): undefined reference t
o symbol 'pthread_rwlock_wrlock@@GLIBC_2.2'
//lib/hppa-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from com
mand line
collect2: error: ld returned 1 exit status
Makefile:7080: recipe for target 'ceph_erasure_code_benchmark' failed

Haven't had a chance to look at this one but it seems like a eglibc bug. Note "-latomic_ops" is
added to EXTRALIBS in the above.

Dave
--
John David Anglin       dave.ang...@bell.net


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to