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

Failed to build: "failed to run custom build command for coreaudio-sys v0.2.15" #13

Closed
Nocxr opened this issue Feb 8, 2024 · 7 comments
Labels
resolved The issue was resolved

Comments

@Nocxr
Copy link

Nocxr commented Feb 8, 2024

Just cloned the repo and tried running the script, it starts compiling everything fine until it hits this:

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

Caused by:
  process didn't exit successfully: `/Users/marshall/projects/git/alvr-visionos/ALVR/target/debug/build/coreaudio-sys-aeb840a3b2a09ac8/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=COREAUDIO_SDK_PATH
  cargo:rustc-link-lib=framework=AudioToolbox
  cargo:rustc-link-lib=framework=AudioToolbox
  cargo:rustc-link-lib=framework=CoreAudio
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS

  --- stderr
  /Users/marshall/.cargo/registry/src/index.crates.io-6f17d22bba15001f/coreaudio-sys-0.2.15/coreaudio.h:1:10: fatal error: 'AudioUnit/AudioUnit.h' file not found
  /Users/marshall/.cargo/registry/src/index.crates.io-6f17d22bba15001f/coreaudio-sys-0.2.15/coreaudio.h:1:10: note: did not find header 'AudioUnit.h' in framework 'AudioUnit' (loaded from '/System/Library/Frameworks')
  thread 'main' panicked at /Users/marshall/.cargo/registry/src/index.crates.io-6f17d22bba15001f/coreaudio-sys-0.2.15/build.rs:162:39:
  unable to generate bindings: ClangDiagnostic("/Users/marshall/.cargo/registry/src/index.crates.io-6f17d22bba15001f/coreaudio-sys-0.2.15/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

I'm using a new Macbook Pro M3 Sonoma 14.3, please let me know if there is anything else I can provide that might help, thanks!

@shinyquagsire23
Copy link
Collaborator

make sure you have the iPhoneOS SDK installed, Rust currently doesn't have a visionOS target (and libraries don't have support for it) so it's using iOS headers for dependencies in the interim

@SwaMusic
Copy link

SwaMusic commented Feb 8, 2024

Also experiencing the same and have all the SDKs for each OS installed as well.

@zhuowei
Copy link
Collaborator

zhuowei commented Feb 8, 2024

I can reproduce it on my machine if the currently active Xcode is set to the Command Line Tools instead of the actual Xcode.app.

Can you please run xcode-select -p?

If it shows /Library/Developer/CommandLineTools, then your Xcode install isn't set to the active install, and Rust is trying to build with the macOS-only command line tools instead.

(This often happens with Xcode Beta, unfortunately, since it's named "Xcode-beta.app" by default.)

There's two ways to fix this:

  • Hard way: sudo xcode-select -s /Path/To/Xcode.app
  • Easy way: just move your Xcode to /Applications/Xcode.app

@SwaMusic
Copy link

SwaMusic commented Feb 8, 2024

I can reproduce it on my machine if the currently active Xcode is set to the Command Line Tools instead of the actual Xcode.app.

Can you please run xcode-select -p?

If it shows /Library/Developer/CommandLineTools, then your Xcode install isn't set to the active install, and Rust is trying to build with the macOS-only command line tools instead.

(This often happens with Xcode Beta, unfortunately, since it's named "Xcode-beta.app" by default.)

There's two ways to fix this:

  • Hard way: sudo xcode-select -s /Path/To/Xcode.app
  • Easy way: just move your Xcode to /Applications/Xcode.app

My XCode was already in /Applications/Xcode.app, just pointed the command line tools there instead. It all worked but I am still receiving.

Showing Recent Issues
There is no XCFramework found at '/Users/swamini/alvr-visionos/ALVRClientCore.xcframework'.

@zhuowei
Copy link
Collaborator

zhuowei commented Feb 8, 2024

Run

Product -> Clean Build Folder.

I was able to reproduce your issue by trying to build without a ALVRClientCore.xcframework; I then get the same error that you got even after I put the xcframework back. Doing a Clean Build Folder then building again worked.

@Nocxr
Copy link
Author

Nocxr commented Feb 8, 2024

I can reproduce it on my machine if the currently active Xcode is set to the Command Line Tools instead of the actual Xcode.app.

Can you please run xcode-select -p?

If it shows /Library/Developer/CommandLineTools, then your Xcode install isn't set to the active install, and Rust is trying to build with the macOS-only command line tools instead.

(This often happens with Xcode Beta, unfortunately, since it's named "Xcode-beta.app" by default.)

There's two ways to fix this:

  • Hard way: sudo xcode-select -s /Path/To/Xcode.app
  • Easy way: just move your Xcode to /Applications/Xcode.app

I did have all the sdks installed, but you were correct that it was set to CommandLineTools, I used the sudo command and it worked right away, thank you very much!

@SwaMusic
Copy link

SwaMusic commented Feb 8, 2024

Run

Product -> Clean Build Folder.

I was able to reproduce your issue by trying to build without a ALVRClientCore.xcframework; I then get the same error that you got even after I put the xcframework back. Doing a Clean Build Folder then building again worked.

That worked and was able to get it connected but not it just keeps connecting-disconnecting-connecting-disconnecting on loop. I see the SteamVR overlay and it's tracking and all but just keeps going through that loop every 1-2 seconds consistently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolved The issue was resolved
Projects
None yet
Development

No branches or pull requests

4 participants