Bug#918060: iwyu FTBFS on armel: undefined reference to symbol '__atomic_load_4@@LIBATOMIC_1.0'
Adrian Bunk
bunk at debian.org
Wed Jan 2 21:55:14 GMT 2019
Source: iwyu
Version: 7.0-1
Severity: serious
Tags: ftbfs patch
https://buildd.debian.org/status/fetch.php?pkg=iwyu&arch=armel&ver=7.0-2&stamp=1545913678&raw=0
...
/usr/bin/c++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -w -ffunction-sections -fdata-sections -Wl,-z,relro -Wl,-rpath-link, -Wl,-O3 -Wl,--gc-sections CMakeFiles/include-what-you-use.dir/iwyu.cc.o CMakeFiles/include-what-you-use.dir/iwyu_ast_util.cc.o CMakeFiles/include-what-you-use.dir/iwyu_cache.cc.o CMakeFiles/include-what-you-use.dir/iwyu_driver.cc.o CMakeFiles/include-what-you-use.dir/iwyu_getopt.cc.o CMakeFiles/include-what-you-use.dir/iwyu_globals.cc.o CMakeFiles/include-what-you-use.dir/iwyu_include_picker.cc.o CMakeFiles/include-what-you-use.dir/iwyu_lexer_utils.cc.o CMakeFiles/include-what-you-use.dir/iwyu_location_util.cc.o CMakeFiles/include-what-you-use.dir/iwyu_output.cc.o CMakeFiles/include-what-you-use.dir/iwyu_path_util.cc.o CMakeFiles/include-what-you-use.dir/iwyu_preprocessor.cc.o CMakeFiles/include-what-you-use.dir/iwyu_verrs.cc.o -o bin/include-what-you-use -Wl,-rpath,"\$ORIGIN/../lib:/usr/lib/llvm-7/lib" -lpthread /usr/lib/llvm-7/lib/libclangBasic.a /usr/lib/llvm-7/lib/libclangLex.a /usr/lib/llvm-7/lib/libclangAST.a /usr/lib/llvm-7/lib/libclangSema.a /usr/lib/llvm-7/lib/libclangFrontend.a /usr/lib/llvm-7/lib/libclangDriver.a /usr/lib/llvm-7/lib/libclangParse.a /usr/lib/llvm-7/lib/libclangSerialization.a /usr/lib/llvm-7/lib/libclangSema.a /usr/lib/llvm-7/lib/libclangAnalysis.a /usr/lib/llvm-7/lib/libclangEdit.a /usr/lib/llvm-7/lib/libclangAST.a /usr/lib/llvm-7/lib/libclangLex.a /usr/lib/llvm-7/lib/libclangBasic.a /usr/lib/llvm-7/lib/libLLVM-7.so.1
/usr/bin/ld: /usr/lib/llvm-7/lib/libclangFrontend.a(SerializedDiagnosticReader.cpp.o): undefined reference to symbol '__atomic_load_4@@LIBATOMIC_1.0'
/usr/bin/ld: //usr/lib/arm-linux-gnueabi/libatomic.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[4]: *** [CMakeFiles/include-what-you-use.dir/build.make:282: bin/include-what-you-use] Error 1
Fix:
--- debian/rules.old 2019-01-02 21:28:52.105189952 +0000
+++ debian/rules 2019-01-02 21:29:17.129189713 +0000
@@ -13,6 +13,10 @@
ADDITIONAL_CXX_FLAGS += -mxgot
endif
+ifneq (,$(filter $(DEB_HOST_ARCH), armel))
+ export DEB_LDFLAGS_MAINT_APPEND = -latomic
+endif
+
%:
dh $@ --buildsystem=cmake --builddirectory=$(TARGET_BUILD)
More information about the Pkg-llvm-team
mailing list