You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "A. Wilcox" <aw...@adelielinux.org> on 2019/04/09 20:00:13 UTC

r1841109 (and 1.7.0) breaks build on 32-bit PowerPC with --enable-nonportable-atomics

Hi there,

While building apr-1.7.0 on 32-bit PowerPC, we encountered the following
error:

/usr/lib/gcc/powerpc-foxkit-linux-musl/8.3.0/../../../../powerpc-foxkit-linux-musl/bin/ld:
../.libs/libapr-1.so: undefined reference to `__sync_val_compare_and_swap_8'
/usr/lib/gcc/powerpc-foxkit-linux-musl/8.3.0/../../../../powerpc-foxkit-linux-musl/bin/ld:
../.libs/libapr-1.so: undefined reference to `__sync_sub_and_fetch_8'
/usr/lib/gcc/powerpc-foxkit-linux-musl/8.3.0/../../../../powerpc-foxkit-linux-musl/bin/ld:
../.libs/libapr-1.so: undefined reference to `__sync_lock_test_and_set_8'
/usr/lib/gcc/powerpc-foxkit-linux-musl/8.3.0/../../../../powerpc-foxkit-linux-musl/bin/ld:
../.libs/libapr-1.so: undefined reference to `__sync_fetch_and_sub_8'
/usr/lib/gcc/powerpc-foxkit-linux-musl/8.3.0/../../../../powerpc-foxkit-linux-musl/bin/ld:
../.libs/libapr-1.so: undefined reference to `__sync_fetch_and_add_8'

This was while building the globalmutexchild test.

I bisected the failure and found it began at r1841109, when 64-bit
atomic support was added.

I'm not too familiar with autoconf, but it seems like the
ap_cv_atomic_builtins test in configure.in may need to have 64-bit
atomics added.  Alternatively, it may be possible around line 660 to set
force_generic_atomics to yes on 32-bit PowerPC systems.  I was not able
to make this work myself using either "powerpc" nor "ppc" for the
$host_cpu case, but that may be due to my lack of experience with autoconf.

Thank you for your consideration.

Best to you and yours,
--arw

-- 
A. Wilcox (awilfox)
Project Lead, Adélie Linux
https://www.adelielinux.org