Skip to content

MacOS Sequoia 15.5: coreaudio-sys v0.2.17 fails to build with 'AudioUnit/AudioUnit.h' file not found #115

Closed
@Sycrosity

Description

@Sycrosity

When compiling a bevy project (here), coreaudio-sys fails to build with the following error with cargo version 1.87.0 (99624be96 2025-05-06) and rustc version rustc 1.87.0 (17067e9ac 2025-05-09):

cargo run:

   Compiling clang-sys v1.8.1
   Compiling bindgen v0.72.0
   Compiling coreaudio-sys v0.2.17
error: failed to run custom build command for `coreaudio-sys v0.2.17`

Caused by:
  process didn't exit successfully: `/Users/____/____/target/debug/build/coreaudio-sys-dc6d289bbf85bc6d/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=COREAUDIO_SDK_PATH
  cargo:rustc-link-lib=framework=AudioUnit
  cargo:rustc-link-lib=framework=CoreAudio
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS

  --- stderr
  /Users/___/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/coreaudio-sys-0.2.17/coreaudio.h:1:10: fatal error: 'AudioUnit/AudioUnit.h' file not found

  thread 'main' panicked at /Users/____/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bindgen-0.72.0/lib.rs:917:13:
  assertion `left == right` failed: "arm64-apple-darwin" "aarch64-apple-darwin"
    left: 4
   right: 8
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

or cargo run --release:

error: failed to run custom build command for `coreaudio-sys v0.2.17`

Caused by:
  process didn't exit successfully: `/Users/louis/dev/games/mini-motorways/target/release/build/coreaudio-sys-fad6d50638531b0a/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=COREAUDIO_SDK_PATH
  cargo:rustc-link-lib=framework=AudioUnit
  cargo:rustc-link-lib=framework=CoreAudio
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS

  --- stderr
  /Users/louis/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/coreaudio-sys-0.2.17/coreaudio.h:1:10: fatal error: 'AudioUnit/AudioUnit.h' file not found

  thread 'main' panicked at /Users/louis/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/coreaudio-sys-0.2.17/build.rs:150:39:
  unable to generate bindings: ClangDiagnostic("/Users/louis/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/coreaudio-sys-0.2.17/coreaudio.h:1:10: fatal error: 'AudioUnit/AudioUnit.h' file not found\n")
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Forcing the program to run with coreaudio-sys v0.2.16 functions as expected, as does v0.2.15.

Running: cargo update coreaudio-sys --precise 0.2.16 followed by cargo run:

Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.26s

I am not using Nix.

Any ideas on why this might be? The only update to core-audio-sys in v0.2.17 has been bumping bingen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions