Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mchitre opened this issue Apr 2, 2024 · 3 comments
Open

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

mchitre opened this issue Apr 2, 2024 · 3 comments

Comments

@mchitre
Copy link

mchitre commented Apr 2, 2024

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
@mchitre mchitre 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 Apr 2, 2024
@mchitre mchitre 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 Apr 2, 2024
@mchitre
Copy link
Author

mchitre commented Apr 2, 2024

Uninstalling homebrew llvm@15 works

@simlay
Copy link
Member

simlay commented Apr 2, 2024

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.

@mchitre
Copy link
Author

mchitre commented Apr 2, 2024

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

RiscadoA added a commit to GameDevTecnico/cubos that referenced this issue Oct 9, 2024
We can't compile Miniaudio using Homebrew clang for some reason.
We had the same exact compiling error as reported in RustAudio/coreaudio-sys#96
diogomsmiranda pushed a commit to GameDevTecnico/cubos that referenced this issue Oct 9, 2024
We can't compile Miniaudio using Homebrew clang for some reason.
We had the same exact compiling error as reported in RustAudio/coreaudio-sys#96
diogomsmiranda pushed a commit to GameDevTecnico/cubos that referenced this issue Oct 9, 2024
We can't compile Miniaudio using Homebrew clang for some reason.
We had the same exact compiling error as reported in RustAudio/coreaudio-sys#96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants