Package: apt-cacher-ng Version: 1-1 Severity: serious Tags: sid, patch Justification: FTBFS User: debian-m...@lists.debian.org Usertags: mips-patch
Build for mips and mipsel fails during apt-cacher-ng linking with error: /usr/include/c++/6/bits/atomic_base.h:514: error: undefined reference to '__atomic_fetch_add_8' Full build log is available here: https://buildd.debian.org/status/fetch.php?pkg=apt-cacher-ng&arch=mipsel&ver=1-1&stamp=1476932907 libatomic1 provides 8-byte atomic operations for 32-bit MIPS, so linking apt-cacher-ng against latomic solves this issue. The patch that includes this fix is attached. Regards, Dejan
--- ./debian/rules.orig 2016-10-20 14:27:34.000000000 +0000 +++ ./debian/rules 2016-10-20 14:58:43.000000000 +0000 @@ -11,11 +11,18 @@ CFLAGS += $(CPPFLAGS) CXXFLAGS += $(CPPFLAGS) +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) + +# libatomic provides 8-bytes atomic operation for 32-bit MIPS +ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel)) + EXTRA_LIBS="-DEXTRA_LIBS_ACNG=-latomic" +endif + %: dh $@ --parallel --with systemd override_dh_auto_configure: - dh_auto_configure -- -DSDINSTALL=on + dh_auto_configure -- -DSDINSTALL=on $(EXTRA_LIBS) # needs extra build deps and internet -> ignore override_dh_auto_test: