You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spurious "error: could not find native static library objc, perhaps an -L flag is missing?" on macOS Big Sur #96943
$ [...] cargo build
Compiling libusb1-sys v0.6.2 (/Users/adaszko/repos/rusb/libusb1-sys)
Compiling rusb v0.9.1
error: could not find native static library `objc`, perhaps an -L flag is missing?
This issue is preventing me from building a statically linked libusb1-sys. Linking itself should still work, it's just that rustc's erroring out prevents the pipeline from getting to the linking step AFAICT.
EDIT: Sorry, I've removed a misleading points about dynamic linking stemming from my misunderstanding of the issue.
Activity
Fix issue rust-lang#96943
madsmtm commentedon Oct 10, 2024
I suspect this may have been caused by not properly passing the macOS SDK to the linker, which will be fixed by #131477.
In the meantime, could you try doing
xcrun cargo build, to ensure thatSDKROOTis set?adaszko commentedon Oct 10, 2024
Sorry, I'm no longer working on this (it's been a while) so won't be able to test it. Unless someone else is affected I think the issue can be closed.
Rollup merge of rust-lang#131477 - madsmtm:sdkroot-via-env-var, r=nne…
Rollup merge of rust-lang#131477 - madsmtm:sdkroot-via-env-var, r=nne…
Rollup merge of rust-lang#131477 - madsmtm:sdkroot-via-env-var, r=nne…
Rollup merge of rust-lang#131477 - madsmtm:sdkroot-via-env-var, r=nne…
Rollup merge of rust-lang#131477 - madsmtm:sdkroot-via-env-var, r=nne…
Rollup merge of rust-lang#131477 - madsmtm:sdkroot-via-env-var, r=nne…
Rollup merge of rust-lang#131477 - madsmtm:sdkroot-via-env-var, r=nne…
Unrolled build for #131477