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 failure due to "new" sound feature #318

Closed
0323pin opened this issue Jan 26, 2025 · 11 comments
Closed

Build failure due to "new" sound feature #318

0323pin opened this issue Jan 26, 2025 · 11 comments

Comments

@0323pin
Copy link

0323pin commented Jan 26, 2025

Hi,

Just trying to update the bacon package on NetBSD and surprised by:

error: failed to run custom build command for `alsa-sys v0.3.1`
Caused by:
  process didn't exit successfully: `/usr/pkgsrc/wip/bacon/work/bacon-3.9.0/target/release/build/alsa-sys-6940ba5b948cbeec/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=ALSA_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-netbsd
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_netbsd
...
--- stderr
  thread 'main' panicked at /usr/pkgsrc/wip/bacon/work/vendor/alsa-sys-0.3.1/build.rs:13:18:

  pkg-config exited with status code 1
  > PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR=/usr/pkgsrc/wip/bacon/work/.buildlink/lib/pkgconfig:/usr/pkgsrc/wip/bacon/work/.buildlink/share/pkgconfig PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 /usr/pkgsrc/wip/bacon/work/.tools/bin/pkg-config --libs --cflags alsa

  The system library `alsa` required by crate `alsa-sys` was not found.

Now, I know how to fix this but, it's a bit unfair to push alsa to a platform where it is not the default sound system. Couldn't the sound feature be kept behind a feature gate so it could be disabled on non-Linux systems?

Any thoughts?

I'll make the package depend on alsa for now but, let me know if you change it. Thanks!

@Canop
Copy link
Owner

Canop commented Jan 26, 2025

Couldn't the sound feature be kept behind a feature gate so it could be disabled on non-Linux systems?

It is behind a feature gate. In the current version this feature is enabled by default but I'll reconsider that if it proves to be a problem.

Can you please confirm that you can successfully install with cargo install bacon --no-default-features ?

@0323pin
Copy link
Author

0323pin commented Jan 26, 2025

It is behind a feature gate.

If this is the case, there is no need to reconsider. I can switch it off but, I've failed to see that in Cargo.toml, I'll have another look.

Can you please confirm that you can successfully install with cargo install bacon --no-default-features ?

I'm packaging it, not building stand alone. As said, I'll have another look.

@0323pin
Copy link
Author

0323pin commented Jan 26, 2025

@Canop Fixed the package building it with --no-default-features. Sorry for the noise.

I'll add a note explaining to users how to enable it if they wish.

@0323pin 0323pin closed this as completed Jan 26, 2025
@c-git
Copy link
Contributor

c-git commented Jan 26, 2025

@0323pin do you know of an easy way to do sound on that platform without using alsa?

@Canop
Copy link
Owner

Canop commented Jan 26, 2025

Sorry for the noise.

This "noise" is welcome. This feature is quite minor so if it reveals to bring compilation problems I'll make it non default.

@0323pin
Copy link
Author

0323pin commented Jan 26, 2025

@0323pin do you know of an easy way to do sound on that platform without using alsa?

Nope, as rodio uses cpal and this depends on alsa.
alsa does works on NetBSD but, it's not native.

@0323pin
Copy link
Author

0323pin commented Jan 26, 2025

Thanks @Canop

@c-git
Copy link
Contributor

c-git commented Jan 26, 2025

@0323pin do you know of an easy way to do sound on that platform without using alsa?

Nope, as rodio uses cpal and this depends on alsa. alsa does works on NetBSD but, it's not native.

Ok thanks for explaining. Out of curiosity are you familiar with what library others use on NetBSD for sound in rust applications?

@Canop
Copy link
Owner

Canop commented Jan 26, 2025

I've set up a survey in the chat: https://miaou.dystroy.org/4683?bacon#17705331

Opinion welcome as I ponder whether it should be default.

@0323pin
Copy link
Author

0323pin commented Jan 26, 2025

@c-git Out of curiosity are you familiar with what library others use on NetBSD for sound in rust applications?

I haven't looked, I don't know if there are bindings available for oss. I know there are for gstreamer.
Another alternative would be to use portaudio.

@0323pin
Copy link
Author

0323pin commented Jan 26, 2025

Opinion welcome as I ponder whether it should be default.

Non default for me 😉

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

3 participants