Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libLLVM-19.so is a broken symbolic link #105987

Open
aykevl opened this issue Aug 25, 2024 · 6 comments
Open

libLLVM-19.so is a broken symbolic link #105987

aykevl opened this issue Aug 25, 2024 · 6 comments

Comments

@aykevl
Copy link
Contributor

aykevl commented Aug 25, 2024

After installing the LLVM 19 packages on Debian 12 (inside a distrobox), I got some broken symlinks:

$ file /usr/lib/llvm-19/lib/libLLVM-19*
/usr/lib/llvm-19/lib/libLLVM-19.1.0.so:   broken symbolic link to ../../aarch64-linux-gnu/libLLVM-19.so.1
/usr/lib/llvm-19/lib/libLLVM-19.1.0.so.1: broken symbolic link to ../../aarch64-linux-gnu/libLLVM-19.so.1
/usr/lib/llvm-19/lib/libLLVM-19.so:       broken symbolic link to ../../aarch64-linux-gnu/libLLVM-19.so.1
/usr/lib/llvm-19/lib/libLLVM-19.so.1:     broken symbolic link to ../../aarch64-linux-gnu/libLLVM-19.so.1

I think this is related to #82779 but reporting separately as it broke a single-arch installation for me (when linking to /usr/lib/llvm-19/lib/libLLVM-19.so).

I worked around this issue by linking to /usr/lib/llvm-19/lib/libLLVM.so instead:

$ file /usr/lib/llvm-19/lib/libLLVM.*
/usr/lib/llvm-19/lib/libLLVM.so:      symbolic link to libLLVM.so.19.1
/usr/lib/llvm-19/lib/libLLVM.so.1:    ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=708aedecf08f3891e0370be3cbbfd2183c7e950f, stripped
/usr/lib/llvm-19/lib/libLLVM.so.19.1: symbolic link to libLLVM.so.1
@aykevl
Copy link
Contributor Author

aykevl commented Aug 25, 2024

Actually it's even worse. Because the library isn't stored anymore in /usr/lib/aarch64-linux-gnu (or whatever the architecture directory is, I'm using an aarch64 system), I get error while loading shared libraries: libLLVM.so.19.1: cannot open shared object file: No such file or directory. So even though the program can link, it cannot run without manually setting LD_LIBRARY_PATH=/usr/lib/llvm-19/lib.

@thoughtafter
Copy link

I'm seeing this in ubuntu-22.04 and ubuntu-24.04 running

          wget https://apt.llvm.org/llvm.sh
          chmod +x llvm.sh
          sudo ./llvm.sh 19

I'm currently correcting it with:

sudo ln -s /usr/lib/llvm-19/lib/libLLVM.so.1 /usr/lib/x86_64-linux-gnu/libLLVM-19.so.1

@a1batross
Copy link

a1batross commented Sep 3, 2024

I'm having the same problem with libc++abi-18-dev-wasm32 and libc++-18-dev-wasm32.

The libraries according to symblink are expected to be in /usr/lib/llvm-18/wasm32-wasi/libc++.a but it's completely missing from the package.

The version is 1:18.1.8~++20240731024944+3b5b5c1ec4a3-1~exp1~20240731145000.144

@theoparis
Copy link

theoparis commented Sep 13, 2024

I'm having the same problem with libclang-cpp.so for LLVM 20 on Debian with the apt.llvm.org repositories.
/usr/lib/llvm-20/lib/libclang-cpp.so.20.1: broken symbolic link to ../../x86_64-linux-gnu/libclang-cpp.so.20.1

@Zingam
Copy link
Contributor

Zingam commented Sep 15, 2024

Is this related: #107116

@vient
Copy link
Member

vient commented Sep 16, 2024

Same on x86_64 Ubuntu 20.04

$ find /usr | grep libLLVM-19 | xargs file 
/usr/lib/llvm-19/lib/libLLVM-19.1.0.so:   broken symbolic link to ../../x86_64-linux-gnu/libLLVM-19.so.1
/usr/lib/llvm-19/lib/libLLVM-19.so.1:     broken symbolic link to ../../x86_64-linux-gnu/libLLVM-19.so.1
/usr/lib/llvm-19/lib/libLLVM-19.1.0.so.1: broken symbolic link to ../../x86_64-linux-gnu/libLLVM-19.so.1
/usr/lib/llvm-19/lib/libLLVM-19.so:       broken symbolic link to ../../x86_64-linux-gnu/libLLVM-19.so.1
/usr/lib/x86_64-linux-gnu/libLLVM-19.so:  broken symbolic link to libLLVM-19.so.1

$ dpkg -l | grep libllvm19
ii  libllvm19:amd64                               1:19.1.0~++20240826073121+5f744ee5c770-1~exp1~20240826073220.27  amd64        Modular compiler and toolchain technologies, runtime library

@sylvestre fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants