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

[LLVM] [cmake] soname change in commit #91a3846 breaks building mesa trunk against llvm trunk #82647

Closed
LW-archlinux opened this issue Feb 22, 2024 · 0 comments · Fixed by #82660
Assignees
Labels
cmake Build system in general and CMake in particular

Comments

@LW-archlinux
Copy link

In commit 91a3846 libLLVM-19.so was renamed to libLLVM.so.19.0 .

A symlink from libLLVM-19.so to libLLVM.so was introduced for compatibility with old library name.

This breaks the build of mesa trunk against llvm trunk on archlinux with this error : /usr/bin/ld: /usr/lib/../lib/libLLVM.so.19.0: error adding symbols: DSO missing from command line

In https://gitlab.freedesktop.org/mesa/mesa/-/issues/10644 it was suggested a broken symlink could be the cause.

I checked and realised the breakl occurs because on archlinux libLLVM.so is only present in the official llvm-libs package from [extra] repo. Older llvm versions and AUR llvm builds use versioned symlinks / sonames (most common case) or conflict with repo llvm .

The llvm trunk pacakge I build mesa against does the former.

Manually changing the symlink to the new soname directly solves the build failure for mesa trunk.

While archlinux & related distros may be the only ones using that specific method to allow multiple llvm versions to coexist, symlinking indirectly through libLLVM.so seems an unnecessary step for linkers and prone to failure.

Please change the compatibility symlink to directly link to the new soname library.

Lone_Wolf

@EugeneZelenko EugeneZelenko added cmake Build system in general and CMake in particular and removed new issue labels Feb 22, 2024
@tstellar tstellar self-assigned this Feb 22, 2024
tstellar added a commit to tstellar/llvm-project that referenced this issue Feb 22, 2024
This symlink was added in 91a3846 to
maintain backwards compatibility, but it needs to point to
libLLVM.so.$MAJOR.$MINOR rather than libLLVM.so.  This works better for
distros that ship libLLVM.so and libLLVM.so.$MAJOR.$MINOR in separate
packages and also prevents mistakes like
libLLVM-19.so -> libLLVM.so -> libLLVM.so.18.1

Fixes llvm#82647
tstellar added a commit that referenced this issue Feb 23, 2024
#82660)

This symlink was added in 91a3846 to
maintain backwards compatibility, but it needs to point to
libLLVM.so.$MAJOR.$MINOR rather than libLLVM.so. This works better for
distros that ship libLLVM.so and libLLVM.so.$MAJOR.$MINOR in separate
packages and also prevents mistakes like
libLLVM-19.so -> libLLVM.so -> libLLVM.so.18.1

Fixes #82647
nikic pushed a commit to nikic/llvm-project that referenced this issue Feb 24, 2024
llvm#82660)

This symlink was added in 91a3846 to
maintain backwards compatibility, but it needs to point to
libLLVM.so.$MAJOR.$MINOR rather than libLLVM.so. This works better for
distros that ship libLLVM.so and libLLVM.so.$MAJOR.$MINOR in separate
packages and also prevents mistakes like
libLLVM-19.so -> libLLVM.so -> libLLVM.so.18.1

Fixes llvm#82647

(cherry picked from commit 10c48a7)
llvmbot pushed a commit to llvmbot/llvm-project that referenced this issue Feb 26, 2024
llvm#82660)

This symlink was added in 91a3846 to
maintain backwards compatibility, but it needs to point to
libLLVM.so.$MAJOR.$MINOR rather than libLLVM.so. This works better for
distros that ship libLLVM.so and libLLVM.so.$MAJOR.$MINOR in separate
packages and also prevents mistakes like
libLLVM-19.so -> libLLVM.so -> libLLVM.so.18.1

Fixes llvm#82647

(cherry picked from commit 10c48a7)
tstellar added a commit that referenced this issue Feb 27, 2024
#82660)

This symlink was added in 91a3846 to
maintain backwards compatibility, but it needs to point to
libLLVM.so.$MAJOR.$MINOR rather than libLLVM.so. This works better for
distros that ship libLLVM.so and libLLVM.so.$MAJOR.$MINOR in separate
packages and also prevents mistakes like
libLLVM-19.so -> libLLVM.so -> libLLVM.so.18.1

Fixes #82647

(cherry picked from commit 10c48a7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants