You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
8. Upload resulting binary to Ubuntu, I prefer to use docker to test with the `ubuntu:16.04` image: `docker run -ti -v (pwd):/test ubuntu:16.04 /test/.build/linux-unknown-x86_64/debug/Test`
*Observed*: `/test/.build/linux-unknown-x86_64/debug/Test: error while loading shared libraries: libswiftCore.so: cannot open shared object file: No such file or directory`
*Expected*: Binary prints "Hello, World!"
Note: Running on docker image `swift:4.0.2` with LD_LIBRARY_PATH pointing to libswiftCore.so works as expected
Second broken case: partial workaround with -Xswiftc -static-stdlib
Environment
Running on OSX, compiling to Ubuntu 16.0.4
Additional Detail from JIRA
md5: 6006b8d3526015b6f7f6cf35e7379a7e
is duplicated by:
relates to:
Issue Description:
Prelude (on OSX)
*Note*: swift 4.0.2 is used as an example, the `build_ubuntu_cross_compilation_toolchain` script is from `e36eebf5` (mid-november 2017)
1. `curl -o swift-4.0.2-RELEASE-ubuntu16.04.tar.gz https://swift.org/builds/swift-4.0.2-release/ubuntu1604/swift-4.0.2-RELEASE/swift-4.0.2-RELEASE-ubuntu16.04.tar.gz`
2. `curl -o swift-4.0.2-RELEASE-osx.pkg https://swift.org/builds/swift-4.0.2-release/xcode/swift-4.0.2-RELEASE/swift-4.0.2-RELEASE-osx.pkg`
3. `<path_to_swiftpm>/Utilities/build_ubuntu_cross_compilation_toolchain /tmp/ swift-4.0.2-RELEASE-osx.pkg swift-4.0.2-RELEASE-ubuntu16.04.tar.gz`
4. `mkdir Test`
5. `cd Test`
6. `swift package init --type=executable`
First broken case: --static-swift-stdlib
7. `swift build --static-swift-stdlib --destination=/tmp/cross-toolchain/ubuntu-xenial-destination.json`
8. Upload resulting binary to Ubuntu, I prefer to use docker to test with the `ubuntu:16.04` image: `docker run -ti -v (pwd):/test ubuntu:16.04 /test/.build/linux-unknown-x86_64/debug/Test`
*Observed*: `/test/.build/linux-unknown-x86_64/debug/Test: error while loading shared libraries: libswiftCore.so: cannot open shared object file: No such file or directory`
*Expected*: Binary prints "Hello, World!"
Note: Running on docker image `swift:4.0.2` with LD_LIBRARY_PATH pointing to libswiftCore.so works as expected
Second broken case: partial workaround with -Xswiftc -static-stdlib
7. `swift build -Xswiftc -static-stdlib --destination=/Users/george/Developer/Apple/cross-toolchain/ubuntu-xenial-destination.json`
*Observed*: `
clang: error: no such file or directory: '/usr/lib/x86_64-linux-gnu/libicui18n.a'
clang: error: no such file or directory: '/usr/lib/x86_64-linux-gnu/libicuuc.a'
clang: error: no such file or directory: '/usr/lib/x86_64-linux-gnu/libicudata.a'
`
Note that clang is looking for the libraries in `/usr/lib`, but the files are located in `/tmp/cross-toolchain/ubuntu-xenial.sdk/usr/lib/`
*Expected*: The executable is compiled successfully
The text was updated successfully, but these errors were encountered: