rust-lang / docs.rs

crates.io documentation generator
https://docs.rs
MIT License
956 stars 193 forks source link

Compile error occurs when the build target is x86_64-apple-darwin and using cross-compile dependency #2475

Closed libark closed 2 months ago

libark commented 3 months ago

Crate name

core-media

Build failure link

https://docs.rs/crate/core-media/0.1.6/builds/1174883

Additional details


warning: objc_exception@0.1.2: cc: error: unrecognized command-line option '-arch'
warning: objc_exception@0.1.2: cc: error: unrecognized command-line option '-mmacosx-version-min=10.7'

error: failed to run custom build command for `objc_exception v0.1.2`
Nemo157 commented 3 months ago

AFAIK https://github.com/rust-lang/docs.rs/issues/1957#issuecomment-1365862227 is still correct, there is no way we can ship the necessary sdk to properly support cross-compiling to apple targets. You will need to either avoid the objc_exception dependency when building on docs.rs or get them to detect docs.rs and skip trying to build the C code.

syphar commented 2 months ago

this sounds like