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-3877] Compile LinuxMain.swift as a swift target #5114
Comments
What snapshot is this? Could be this a dupe of https://bugs.swift.org/browse/SR-3816 ? PS: top level modulemap in https://github.com/amraboelela/CLevelDB makes it a system package |
Comment by Amr Aboelela (JIRA) I don't use a snapshot, I make a daily build from source using "./swift/utils/build-toolchain local.swift" script, it takes 13 hours 😃 Is it wrong that it is a system package? I didn't understand the relation with SR-3816 ? am I missing something in the modulemap ? |
can you tell me the revision of swiftpm that you built? |
Comment by Amr Aboelela (JIRA) It is already built and installed: /usr/lib$ ls -l Also I am using a toolchain which is build just yesterday, which means it should include this PR #927 already, but I am still getting the same error. |
Comment by Amr Aboelela (JIRA) This is the swiftpm I have: swiftpm$ git log [PackageModel] Minor cleanup in Product commit a0e044a Merge pull request #924 from Steveybrown/process-thread-safe commit cb70454 [Utility] Added thread safety to Process. |
Comment by Amr Aboelela (JIRA) Oh, so it was you who made the last commit 😉 |
I can't reproduce this on current master but I can investigate this if you provide revision of swiftpm that you built. Otherwise, can you try using a trunk or swift-3.1 toolchain from swift.org and see if it still reproduces for you? |
Thanks, I'll check. was this on macOS or linux? |
Comment by Amr Aboelela (JIRA) I am already using the latest thing from master. It is in Linux Ubuntu 16.04 |
ah right |
ok I see, this works fine on macOS (on which I initially tested) but not on linux because we're passing LinuxMain.swift in link line which makes it want to see all modules again. |
This should fix it: #936 Thanks for reporting! |
Comment by Amr Aboelela (JIRA) Ok thanks. But why was it working fine till Dec 2016 ? |
The Build module was rewritten to be more testable and maintainable, this is a usecase we don't have any test for but now I'll add one so it doesn't regress 🙂 |
Comment by Amr Aboelela (JIRA) I am finally able to verify the fix, thank you. |
Additional Detail from JIRA
md5: a8410044f75f6c6ff25b74a269d9e8f9
Issue Description:
This was working fine on December 2016, now in my swift module https://github/com/amraboelela/SwiftLevelDB which import C module: https://github/com/amraboelela/CLevelDB
When I do "swift test" in SwiftLevelDB I get error:
Fetching https://github.com/amraboelela/CLevelDB
Cloning https://github.com/amraboelela/CLevelDB
Resolving https://github.com/amraboelela/CLevelDB at 1.0.0
Compile Swift Module 'SwiftLevelDB' (4 sources)
Compile Swift Module 'SwiftLevelDBTests' (2 sources)
Linking ./.build/debug/SwiftLevelDBPackageTests.xctest
<unknown>:0: error: missing required module 'CLevelDB'
<unknown>:0: error: build had 1 command failures
error: exit(1): /home/amr/swift/toolchains/swift-toolchain/usr/bin/swift-build-tool -f /home/amr/rengo/SwiftLevelDB/.build/debug.yaml test
The text was updated successfully, but these errors were encountered: