swiftlang / swiftlang/swift-corelibs-libdispatch
[SR-9347] XCTest and dispatch compiled with wrong linker settings [was: SwiftPM libBlocksRuntime.so.0 missing dependency]
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.6k
- Forks
- 496
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
| Previous ID | SR-9347 |
| Radar | rdar://problem/52194061 |
| Original Reporter | djones6 (JIRA User) |
| Type | Bug |
Environment
Ubuntu 16.04 (docker: ubuntu:16.04)
Additional Detail from JIRA
| Votes | 1 |
| Component/s | libdispatch |
| Labels | Bug |
| Assignee | None |
| Priority | Medium |
md5: c366bc20e06db396929e3f33a653ef84
Issue Description:
SwiftPM in swift development snapshots of 2018-07-21-a and later fails on a clean Ubuntu installation with:
/swift-DEVELOPMENT-SNAPSHOT-2018-07-21-a-ubuntu16.04/usr/bin/swift-package: error while loading shared libraries: libBlocksRuntime.so.0: cannot open shared object file: No such file or directory
It seems that installing libblocksruntime-dev resolves this, but this is not a dependency that was required for any previous versions of Swift.
It looks like this additional dependency was introduced in this PR: https://github.com/apple/swift-package-manager/pull/1631
Snapshots around 2018-10-19-a and later do seem to include /usr/lib/swift/linux/libBlocksRuntime.so - possibly as a result of https://github.com/apple/swift-corelibs-libdispatch/pull/362 - but there is no libBlocksRuntime.so.0 symlink to this. Creating a symlink from libBlocksRuntime.so -> libBlocksRuntime.so.0 seems to make things work, but I'll freely admit that I don't really know what I'm doing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the missing libBlocksRuntime.so.0 error on a clean Ubuntu 16.04 installation with the affected Swift development snapshot. Compare the bundled libBlocksRuntime.so and linker settings, then verify that SwiftPM, XCTest, and dispatch load successfully without a manually created symlink.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, swift, ubuntu
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100