Skip to content

Build fails on M1 Mac with Sonoma 14.4.1 and Homebrew #96

Description

@mchitre

Was working previously, something in a recent upgrade seems to have broken it.

Possibly related to #85, but not the same.

Build chain info:

» clang --version
Homebrew clang version 15.0.7
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm@15/bin

Error message:

» cargo b
   Compiling coreaudio-sys v0.2.13
error: failed to run custom build command for `coreaudio-sys v0.2.13`

Caused by:
  process didn't exit successfully: `/Users/mandar/Projects/unet/unet-grogu/src/main/rust/grogud/target/debug/build/coreaudio-sys-4de2ae8acebe8098/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=AudioToolbox
  cargo:rustc-link-lib=framework=CoreAudio
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS

  --- stderr
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1633:8: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1664:16: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1677:8: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1695:7: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1711:8: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1729:7: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1742:8: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1760:8: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1787:8: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1802:16: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1813:8: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1828:21: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2072:8: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2089:24: error: unknown type name 'ItemCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2600:6: error: unknown type name 'ByteCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2603:6: error: unknown type name 'ByteCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2684:6: error: unknown type name 'ByteCount'
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2687:6: error: unknown type name 'ByteCount'
  thread 'main' panicked at /Users/mandar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/coreaudio-sys-0.2.13/build.rs:150:39:
  unable to generate bindings: ClangDiagnostic("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1633:8: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1664:16: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1677:8: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1695:7: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1711:8: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1729:7: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1742:8: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1760:8: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1787:8: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1802:16: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1813:8: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1828:21: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2072:8: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2089:24: error: unknown type name 'ItemCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2600:6: error: unknown type name 'ByteCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2603:6: error: unknown type name 'ByteCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2684:6: error: unknown type name 'ByteCount'\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:2687:6: error: unknown type name 'ByteCount'\n")
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Activity

  1. changed the title [-]Build fails on M1 Mac with Sonoma 14.4.1[/-] [+]Build fails on M1 Mac with Sonoma 14.4.1 and homebrew[/+] on Apr 2, 2024
  2. changed the title [-]Build fails on M1 Mac with Sonoma 14.4.1 and homebrew[/-] [+]Build fails on M1 Mac with Sonoma 14.4.1 and Homebrew[/+] on Apr 2, 2024
  3. mchitre commented on Apr 2, 2024

    @mchitre
    Author

    Uninstalling homebrew llvm@15 works

  4. simlay commented on Apr 2, 2024

    @simlay
    Member

    Thanks for the report!

    Looking at the versions of your setup, I'm not sure why this happened. The bindgen dependebot change to fix #85 was published in coreaudio-sys 0.2.13 (what you have).

    I assume that uninstalling llvm@15 results in using clang shipped with xcode which for me (macos 14.4.1, xcode 15.3) is clang 15.

  5. mchitre commented on Apr 2, 2024

    @mchitre
    Author

    Yes, clang with xcode works. Homebrew version doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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