release: ship the real libLLVM in the Linux tarball (currently a dangling symlink) - #32
Open
manar-c wants to merge 1 commit into
Open
release: ship the real libLLVM in the Linux tarball (currently a dangling symlink)#32manar-c wants to merge 1 commit into
manar-c wants to merge 1 commit into
Conversation
…links The Linux package step copies libLLVM*.so* from the apt.llvm.org libdir with `cp -a`, which preserves symlinks. On those packages libLLVM.so.MAJOR.MINOR is itself a symlink into the system multiarch dir (../../x86_64-linux-gnu/libLLVM.so.MAJOR.MINOR), so the tarball ends up containing only a dangling symlink where the library should be. The packaged openvaf-r then fails to start on any host without a system libLLVM of the same major version installed: error while loading shared libraries: libLLVM.so.21.1: cannot open shared object file: No such file or directory CI never catches this because the runner has the system library, so the loader falls back to it after the $ORIGIN/../lib RUNPATH misses. Fix: after copying, materialize any symlink whose target points outside the package lib dir with the real file (one copy of libLLVM; same-dir sibling links like libLLVM.so -> libLLVM.so.21.1 stay as symlinks and become valid), and fail the build if any broken symlink remains in the package. Verified against v24.0.1mob on Ubuntu 24.04 (no system LLVM 21): the shipped tarball fails as described; after replacing the dangling symlink with the real libLLVM.so.21.1 the binary runs and compiles the IHP SG13G2 PSP103 models correctly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
manar-c
force-pushed
the
fix/bundle-real-libllvm-linux
branch
from
August 25, 2026 01:49
b307d6a to
57b5260
Compare
Contributor
|
shouldnt you use your distro choice of llvm? |
Author
Part of the issue is the softlink to some other folder for that file. |
Contributor
|
I made it so it works with original llvm from ubuntu... check if it works again pls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Linux release tarball (
openvaf-r-v24.0.1mob-linux-x86_64.tar.gz) does not actually contain libLLVM — only a dangling symlink where it should be:So on any host without a system libLLVM of the same major version (e.g. stock Ubuntu 24.04, which packages LLVM 18–20), the binary fails despite the
$ORIGIN/../libRUNPATH:Cause
In the
Packagestep ofrelease.yml,cp -acopieslibLLVM*.so*fromllvm-config --libdirpreserving symlinks. On apt.llvm.org installs,libLLVM.so.21.1in that libdir is itself a symlink into the system multiarch directory (../../x86_64-linux-gnu/libLLVM.so.21.1), so the dangling link is copied into the package instead of the library. CI doesn't catch it because the runner does have the system library, so the dynamic loader falls back to it after the RUNPATH lookup misses.Fix
After the copy, materialize any symlink whose target points outside the package
lib/with the real file (one full copy of libLLVM; same-directory sibling links likelibLLVM.so -> libLLVM.so.21.1are kept as symlinks and become valid), then fail the build if any broken symlink remains in the package.Verification
libLLVM.so.21.1, the same binary runs and correctly compiles the IHP SG13G2 PDK models (psp103/psp103_nqs/r3_cmc/mosvar), verified through to an ngspice-47 simulation.lib/, sibling symlinks stay intact, and zero broken links remain.The macOS packaging already dereferences dependencies per-file and doesn't appear affected; the Windows step copies DLLs directly.