Bug#926772: underlinked clang libraries on armel cause build failures
Adrian Bunk
bunk at debian.org
Thu Apr 11 17:58:09 BST 2019
On Wed, Apr 10, 2019 at 11:12:17AM +0200, Matthias Klose wrote:
> On 10.04.19 10:29, Adrian Bunk wrote:
> > On Wed, Apr 10, 2019 at 10:11:29AM +0200, Matthias Klose wrote:
> >> Package: src:llvm-toolchain-7
> >> Version: 1:7.0.1-8
> >> Severity: serious
> >> Tags: sid buster
> >>
> >> underlinked clang libraries on armel cause build failures,
> >
> > Static libraries are not linked.
>
> ouch
>
> >> as seen at
> >> https://buildd.debian.org/status/package.php?p=creduce
> >>
> >> /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]: *** [Makefile:868: clang_delta] Error 1
> >> ...
> >
> > How does creduce get dependencies for these static libraries from LLVM?
>
> these are hard coded in clang_delta/Makefile.am. Is there a better way? Would
> llvm-config --system-libs be a better way to include -latomic on armel?
I don't know what the proper solution would be for this.
A workaround for creduce would be the below patch.
cu
Adrian
--- debian/rules.old 2019-04-11 08:58:31.003065232 +0000
+++ debian/rules 2019-04-11 08:59:22.919809159 +0000
@@ -6,6 +6,10 @@
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+ifneq (,$(filter $(DEB_HOST_ARCH), armel))
+export DEB_LDFLAGS_MAINT_APPEND = -latomic
+endif
+
CLANG_V = 7
CLANG = clang-$(CLANG_V)
GCC = gcc
More information about the Pkg-llvm-team
mailing list