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

error: failed to run custom build command for alsa-sys v0.1.2 #200

Closed
GopherJ opened this issue Nov 4, 2018 · 10 comments
Closed

error: failed to run custom build command for alsa-sys v0.1.2 #200

GopherJ opened this issue Nov 4, 2018 · 10 comments

Comments

@GopherJ
Copy link

GopherJ commented Nov 4, 2018

There is an error when it compiles alsa-sys

@thiolliere
Copy link
Contributor

It may be because it needs development files.

on fedora it is alsa-lib-devel I think,
on debian libalsaplayer-dev maybe.

@GopherJ
Copy link
Author

GopherJ commented Nov 4, 2018

@thiolliere Hello, thanks for your reply. I still got this error:

process didn't exit successfully: `/home/cheng/Project/Rust/rodio/examples/mp3/target/debug/build/alsa-sys-89668916c5ee996e/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "`\"pkg-config\" \"--libs\" \"--cflags\" \"alsa\"` did not exit successfully: exit code: 1\n--- stderr\nPackage alsa was not found in the pkg-config search path.\nPerhaps you should add the directory containing `alsa.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'alsa\' found\n"', libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

@thiolliere
Copy link
Contributor

thiolliere commented Nov 5, 2018

Ok, you may want to find alsa.pc using find /usr -name alsa.pc
If you can't find anything you probably miss the right alsa dev package.

For me it return /usr/lib64/pkgconfig/alsa.pc and /usr/lib/pkgconfig/alsa.pc

If it does exist it is surprising that pkgconfig don't find it.
But still you should be able to fix it using export PKG_CONFIG...=/usr/../pkgconfig or adding to the variable if it is not empty
Or otherwise reboot stuff maybe pkgconfig doesn't find it yet and must update its cache or something I don't know

@GopherJ
Copy link
Author

GopherJ commented Nov 5, 2018

I failed to find alsa.pc, it's strange...before that I've installed libalsaplayer-dev.

@thiolliere
Copy link
Contributor

yes indeed I just find out on debian alsa dev files seems to be in package libasound2-dev instead

@GopherJ
Copy link
Author

GopherJ commented Nov 5, 2018

Thank you very much! It works well after installed libasound2-dev!

@GopherJ GopherJ closed this as completed Nov 5, 2018
@blemelin
Copy link

blemelin commented Oct 4, 2020

Had the same problem. This should probably be documented in the README.md.

Something like this :

## Dependencies
This crate requires `libasound2-dev` on Debian and derivatives (Ubuntu, Pop OS, ...).

@1Kinoti
Copy link

1Kinoti commented Sep 18, 2022

In Void Linux, install the following
alsa-lib
alsa-firmware
alsa-lib-devel
I am not quite sure which one exactly solved my problem, but it was solved anyway

@vmontes
Copy link

vmontes commented Jan 31, 2023

In Void Linux, install the following alsa-lib alsa-firmware alsa-lib-devel I am not quite sure which one exactly solved my problem, but it was solved anyway

Thanks, this worked for my Fedora (using dnf)

@GyulyVGC
Copy link

GyulyVGC commented Feb 9, 2023

In Void Linux, install the following alsa-lib alsa-firmware alsa-lib-devel I am not quite sure which one exactly solved my problem, but it was solved anyway

It should be the last one

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

6 participants