swiftlang / swiftlang/swift-corelibs-libdispatch

[SR-9347] XCTest and dispatch compiled with wrong linker settings [was: SwiftPM libBlocksRuntime.so.0 missing dependency]

Open
#630 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug libdispatch
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.