audiopus icon indicating copy to clipboard operation
audiopus copied to clipboard

iOS build fails with 0.3.0-rc.0

Open enedrio opened this issue 3 years ago • 2 comments

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"

enedrio avatar Jun 23 '21 17:06 enedrio

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"

enedrio avatar Jun 23 '21 20:06 enedrio

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?

Lakelezz avatar Aug 17 '21 03:08 Lakelezz