Source: openmw
Version: 0.46.0-1
Severity: important
Tags: ftbfs patch

https://buildd.debian.org/status/fetch.php?pkg=openmw&arch=mipsel&ver=0.46.0-1&stamp=1591883193&raw=0

...
/usr/bin/ld: ../../components/libcomponents.a(navmeshtilescache.cpp.o): in 
function `std::__atomic_base<long long>::operator++()':
/usr/include/c++/9/bits/atomic_base.h:319: undefined reference to 
`__atomic_fetch_add_8'
/usr/bin/ld: /usr/include/c++/9/bits/atomic_base.h:319: undefined reference to 
`__atomic_fetch_add_8'
/usr/bin/ld: ../../components/libcomponents.a(navmeshtilescache.cpp.o): in 
function `std::__atomic_base<long long>::operator--()':
/usr/include/c++/9/bits/atomic_base.h:327: undefined reference to 
`__atomic_fetch_sub_8'
/usr/bin/ld: /usr/include/c++/9/bits/atomic_base.h:327: undefined reference to 
`__atomic_fetch_sub_8'
collect2: error: ld returned 1 exit status
make[3]: *** [apps/openmw/CMakeFiles/openmw.dir/build.make:4068: openmw] Error 1


The same would happen on armel, but the package is not currently
built there for unrelated reasons.

Fix/workaround:

--- debian/rules.old    2020-06-13 14:13:59.344764465 +0000
+++ debian/rules        2020-06-13 14:15:54.546736499 +0000
@@ -16,6 +16,10 @@
 # Uncomment to view all compilation commands and fix W-compiler-flags-hidden
 export VERBOSE=1
 
+ifneq (,$(filter $(DEB_HOST_ARCH), armel mipsel))
+  export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic 
-Wl,--as-needed
+endif
+
 #CMake silently ignores CPPFLAGS. Below will properly set CFLAGS/CXXFLAGS
 #https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake
 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)

Reply via email to