Bug#872549: clasp FTBFS on armel: undefined reference to `__atomic_load_8'

Adrian Bunk bunk at debian.org
Fri Aug 18 12:29:19 UTC 2017


Source: clasp
Version: 3.3.2-1
Severity: serious
Tags: patch

https://buildd.debian.org/status/fetch.php?pkg=clasp&arch=armel&ver=3.3.2-1&stamp=1503036865&raw=0

...
/usr/bin/c++  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2  -Wl,-z,relro -Wl,-z,now -rdynamic CMakeFiles/test_clasp.dir/clause_creator_test.cpp.o CMakeFiles/test_clasp.dir/clause_test.cpp.o CMakeFiles/test_clasp.dir/cli_test.cpp.o CMakeFiles/test_clasp.dir/decision_heuristic_test.cpp.o CMakeFiles/test_clasp.dir/dependency_graph_test.cpp.o CMakeFiles/test_clasp.dir/dlp_builder_test.cpp.o CMakeFiles/test_clasp.dir/enumerator_test.cpp.o CMakeFiles/test_clasp.dir/facade_test.cpp.o CMakeFiles/test_clasp.dir/literal_test.cpp.o CMakeFiles/test_clasp.dir/minimize_test.cpp.o CMakeFiles/test_clasp.dir/parser_test.cpp.o CMakeFiles/test_clasp.dir/program_builder_test.cpp.o CMakeFiles/test_clasp.dir/rule_test.cpp.o CMakeFiles/test_clasp.dir/satelite_test.cpp.o CMakeFiles/test_clasp.dir/solver_test.cpp.o CMakeFiles/test_clasp.dir/test_main.cpp.o CMakeFiles/test_cla
 sp.dir/unfounded_check_test.cpp.o CMakeFiles/test_clasp.dir/weight_constraint_test.cpp.o  -o ../bin/test_clasp ../lib/libclasp.a -lpthread ../lib/libpotassco.a 
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::load(std::memory_order) const':
/usr/include/c++/7/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::store(long long, std::memory_order)':
/usr/include/c++/7/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::compare_exchange_strong(long long&, long long, std::memory_order, std::memory_order)':
/usr/include/c++/7/bits/atomic_base.h:477: undefined reference to `__atomic_compare_exchange_8'
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::load(std::memory_order) const':
/usr/include/c++/7/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/include/c++/7/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/include/c++/7/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/include/c++/7/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::store(long long, std::memory_order)':
/usr/include/c++/7/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::operator+=(long long)':
/usr/include/c++/7/bits/atomic_base.h:312: undefined reference to `__atomic_fetch_add_8'
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::load(std::memory_order) const':
/usr/include/c++/7/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::compare_exchange_strong(long long&, long long, std::memory_order, std::memory_order)':
/usr/include/c++/7/bits/atomic_base.h:477: undefined reference to `__atomic_compare_exchange_8'
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::load(std::memory_order) const':
/usr/include/c++/7/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::compare_exchange_strong(long long&, long long, std::memory_order, std::memory_order)':
/usr/include/c++/7/bits/atomic_base.h:477: undefined reference to `__atomic_compare_exchange_8'
../lib/libclasp.a(minimize_constraint.cpp.o): In function `std::__atomic_base<long long>::load(std::memory_order) const':
/usr/include/c++/7/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
../lib/libclasp.a(parallel_solve.cpp.o): In function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)':
/usr/include/c++/7/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
../lib/libclasp.a(parallel_solve.cpp.o): In function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
/usr/include/c++/7/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
../lib/libclasp.a(parallel_solve.cpp.o): In function `std::__atomic_base<unsigned long long>::fetch_or(unsigned long long, std::memory_order)':
/usr/include/c++/7/bits/atomic_base.h:544: undefined reference to `__atomic_fetch_or_8'
../lib/libclasp.a(parallel_solve.cpp.o): In function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
/usr/include/c++/7/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
../lib/libclasp.a(parallel_solve.cpp.o): In function `std::__atomic_base<unsigned long long>::exchange(unsigned long long, std::memory_order)':
/usr/include/c++/7/bits/atomic_base.h:413: undefined reference to `__atomic_exchange_8'
../lib/libclasp.a(parallel_solve.cpp.o): In function `std::__atomic_base<unsigned long long>::operator-=(unsigned long long)':
/usr/include/c++/7/bits/atomic_base.h:320: undefined reference to `__atomic_fetch_sub_8'
../lib/libclasp.a(parallel_solve.cpp.o): In function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)':
/usr/include/c++/7/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/include/c++/7/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/include/c++/7/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/include/c++/7/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
collect2: error: ld returned 1 exit status
tests/CMakeFiles/test_clasp.dir/build.make:541: recipe for target 'bin/test_clasp' failed
make[4]: *** [bin/test_clasp] Error 1


Fix:

--- debian/rules.old	2017-08-18 08:34:24.271417259 +0000
+++ debian/rules	2017-08-18 08:35:26.070722768 +0000
@@ -5,11 +5,11 @@
 #export DH_VERBOSE=1
 
 # clasp requires c++11 threads with 64bit __atomic_exchange, we need to
-# link with libatomic on powerpc, powerpcspe, m68k, mips, mipsel, and
+# link with libatomic on armel, powerpc, powerpcspe, m68k, mips, mipsel, and
 # sh4, see also
 # https://gcc.gnu.org/wiki/Atomic
 # https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary
-arch = $(shell dpkg-architecture -qDEB_BUILD_ARCH | egrep -x "(powerpc|powerpcspe|m68k|mips|mipsel|sh4)")
+arch = $(shell dpkg-architecture -qDEB_BUILD_ARCH | egrep -x "(armel|powerpc|powerpcspe|m68k|mips|mipsel|sh4)")
 
 # use custom hardening config flags for compiling clasp
 CONFIG=hardening



(The mips64el FTBFS is unrelated, might be caused by #871538.)



More information about the debian-science-maintainers mailing list