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

Add LD_LIBRARY_PATH to Dockerfiles for Debian 12 and Fedora 39 #454

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kkebo
Copy link

@kkebo kkebo commented Mar 30, 2025

This PR fixes the following issue that you can not run executables built outside the container.

$ cd
$ mkdir test
$ cd test
$ swift package init --type executable
...
$ swift build -c release
...
$ docker container run -it --rm -v $HOME/test:/test swiftlang/swift:nightly-main-debian12
...
build-user@087dcbadce38:~$ /test/.build/release/test
/test/.build/release/test: error while loading shared libraries: libswiftCore.so: cannot open shared object file: No such file or directory

The reason why LD_LIBRARY_PATH is needed is Dockerfiles for Debian 12 and Fedora39 install libraries under ${SWIFT_PREFIX}/usr/lib instead of /usr/lib.

This fixes the issue that you can not run executables built outside the container.
@kkebo kkebo requested a review from shahmishal as a code owner March 30, 2025 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant