Skip to content

Conversation

@etcwilde
Copy link
Member

This nudges the Glibc modulemap just enough to get SwiftPM and later targets building. Without it, Swift tries to import the signal hander APIs through CDispatch instead of Glibc. CDispatch shouldn't be directly imported, so recommending that is nonsensical.

This is not a full solution for all headers, but meant to perturb the module machinery sufficiently that it pulls signal.h into glibc correctly.

Works around:

Swift-Project/swiftpm/Sources/Basics/Cancellator.swift:79:24:
error: property '__sigaction_u' is not available due to missing import of defining module 'CDispatch' [#MemberImportVisibility]

This nudges the Glibc modulemap just enough to get SwiftPM and later
targets building. Without it, Swift tries to import the signal hander
APIs through CDispatch instead of Glibc. CDispatch shouldn't be directly
imported, so recommending that is nonsensical.

This is not a full solution for all headers, but meant to perturb the
module machinery sufficiently that it pulls signal.h into glibc
correctly.

Works around:
```
Swift-Project/swiftpm/Sources/Basics/Cancellator.swift:79:24:
error: property '__sigaction_u' is not available due to missing import of defining module 'CDispatch' [#MemberImportVisibility]
```
@etcwilde etcwilde requested a review from a team as a code owner October 30, 2025 23:43
@etcwilde etcwilde added the FreeBSD Platform: FreeBSD label Oct 30, 2025
@etcwilde
Copy link
Member Author

@swift-ci please smoke test

@etcwilde
Copy link
Member Author

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine, but I wonder if we should be looking at removing FreeBSD from Glibc as it uses its own libc library.

@etcwilde
Copy link
Member Author

etcwilde commented Nov 3, 2025

This seems fine, but I wonder if we should be looking at removing FreeBSD from Glibc as it uses its own libc library.

Yes eventually, but I was trying to avoid having to update the entire ecosystem to import the new libc while bringing things up.

@etcwilde etcwilde merged commit 9d3a975 into swiftlang:main Nov 3, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from Merge to Done in Swift on FreeBSD Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FreeBSD Platform: FreeBSD

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants