-
Notifications
You must be signed in to change notification settings - Fork 89
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
Can't compile even though portaudio is installed #130
Comments
Have you tried |
Same here, even after |
I am now using version 0.6.4 and it works flawlessly. |
I had a build issue with the same error as listed above. I think I have tracked down the problem and have a workaround. I'm on a few days old, clean install of macOS 10.11.5. I don't have ports or brew installed. I'm running the current beta of Xcode. The stable version of PortAudio won't build on my setup, so I went with the daily snapshot from July 11. This builds fine on my system and I installed it under /usr/local. The 0.6.4 version of rust-portaudio fails to build against this setup with the error generated in the original parent issue. I did some poking around and it looked to me like the build was always trying to do a static build no matter what settings and environment vars I supplied. I then discovered that if I commented out the "if pkg_config::Config::new:: ..." section in build.rs, the build worked fine. So, I checked out pkg-config-rs and did a build of it. The build completes successfully but the tests fail. I discovered that this is caused by the fact that I didn't have the pkg-config program installed on my system. The fix: I downloaded pkg-config latest from https://pkg-config.freedesktop.org/releases/ and built and installed with a configuration of, I then did a clean clone of rust-portaudio and ran cargo build and cargo test with no issues. All of the example programs run as they are supposed to. |
Similar problem. Running on mac OSX 10.11.5. I use version 0.7.0 and it works removing |
Thanks a lot everyone, I'll leave this open until a fix for the |
The "fix" I tried is not really a fix, it's a quick workaround. I replaced this: if pkg_config::Config::new().atleast_version("19").find("portaudio-2.0").is_ok() {
return;
} With: // if pkg_config::Config::new().atleast_version("19").find("portaudio-2.0").is_ok() {
return; // <- return is still here
// } I'm not sure it's what you want. Should we do something conditional like |
I found a solution. Just run |
Installation information for Mac users (RustAudio#130)
Yeah, I also feel that any fix here should just be in the readme and mention how to install pkg-config. The real problem seems to me to be in pkg-config-rs, so perhaps an issue needs to be opened there too. |
I've just tried this locally on my machine, and I noticed a small issue. I'm on a fairly fresh machine that didn't previously have PortAudio installed, and am using rust-portaudio 0.7.0.
It seems I forgot to |
I'm using Mac OS.
I have added portaudio as a dependency in a project and I have the following error, both when using version 0.6.3 from crates.io and and from the git master:
However, I have installed portaudio with port:
$ ls /opt/local/lib | grep portaudio libportaudio.2.dylib libportaudio.a libportaudio.dylib libportaudiocpp.0.dylib libportaudiocpp.a libportaudiocpp.dylib
I have added it to the library path:
I have also tried
cargo rustc -- -L/opt/local/bin/
without success... apparently, the flags added for rustc are not used to compile dependencies.I have also tried to install portaudio with Homebrew (so that it is in the more usual location, in /usr/local/lib/) but it doesn't work either.
Anyway, shouldn't the build process download portaudio and compile it if it is not found?
The text was updated successfully, but these errors were encountered: