[GH-ISSUE #51] Build fails installing on macOS 11.3.1 (Apple Silicon, M1) #41

Closed
opened 2026-02-28 14:30:10 +03:00 by kerem · 10 comments
Owner

Originally created by @lonkelle on GitHub (May 24, 2021).
Original GitHub issue: https://github.com/jpochyla/psst/issues/51

This is the error I get when cargo build --release OR cargo build --release on my M1 MacBook Air (macOS 11.3.1).

error: failed to run custom build command for `ep-miniaudio-sys v2.4.0 (https://github.com/jpochyla/miniaudio-rs#1ff94282)`
Originally created by @lonkelle on GitHub (May 24, 2021). Original GitHub issue: https://github.com/jpochyla/psst/issues/51 This is the error I get when `cargo build --release` **OR** `cargo build --release` on my M1 MacBook Air (macOS 11.3.1). ``` error: failed to run custom build command for `ep-miniaudio-sys v2.4.0 (https://github.com/jpochyla/miniaudio-rs#1ff94282)` ```
kerem 2026-02-28 14:30:10 +03:00
  • closed this issue
  • added the
    bug
    macos
    labels
Author
Owner

@jpochyla commented on GitHub (May 27, 2021):

Do you have the submodules fetched? I don't have any M1 hw and have no way to test, sorry. PRs welcome!

<!-- gh-comment-id:849766003 --> @jpochyla commented on GitHub (May 27, 2021): Do you have the submodules fetched? I don't have any M1 hw and have no way to test, sorry. PRs welcome!
Author
Owner

@lonkelle commented on GitHub (Jun 14, 2021):

I think I can fix it, I just need to figure out how to enable bindgen on your build. I needed to install it I believe so:

brew install llvm
cargo install bindgen

worked for that but your build code still isn't using it.

thread 'main' panicked at 'bindings for macos-aarch64 do not exist in `bindings/macos-aarch64`, please enable the `bindgen` feature instead', /Users/joel/.cargo/git/checkouts/miniaudio-rs-0268a3ab613f78e9/1ff9428/miniaudio-sys/build.rs:60:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Any suggestion on how to force it to use bindgen?

<!-- gh-comment-id:860887447 --> @lonkelle commented on GitHub (Jun 14, 2021): I think I can fix it, I just need to figure out how to enable `bindgen` on your build. I needed to install it I believe so: `brew install llvm` `cargo install bindgen` worked for that but your build code still isn't using it. ``` thread 'main' panicked at 'bindings for macos-aarch64 do not exist in `bindings/macos-aarch64`, please enable the `bindgen` feature instead', /Users/joel/.cargo/git/checkouts/miniaudio-rs-0268a3ab613f78e9/1ff9428/miniaudio-sys/build.rs:60:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Any suggestion on how to force it to use `bindgen`?
Author
Owner

@jpochyla commented on GitHub (Jun 15, 2021):

Thanks @lonkle! Can you try adding features = ["bindgen"] do the miniaudio dependency?

<!-- gh-comment-id:861246212 --> @jpochyla commented on GitHub (Jun 15, 2021): Thanks @lonkle! Can you try adding `features = ["bindgen"]` do the `miniaudio` dependency?
Author
Owner

@lonkelle commented on GitHub (Jun 15, 2021):

That worked perfectly, here's my PR for Apple Silicon support.

https://github.com/jpochyla/psst/pull/62 (you can choose to adding that "feature" conditional if you want, but bindgen works for all platforms it looks like).

<!-- gh-comment-id:861501439 --> @lonkelle commented on GitHub (Jun 15, 2021): That worked perfectly, here's my PR for Apple Silicon support. https://github.com/jpochyla/psst/pull/62 (you can choose to adding that "feature" conditional if you want, but `bindgen` works for all platforms it looks like).
Author
Owner

@jpochyla commented on GitHub (Jun 18, 2021):

Merged #62, thank you!

<!-- gh-comment-id:864039278 --> @jpochyla commented on GitHub (Jun 18, 2021): Merged #62, thank you!
Author
Owner

@jpochyla commented on GitHub (Jun 24, 2021):

@lonkle Hi, I think we were a bit too quick with merging this. Enabling the bindgen feature requires llvm installation, and I think we can do better. Do you think it would be possible to upstream the pre-generated arm64 bindings to miniaudio-rs, by running this script and opening a PR there?

<!-- gh-comment-id:867778300 --> @jpochyla commented on GitHub (Jun 24, 2021): @lonkle Hi, I think we were a bit too quick with merging this. Enabling the `bindgen` feature requires `llvm` installation, and I think we can do better. Do you think it would be possible to upstream the pre-generated arm64 bindings to `miniaudio-rs`, by [running this script](https://github.com/ExPixel/miniaudio-rs/blob/master/generate-bindings.rs) and opening a PR there?
Author
Owner

@lonkelle commented on GitHub (Jun 25, 2021):

@jpochyla Good point. Done! https://github.com/ExPixel/miniaudio-rs/pull/65

<!-- gh-comment-id:868150443 --> @lonkelle commented on GitHub (Jun 25, 2021): @jpochyla Good point. Done! https://github.com/ExPixel/miniaudio-rs/pull/65
Author
Owner

@jpochyla commented on GitHub (Jul 26, 2021):

This is taking a bit long, let's use our fork of miniaudio-rs.

<!-- gh-comment-id:886577640 --> @jpochyla commented on GitHub (Jul 26, 2021): This is taking a bit long, let's use our fork of `miniaudio-rs`.
Author
Owner

@jpochyla commented on GitHub (Jul 26, 2021):

I've merged the PR into jpochyla/miniaudio-rs and included it in a71179f. Please let me know in case of further problems on M1!

<!-- gh-comment-id:886886703 --> @jpochyla commented on GitHub (Jul 26, 2021): I've merged the PR into `jpochyla/miniaudio-rs` and included it in a71179f. Please let me know in case of further problems on M1!
Author
Owner

@naymapl commented on GitHub (Jan 9, 2022):

Hello.
I start to build fresh build on Apple Silicon and got error:

 Compiling psst-core v0.1.0 (/Users/naymapl/psst/psst-core)
error[E0599]: no variant or associated item named `compatible_audio_formats` found for enum `MediaFile` in the current scope
  --> psst-core/src/metadata.rs:48:31
   |
48 |         let file = MediaFile::compatible_audio_formats(preferred_bitrate)
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^ variant or associated item not found in `MediaFile`
   |
  ::: psst-core/src/player/file.rs:35:1
   |
35 | pub enum MediaFile {
   | ------------------ variant or associated item `compatible_audio_formats` not found here

For more information about this error, try `rustc --explain E0599`.
error: could not compile `psst-core` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
<!-- gh-comment-id:1008352008 --> @naymapl commented on GitHub (Jan 9, 2022): Hello. I start to build fresh build on Apple Silicon and got error: ``` Compiling psst-core v0.1.0 (/Users/naymapl/psst/psst-core) error[E0599]: no variant or associated item named `compatible_audio_formats` found for enum `MediaFile` in the current scope --> psst-core/src/metadata.rs:48:31 | 48 | let file = MediaFile::compatible_audio_formats(preferred_bitrate) | ^^^^^^^^^^^^^^^^^^^^^^^^ variant or associated item not found in `MediaFile` | ::: psst-core/src/player/file.rs:35:1 | 35 | pub enum MediaFile { | ------------------ variant or associated item `compatible_audio_formats` not found here For more information about this error, try `rustc --explain E0599`. error: could not compile `psst-core` due to previous error warning: build failed, waiting for other jobs to finish... error: build failed ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/psst#41
No description provided.