[Debian-on-mobile-maintainers] Bug#992576: mfgtools FTBFS on armel/mipsel/m68k/powerpc/sh4: must link with libatomic

Adrian Bunk bunk at debian.org
Fri Aug 20 13:04:09 BST 2021


Source: mfgtools
Version: 1.4.139-1
Severity: serious
Tags: ftbfs patch

https://buildd.debian.org/status/package.php?p=mfgtools&suite=sid

...
/usr/bin/c++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -O2 -Wl,-z,relro -Wl,-z,now CMakeFiles/uuu.dir/uuu.cpp.o CMakeFiles/uuu.dir/buildincmd.cpp.o CMakeFiles/uuu.dir/autocomplete.cpp.o -o uuu   -L/<<PKGBUILDDIR>>/uuu/libuuu  ../libuuu/libuuc_s.a /usr/lib/arm-linux-gnueabi/libssl.so /usr/lib/arm-linux-gnueabi/libcrypto.so -lusb-1.0 -lzip -lz -ldl -lbz2 
/usr/bin/ld: ../libuuu/libuuc_s.a(usbhotplug.cpp.o): in function `std::atomic<std::chrono::duration<long long, std::ratio<1ll, 1ll> > >::load(std::memory_order) const':
/usr/include/c++/10/atomic:258: undefined reference to `__atomic_load_8'
/usr/bin/ld: /usr/include/c++/10/atomic:258: undefined reference to `__atomic_load_8'
/usr/bin/ld: /usr/include/c++/10/atomic:258: undefined reference to `__atomic_load_8'
/usr/bin/ld: ../libuuu/libuuc_s.a(usbhotplug.cpp.o): in function `std::atomic<std::chrono::duration<long long, std::ratio<1ll, 1000ll> > >::load(std::memory_order) const':
/usr/include/c++/10/atomic:258: undefined reference to `__atomic_load_8'
/usr/bin/ld: /usr/include/c++/10/atomic:258: undefined reference to `__atomic_load_8'
/usr/bin/ld: ../libuuu/libuuc_s.a(usbhotplug.cpp.o): in function `std::atomic<std::chrono::duration<long long, std::ratio<1ll, 1ll> > >::store(std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::memory_order)':
/usr/include/c++/10/atomic:247: undefined reference to `__atomic_store_8'
/usr/bin/ld: ../libuuu/libuuc_s.a(usbhotplug.cpp.o): in function `std::atomic<std::chrono::duration<long long, std::ratio<1ll, 1000ll> > >::store(std::chrono::duration<long long, std::ratio<1ll, 1000ll> >, std::memory_order)':
/usr/include/c++/10/atomic:247: undefined reference to `__atomic_store_8'
/usr/bin/ld: ../libuuu/libuuc_s.a(usbhotplug.cpp.o): in function `std::atomic<std::chrono::duration<long long, std::ratio<1ll, 1ll> > >::store(std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::memory_order)':
/usr/include/c++/10/atomic:247: undefined reference to `__atomic_store_8'
collect2: error: ld returned 1 exit status
make[3]: *** [uuu/CMakeFiles/uuu.dir/build.make:184: uuu/uuu] Error 1


Fix/Workaround:

--- debian/rules.old	2021-08-20 12:01:24.425914897 +0000
+++ debian/rules	2021-08-20 12:01:59.806444576 +0000
@@ -3,6 +3,11 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=+fixfilepath,+fixdebugpath
 include /usr/share/dpkg/pkg-info.mk
 
+ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mipsel powerpc sh4))
+  export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
+endif
+
+
 %:
 	dh $@
 



More information about the Debian-on-mobile-maintainers mailing list