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
[SR-4916] swift build not creating shared library on linux #5015
Comments
The expected behaviour is to not create `so` and `dylibs`. Are you sure you're seeing the dylib with Swift 4 toolchain and not the default toolchain? Please provide output of `swift build -v`. Thanks! |
Comment by Ted Goddard (JIRA) Thanks for your help. Yes, I see that this was not a clean build and does not complete on MacOS either (just the very tail): |
Comment by Ted Goddard (JIRA) Is it an incorrect package declaration that is causing ld: library not found for -lCHTTPParser for architecture x86_64 |
Comment by Ted Goddard (JIRA) Such as this link declaration in the modulemap is no longer needed? ./.build/checkouts/Perfect-HTTPServer.git--6671958091389663080/Sources/CHTTPParser/include/module.modulemap module CHTTPParser { |
Comment by Ted Goddard (JIRA) Yes, removing those link modulemap directives allows the project to compile. Is this the correct approach? |
Yep, that's right. SwiftPM automatically manages the link statement (from v3.1). |
Comment by Ted Goddard (JIRA) Thanks so much for your help. I will relay this to the library developer (PerfectlySoft). |
Attachment: Download
Environment
swift-4.0-DEVELOPMENT-SNAPSHOT-2017-05-15-a-ubuntu16.04
swift-4.0-DEVELOPMENT-SNAPSHOT-2017-05-15-a-osx
Additional Detail from JIRA
md5: 91c35ce2567dc0ed0a048bf9929a338f
Issue Description:
swift build is not creating the expected .so files on linux but does create .dylib files on MacOS.
Using https://swift.org/builds/swift-4.0-branch/ubuntu1604/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-05-15-a/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-05-15-a-ubuntu16.04.tar.gz
git clone https://github.com/PerfectExamples/Perfect-WebSocketsServer.git
cd Perfect-WebSocketsServer
swift build
Observe that no shared libraries are found in .build/debug on linux.
The text was updated successfully, but these errors were encountered: