audiopus
audiopus copied to clipboard
iOS build fails with 0.3.0-rc.0
When executing cargo build --release --target aarch64-apple-ios
in a project that depends on version 0.3.0-rc.0
the cmake build of audiopus-sys fails with:
clang: error: invalid argument '-mmacosx-version-min=11.1' not allowed with '-miphoneos-version-min=7.0'
clang: warning: overriding '-mmacosx-version-min=11.1' option with '--target=aarch64-apple-ios' [-Woverriding-t-option]
clang: warning: using sysroot for 'MacOSX' but targeting 'iPhone' [-Wincompatible-sysroot]
make[1]: *** [CMakeFiles/cmTC_2b328.dir/testCCompiler.c.o] Error 1
make: *** [cmTC_2b328/fast] Error 2
Doing the same with version 0.2.0
works on the same system.
I'm on MacOS 11.1 Big Sur. rustc 1.53.0 cmake 3.20.5
The cargo.toml of my reproducer project is simply this:
[package]
name = "ios-audiopus-test"
version = "0.1.0"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
audiopus = "0.3.0-rc.0"
This comes from the selected Opus Version in audiopus_sys
.
I'm seeing the same error when compiling the following with cargo build --release --target aarch64-apple-ios
[package]
name = "ios-audiopus-test"
version = "0.1.0"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
audiopus_sys = "0.2"
Thanks for reporting this. I have no way to test this on MacOS however.
When I read this:
clang: error: invalid argument '-mmacosx-version-min=11.1' not allowed with '-miphoneos-version-min=7.0'
The error sounds as if building for the mobile target version is simply not supported on this host version?