swiftlang / swiftlang/swift-corelibs-libdispatch

[SR-9384] Figure out why Foundation integration test for compiling on Linux with -static-stdlib fails

Open
#628 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Foundation libdispatch Task
Dominant language
C
Stars
2.6k
Forks
496
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Previous ID SR-9384
Radar None
Original Reporter @gottesmm
Type Task
Additional Detail from JIRA
Votes 0
Component/s Foundation, libdispatch
Labels Task
Assignee None
Priority Medium

md5: a5cc649f55665ecc6571bab8d1d28caa

relates to:

Issue Description:

I committed this test thinking that this was working. I am going to disable this and send it over to compnerd/spevans who were the ones messing with this I believe.

From the bot:

"/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/none-swift_package_sandbox_linux-x86_64/usr/bin/swiftc" "-static-stdlib" "/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift-integration-tests/test-static-stdlib/main.swift" "-o" "/home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/none-swift_package_sandbox_linux-x86_64/tests/test-static-stdlib/Output/test-static-stdlib.test.tmp/main"

And a selection of errors:

/usr/bin/ld.gold: error: /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/none-swift_package_sandbox_linux-x86_64/usr/lib/swift_static/linux/libdispatch.a(apply.c.o): requires unsupported dynamic reloc 11; recompile with -fPIC

*01:36:40* /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/buildbot_linux/none-swift_package_sandbox_linux-x86_64/usr/lib/swift_static/linux/libFoundation.a(Bundle.swift.o):Bundle.swift.o:function $s10Foundation6BundleC16bundleIdentifierSSSgvg: error: undefined reference to 'CFBundleGetIdentifier'

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

The failing entry point is swift-integration-tests/test-static-stdlib/main.swift; start by reproducing the shown swiftc -static-stdlib command on Linux. Inspect the linker diagnostics involving libdispatch.a and Foundation.a. Done means documenting the cause and either making the integration test pass or recording why it must remain disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, swift
Domain
build-system, operating-systems, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.