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

drk: build script doesn't enable optional dependency play #175

Closed
adoerr opened this issue Jun 2, 2023 · 5 comments
Closed

drk: build script doesn't enable optional dependency play #175

adoerr opened this issue Jun 2, 2023 · 5 comments

Comments

@adoerr
Copy link
Contributor

adoerr commented Jun 2, 2023

cargo build -p drk, will run into the error below:

image

Reason is that this line in build.rs will only enable the play feature for rustc but not the cargo optional dependency play. This seems to be expected behavior, please see Features enabled through build scripts should have an effect on dependencies.

Please note that this error will not surface, if make is used since make implies --all-features. Doing a make check, however, will trigger the error.

Since according to the README, libmpg123 is a required dependency anyway, we might want to make crate play a mandatory dependency for drk.

OTOH, the feature seems to be prone to causing issues (see #144), we might also consider to let the fun police 👮 have it's way and remove the play feature.

WDYT?

@adoerr adoerr changed the title drk: build script doesn't enable optional feature play drk: build script doesn't enable optional dependency play Jun 2, 2023
@parazyd
Copy link
Member

parazyd commented Jun 6, 2023

I've implemented an alternative way to do it with rodio: 88865e2

Let me know if this works.

@adoerr
Copy link
Contributor Author

adoerr commented Jun 6, 2023

I think the fix unfortunately has a new dependency

image

The build error I do get is

image

Looks like the alsa development headers are needed. On my system I had to install libasound2-dev.

make check works now 🎉

@parazyd
Copy link
Member

parazyd commented Jun 6, 2023

Ok yeah, thanks. Will test it on a clean system and report back.

@aggstam
Copy link
Contributor

aggstam commented Jun 7, 2023

@adoerr: libasound2-dev was added as dependency in docs, scripts, etc.
Let us know if you encounter any issue with fun feature, otherwise we can close this ticket.
Your feedback is really appreciated!

On a sidenote, please prefer using codeblocks rather than screenshots to share logs.

@adoerr
Copy link
Contributor Author

adoerr commented Jun 7, 2023

Fixed.

@adoerr adoerr closed this as completed Jun 7, 2023
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