fix(cmake): add IOKit framework to APPLE link line#43
Merged
Conversation
`sysinfo` (pulled in transitively via the lance crates) calls IOKit on macOS for disk enumeration, CPU frequency, and thermal sensors; `objc2_io_kit` declares the framework binding. Cargo's `rustc-link-lib=framework=IOKit` is honored when this repo builds, but consumers linking against the installed `liblance_c.a` via `find_package(LanceC)` (or pkg-config) only see the frameworks we declare in our config files — and IOKit was missing. Add `-framework IOKit` next to the existing `CoreFoundation` / `Security` / `SystemConfiguration` entries in all three places: build-tree `LanceC_platform_deps`, installed `LanceCConfig.cmake.in`, and the pkg-config `Libs.private`.
Contributor
Author
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.
Summary
The macOS arm64 consumer-smoke-test job has been failing on
mainsince #24 with a long list of unresolved_IO*symbols (_IOObjectRelease,_IOServiceMatching,_IOHIDEventSystemClientCreate,_IORegistryEntryCreateCFProperty, …) — sample run: https://github.com/lance-format/lance-c/actions/runs/26272649710.Root cause is plumbing, not the consumer example:
sysinfo(pulled in transitively via the lance crates) calls IOKit on macOS for disk enumeration, CPU frequency, and thermal sensors, andobjc2_io_kitdeclares the binding. Cargo'srustc-link-lib=framework=IOKitis honored when this repo builds, but a downstream consumer linking against the installedliblance_c.aviafind_package(LanceC)(or pkg-config) only sees the frameworks we declare in our config files — and IOKit was missing.Add
-framework IOKitnext to the existingCoreFoundation/Security/SystemConfigurationentries in all three mirroring places:CMakeLists.txt— build-treeLanceC_platform_depsinterface librarycmake/LanceCConfig.cmake.in— installedfind_package(LanceC)consumersCMakeLists.txt— pkg-configLibs.privateVerification
Same
cmake --install→examples/cmake-consumerbuild path the CI runs, on arm64 macOS (15.0 SDK, AppleClang 17):Before the patch the same sequence dies at link with
Undefined symbols for architecture arm64. After it, the link succeeds and the binary exits 2 (usage error) as the CI step expects.After this lands
Unblocks the consumer-smoke macOS leg for every open PR — #42 (schema-evolution drop_columns) hits this exact failure on its CI run.