pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/54380: devel/apr has unresolved references on NetBSD/macppc



>Number:         54380
>Category:       pkg
>Synopsis:       devel/apr has unresolved references on NetBSD/macppc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 16 12:45:00 +0000 2019
>Originator:     Valery Ushakov
>Release:        pkgsrc-2019Q2
>Organization:
>Environment:
NetBSD pony 8.1_STABLE NetBSD 8.1_STABLE (GENERIC) #0: Sat Jun 15 07:30:17 MSK 2019  uwe@sampo:/home/uwe/work/netbsd/build8/obj/macppc/sys/arch/macppc/compile/GENERIC macppc
>Description:
devel/apr was updated to 1.7.0 in pkgsrc-2019Q2

Building www/apache24 (that depends on devel/apr) on NetBSD/macppc fails with:

/bin/sh /export/netbsd/cvs/pkgsrc-quarterly/www/apache24/work.powerpc/httpd-2.4.39/build/libtool --silent --mode=link gcc  -pthread  -pipe -O2 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include/apr-1 -I/usr/pkg/include -I/usr/include -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -o htpasswd  htpasswd.lo passwd_common.lo /usr/pkg/lib/libaprutil-1.la -lexpat /usr/pkg/lib/libapr-1.la -lrt -lcrypt -lpthread -lcrypt
/export/netbsd/cvs/pkgsrc-quarterly/www/apache24/work.powerpc/.buildlink/lib/libapr-1.so: undefined reference to `__sync_fetch_and_add_8'
/export/netbsd/cvs/pkgsrc-quarterly/www/apache24/work.powerpc/.buildlink/lib/libapr-1.so: undefined reference to `__sync_val_compare_and_swap_8'
/export/netbsd/cvs/pkgsrc-quarterly/www/apache24/work.powerpc/.buildlink/lib/libapr-1.so: undefined reference to `__sync_lock_test_and_set_8'
/export/netbsd/cvs/pkgsrc-quarterly/www/apache24/work.powerpc/.buildlink/lib/libapr-1.so: undefined reference to `__sync_fetch_and_sub_8'
/export/netbsd/cvs/pkgsrc-quarterly/www/apache24/work.powerpc/.buildlink/lib/libapr-1.so: undefined reference to `__sync_sub_and_fetch_8'
*** Error code 1

apr tries to detect if the compiler HAVE_ATOMIC_BUILTINS by doing a
configure test with an unsigned long test variable and it succeeds b/c
ppc has 4-byte atomics.  Then it uses that condition to cover all of
its atomic functions, including 8-byte, which are not implemented on
ppc.  So gcc emits calls to external functions for them and those are
unresolved.

Perhaps apr should do the configure test with a known 8 byte type
instead.

I'd expect this to be the case for many other 32-bit platforms.

Specifically for ppc I was able to work around this by building with
ap_cv_atomic_builtins=no in the environment to force its hand and with
an additional change to include/arch/unix/apr_arch_atomic.h.  That
header tests for ppc by checking __PPC__ and __ppc__ which are not
defined, but doesn't check __powerpc__ which is.

>How-To-Repeat:
Build www/apache24 on NetBSD/macppc
>Fix:
N/A



Home | Main Index | Thread Index | Old Index