Skip to content

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
@kkebo kkebo force-pushed the add-ld-library-path-to-debian-and-fedora branch from e82a2d1 to 66501d6 Compare April 24, 2025 11:06
@kkebo kkebo force-pushed the add-ld-library-path-to-debian-and-fedora branch from 66501d6 to 836e388 Compare July 9, 2025 15:29
kkebo added 2 commits August 14, 2025 23:09
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 c7619c5 to f4e3f9d Compare August 14, 2025 14:09
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