Skip to content
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-12177] swift-corelibs-foundation doesn't run in Xcode using snapshot toolchains #3271

Open
spevans opened this issue Feb 11, 2020 · 3 comments

Comments

@spevans
Copy link
Collaborator

spevans commented Feb 11, 2020

Previous ID SR-12177
Radar rdar://problem/59496020
Original Reporter @spevans
Type Bug
Environment

macOS 10.15.3

Xcode 11.3.1, 11.4 (beta)

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: ec29f3810e07302629468489d098f6be

Issue Description:

Running TestFoundation in Xcode using a snapshot toolchain eg swift-swift-DEVELOPMENT-SNAPSHOT-2020-02-08-a-osx results in a runtime error although it compiles and builds successfully.

I believe this ultimately due to the version check performed in swift::_swift_stdlib_operatingSystemVersion which ends up calling directly into CoreFoundation without __CFInitialize() being called first. This is most likely due to how CoreFoundation is built as part of the swift-corelibs-foundation such that its constructor doesnt call this function.

Using the default Xcode toolchains works without issue.

@beccadax
Copy link
Contributor

@swift-ci create

@xwu
Copy link
Collaborator

xwu commented Aug 31, 2021

Dropping in here to note that this bug makes it no longer possible to work with the overlay and the open-source implementation simultaneously since the adoption of @_spi(Foundation) in the overlay, which deliberately requires the use of a snapshot toolchain to build. This is particularly unfortunate as (a) these two projects are part of the same repo yet ToT can't be built with a single toolchain; and (b) it's actively desirable to keep these two projects in sync but the use of @_spi in conjunction with this bug throws up a barrier to that.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@waterskier2007
Copy link

Using the default Xcode toolchains works without issue.

I am using Xcode 13.3.1 and encountering issues building the SwiftFoundation target from corelibs foundation, following the Getting Started guide. They are quite confusing as some steps mention using the latest snapshot, but then there are notes stating to use the current Xcode version.

What's the current guidance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants