Bug#942526: clang-10: relocation error when executing clang-10
Witold Baryluk
witold.baryluk at gmail.com
Thu Oct 17 17:25:16 BST 2019
Package: clang-10
Version: 1:10~svn374655-1~exp1
Severity: normal
Dear Maintainer,
I think clang-10 package does misses correct dependency information.
user at debian:/tmp$ cat hello.c
#include <stdio.h>
int main() {
return printf("Hello!\n");
}
user at debian:/tmp$ clang-10 hello.c
/usr/lib/llvm-10/bin/clang: relocation error: /lib/x86_64-linux-gnu/libclang-cpp.so.10: symbol _ZN4llvm10AllocaInst12setAlignmentEj version LLVM_10 not defined in file libLLVM-10.so.1 with link time reference
clang: error: unable to execute command: No such file or directory
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 10.0.0-svn372920-1~exp1 (trunk)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/hello-74e4fd.c
clang: note: diagnostic msg: /tmp/hello-74e4fd.sh
clang: note: diagnostic msg:
********************
user at debian:/tmp$
user at debian:/tmp$ dpkg -l | egrep 'clang|llvm'
ii clang-10 1:10~svn374655-1~exp1 amd64 C, C++ and Objective-C compiler
ii libclang-10-dev 1:10~svn374655-1~exp1 amd64 Clang library - Development package
ii libclang-common-10-dev 1:10~svn374655-1~exp1 amd64 Clang library - Common development package
ii libclang-cpp10 1:10~svn372920-1~exp1 amd64 C++ interface to the Clang library
ii libclang1-10 1:10~svn374655-1~exp1 amd64 C interface to the Clang library
ii libllvm10:amd64 1:10~svn374655-1~exp1 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm10:i386 1:10~svn374655-1~exp1 i386 Modular compiler and toolchain technologies, runtime library
ii libllvm8:amd64 1:8.0.1-3+b1 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm8:i386 1:8.0.1-3+b1 i386 Modular compiler and toolchain technologies, runtime library
ii libllvm9:amd64 1:9-2 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm9:i386 1:9-2 i386 Modular compiler and toolchain technologies, runtime library
ii libllvmspirvlib8 8.0.1-1+b1 amd64 bi-directional translator for LLVM/SPIRV -- shared library
ii llvm-10 1:10~svn374655-1~exp1 amd64 Modular compiler and toolchain technologies
ii llvm-10-dev 1:10~svn374655-1~exp1 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-10-runtime 1:10~svn374655-1~exp1 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-10-tools 1:10~svn374655-1~exp1 amd64 Modular compiler and toolchain technologies, tools
ii llvm-8 1:8.0.1-3+b1 amd64 Modular compiler and toolchain technologies
ii llvm-8-dev 1:8.0.1-3+b1 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-8-runtime 1:8.0.1-3+b1 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-spirv 8.0.1-1+b1 amd64 bi-directional translator for LLVM/SPIRV
user at debian:/tmp$
My guess is it doesn't work becasue of libclang-cpp10 and clang-10 versions not
matching, and ABI not beying stable (which is not a problem).
Maybe there should be more tight version dependency from clang-10 to libclang-cpp10 ?
At the moment clang-10 dependencies looks like this:
Package: clang-10
Version: 1:10~svn374655-1~exp1
Depends: libc6 (>= 2.14), libclang-cpp10, libgcc1 (>= 1:3.0), libllvm10 (>= 1:9~svn298832-1~),
libstdc++6 (>= 9), libstdc++-8-dev, libgcc-8-dev, libobjc-8-dev,
libclang-common-10-dev (= 1:10~svn374655-1~exp1),
libclang1-10 (= 1:10~svn374655-1~exp1), libc6-dev, binutils
Notice however that there is no versioning of libclang-cpp10. Only libclang1-10
Manually updating libclang-cpp10 using apt install -t experimental
libclang-cpp10, does resolve the problem.
This bug also affects clang-9 (depends on unversioned libclang-cpp9), but
not clang-8 (doesn't use libclang-cpp, only on versioned libclang1-18)
Best regards,
Witold
-- System Information:
Debian Release: bullseye/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.2.0-3-amd64 (SMP w/32 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages clang-10 depends on:
ii binutils 2.33.1-1
ii libc6 2.29-2
ii libc6-dev 2.29-2
ii libclang-common-10-dev 1:10~svn374655-1~exp1
ii libclang-cpp10 1:10~svn372920-1~exp1
ii libclang1-10 1:10~svn374655-1~exp1
ii libgcc-8-dev 8.3.0-23
ii libgcc1 1:9.2.1-9
ii libllvm10 1:10~svn374655-1~exp1
ii libobjc-8-dev 8.3.0-23
ii libstdc++-8-dev 8.3.0-23
ii libstdc++6 9.2.1-9
Versions of packages clang-10 recommends:
ii libomp-10-dev 1:10~svn374655-1~exp1
ii llvm-10-dev 1:10~svn374655-1~exp1
ii python3 3.7.5-1
Versions of packages clang-10 suggests:
pn clang-10-doc <none>
-- no debconf information
More information about the Pkg-llvm-team
mailing list