Package: clang
Version: 1:21.1.6-71+b1
Severity: normal

Dear Maintainer,

I am trying to use sanitizers (undefined, address, leak) and none of them work 
with clang/clang++ (versions 21 and 19).

Example program hello.c:
```c
#include <stdio.h>
int main(){}
```

Compile:

$ clang -fsanitize=undefined hello.c
/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find 
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.ubsan_standalone.a:
 No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)

$ clang -fsanitize=address hello.c
/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find 
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.asan_static.a:
 No such file or directory
/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find 
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.asan.a: No 
such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)

$ clang -fsanitize=leak hello.c
/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find 
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.lsan.a: No 
such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Same with clang-19 (except that it is looking into /usr/lib/llvm-19 instead 
/usr/lib/llvm-21).
I could not find such files neither on my system nor in packages.debian.org.

I have libasan8=16-20260322-1 installed but it's probably not usable by 
clang-19 and clang-21.

I looked at clang-17 and it works.

Bug #819762 seems related, but it's from 2016 and for very old clang version.

Best regards,
Marius

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'stable'), (50, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.19.10+deb14-amd64 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages clang depends on:
ii  clang-21  1:21.1.8-3+b1

clang recommends no packages.

clang suggests no packages.

-- debconf-show failed

Reply via email to