Skip to content

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

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

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.

@kkebo kkebo requested a review from shahmishal as a code owner March 30, 2025 06:40
@kkebo kkebo force-pushed the add-ld-library-path-to-debian-and-fedora branch from d4d1492 to e82a2d1 Compare April 7, 2025 15:54
This fixes the issue that you can not run executables built outside the container.
@kkebo kkebo force-pushed the add-ld-library-path-to-debian-and-fedora branch from e82a2d1 to 66501d6 Compare April 24, 2025 11:06
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