Repository navigation
fix static Apple builds failing to link and registering no backends - #4
Closed
cartertemm wants to merge 1 commit into
Closed
cartertemm wants to merge 1 commit into
cartertemm wants to merge 1 commit into
Conversation
Contributor
Author
|
Just noticed #3, which handles the linux case as well. I think this PR can be closed accordingly, however, the note in the readme should be added there too. |
Member
|
Thanks for this, and for testing it on macOS and the iOS simulator! Main already covers the same ground: 3ff0dbe links the Apple frameworks for static builds (on tvOS, visionOS and watchOS too, plus libobjc), and the prism submodule on main is past ethindp/prism#135, so backends register. Your README note about Xcode projects linking a Rust |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Static builds on macOS and iOS fail to link, and when I hacked them into working, no backends are registered. This change fixes both problems.
build.rsonly linksc++for static Apple builds. prism also needs system frameworks, so a minimal macOS binary fails with undefined IOKit and CoreFoundation symbols from the power notifier.backend_count()returns 0 andcreate_best()fails. Looks like you fixed this upstream.I bumped the prism submodule to
6d87910, which includes the upstream fixfor static backend registration (ethindp/prism#135). I also link the frameworks prism uses, based on
PrismPlatformApple.cmake:This also necessitated a README note for Xcode projects that link a Rust
staticlib. Cargo doesn't do the final link in that case, so those projects must add theframeworks themselves.
Testing
I built a binary with
prismer = { default-features = false, features = ["static"] }and no extra link flags.speakexample still works.staticbuilds.Not covered
build.rsdoesn't link thepkg-config libraries for Orca, speech-dispatcher, and power management. If you like, I can open a separate PR for that.