Bug#1057151: clang-17: ClangTargets.cmake cannot find libclang-17.so.1

Cordell Bloor cgmb at slerp.xyz
Thu Nov 30 19:13:21 GMT 2023


Package: clang-17
Version: 1:17.0.6-1
Severity: normal
X-Debbugs-Cc: cgmb at slerp.xyz, debian-ai at lists.debian.org

Dear Maintainer,

While attempting to update rocm-device-libs, I noticed that searching
for clang with find_package(Clang) will fail with an error. The
ClangTargets.cmake file expects libclang to be found at the path
"/usr/lib/llvm-17/lib/libclang-17.so.1", but the file is actually
installed to "/usr/lib/x86_64-linux-gnu/libclang-17.so.1".

The error encountred is:

```
CMake Error at /usr/lib/llvm-17/lib/cmake/clang/ClangTargets.cmake:833 (message):
  The imported target "libclang" references the file

     "/usr/lib/llvm-17/lib/libclang-17.so.1"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib/llvm-17/lib/cmake/clang/ClangTargets.cmake"

  but not all the files it references.
```

The error can be reproduced with this minimal CMakeLists.txt:

```
cmake_minimum_required(VERSION 3.22)
project(example)
find_package(Clang)
```

Regards,
Cordell Bloor

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.0-4-amd64 (SMP w/32 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages clang-17 depends on:
ii  binutils                2.41-7
ii  libc6                   2.37-12
ii  libc6-dev               2.37-12
ii  libclang-common-17-dev  1:17.0.6-1
ii  libclang-cpp17          1:17.0.6-1
ii  libclang1-17            1:17.0.6-1
ii  libgcc-13-dev           13.2.0-7
ii  libgcc-s1               13.2.0-7
ii  libllvm17               1:17.0.6-1
ii  libobjc-13-dev          13.2.0-7
ii  libstdc++-13-dev        13.2.0-7
ii  libstdc++6              13.2.0-7
ii  llvm-17-linker-tools    1:17.0.6-1

Versions of packages clang-17 recommends:
ii  llvm-17-dev  1:17.0.6-1
ii  python3      3.11.4-5+b1

Versions of packages clang-17 suggests:
pn  clang-17-doc  <none>
pn  wasi-libc     <none>

-- no debconf information



More information about the Pkg-llvm-team mailing list