plietar / librespot

Open Source Spotify client library
MIT License
1.14k stars 185 forks source link

Build failed on RPi 2: failed to run custom build command for `portaudio-sys v0.1.1` #222

Closed marcvangend closed 7 years ago

marcvangend commented 7 years ago

Like the title says, I tried to build librespot on a Raspberry Pi 2 under Arch Linux, but the build failed. I cloned the repo and ran cargo build --release. This was the output:

$ cargo build --release
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating git repository `https://github.com/plietar/rust-mdns`
    Updating git repository `https://github.com/hyperium/hyper`
    Updating git repository `https://github.com/plietar/rust-alsa`
    Updating git repository `https://github.com/plietar/rust-tremor`
    Updating git repository `https://github.com/astro/libpulse-sys`
    Updating git repository `https://github.com/awmath/rust-crypto.git`
    Updating git repository `https://github.com/plietar/rust-protobuf-macros`
    Updating git repository `https://github.com/plietar/dns-parser`
 Downloading num-traits v0.1.37
 Downloading rpassword v0.3.1
 Downloading protobuf v1.2.2
 Downloading serde v0.9.15
 Downloading byteorder v1.0.0
 Downloading tokio-core v0.1.7
 Downloading linear-map v1.1.0
 Downloading uuid v0.4.0
 Downloading tokio-proto v0.1.1
 Downloading futures v0.1.13
 Downloading serde_derive v0.9.15
 Downloading num-bigint v0.1.37
 Downloading vorbis v0.1.0
 Downloading tempfile v2.1.5
 Downloading log v0.3.7
 Downloading url v1.4.0
 Downloading bit-set v0.4.0
 Downloading error-chain v0.9.0
 Downloading rand v0.3.15
 Downloading portaudio-rs v0.3.0
 Downloading getopts v0.2.14
 Downloading tokio-signal v0.1.2
 Downloading num-integer v0.1.34
 Downloading serde_json v0.9.10
 Downloading env_logger v0.4.2
 Downloading shannon v0.2.0
 Downloading base64 v0.5.2
 Downloading lazy_static v0.2.8
 Downloading scoped-tls v0.1.0
 Downloading tokio-io v0.1.1
 Downloading iovec v0.1.0
 Downloading mio v0.6.7
 Downloading bytes v0.4.3
 Downloading slab v0.3.0
 Downloading lazycell v0.4.0
 Downloading net2 v0.2.29
 Downloading cfg-if v0.1.0
 Downloading time v0.1.37
 Downloading rustc-serialize v0.3.24
 Downloading libc v0.2.22
 Downloading gcc v0.3.45
 Downloading take v0.1.0
 Downloading smallvec v0.2.1
 Downloading tokio-service v0.1.0
 Downloading mime v0.2.3
 Downloading base64 v0.4.2
 Downloading httparse v1.2.2
 Downloading language-tags v0.2.2
 Downloading unicase v1.4.0
 Downloading futures-cpupool v0.1.5
 Downloading idna v0.1.1
 Downloading matches v0.1.4
 Downloading unicode-normalization v0.1.4
 Downloading unicode-bidi v0.2.5
 Downloading rustc_version v0.1.7
 Downloading semver v0.1.20
 Downloading num_cpus v1.4.0
 Downloading syn v0.11.11
 Downloading serde_codegen_internals v0.14.2
 Downloading quote v0.3.15
 Downloading synom v0.11.3
 Downloading unicode-xid v0.0.4
 Downloading ogg-sys v0.0.9
 Downloading vorbis-encoder v0.1.4
 Downloading vorbis-sys v0.0.8
 Downloading vorbisfile-sys v0.0.8
 Downloading pkg-config v0.3.9
 Downloading bit-vec v0.4.3
 Downloading nix v0.8.1
 Downloading multimap v0.3.0
 Downloading byteorder v0.5.3
 Downloading quick-error v1.2.0
 Downloading void v1.0.2
 Downloading bitflags v0.7.0
 Downloading bitflags v0.3.3
 Downloading portaudio-sys v0.1.1
 Downloading itoa v0.3.1
 Downloading dtoa v0.4.1
 Downloading regex v0.2.1
 Downloading utf8-ranges v1.0.0
 Downloading thread_local v0.3.3
 Downloading regex-syntax v0.4.0
 Downloading memchr v1.0.1
 Downloading aho-corasick v0.6.3
 Downloading unreachable v0.1.1
 Downloading vergen v0.1.1
 Downloading aster v0.41.0
 Downloading syntex v0.58.1
 Downloading syntex_syntax v0.58.1
 Downloading bitflags v0.8.2
 Downloading syntex_errors v0.58.1
 Downloading syntex_pos v0.58.1
 Downloading term v0.4.5
 Downloading termios v0.2.2
 Downloading mio-uds v0.6.4
 Downloading thread-id v3.0.0
   Compiling unicode-normalization v0.1.4
   Compiling language-tags v0.2.2
   Compiling cfg-if v0.1.0
   Compiling lazy_static v0.2.8
   Compiling num-traits v0.1.37
   Compiling byteorder v0.5.3
   Compiling bitflags v0.7.0
   Compiling utf8-ranges v1.0.0
   Compiling take v0.1.0
   Compiling httparse v1.2.2
   Compiling rustc-serialize v0.3.24
   Compiling num-integer v0.1.34
   Compiling serde v0.9.15
   Compiling protobuf v1.2.2
   Compiling pkg-config v0.3.9
   Compiling log v0.3.7
   Compiling regex-syntax v0.4.0
   Compiling quote v0.3.15
   Compiling scoped-tls v0.1.0
   Compiling error-chain v0.9.0
   Compiling portaudio-sys v0.1.1
   Compiling matches v0.1.4
   Compiling unicode-bidi v0.2.5
   Compiling linear-map v1.1.0
   Compiling unicode-xid v0.0.4
   Compiling synom v0.11.3
   Compiling syn v0.11.11
   Compiling idna v0.1.1
   Compiling bit-vec v0.4.3
   Compiling smallvec v0.2.1
   Compiling dtoa v0.4.1
   Compiling gcc v0.3.45
   Compiling url v1.4.0
   Compiling vorbisfile-sys v0.0.8
   Compiling rust-crypto v0.2.36 (https://github.com/awmath/rust-crypto.git?branch=avx2#394c2472)
   Compiling vorbis-encoder v0.1.4
   Compiling vorbis-sys v0.0.8
   Compiling ogg-sys v0.0.9
   Compiling bitflags v0.3.3
   Compiling byteorder v1.0.0
   Compiling mime v0.2.3
   Compiling shannon v0.2.0
   Compiling getopts v0.2.14
   Compiling futures v0.1.13
   Compiling term v0.4.5
   Compiling bit-set v0.4.0
   Compiling lazycell v0.4.0
   Compiling syntex_pos v0.58.1
   Compiling void v1.0.2
   Compiling unreachable v0.1.1
   Compiling libc v0.2.22
   Compiling semver v0.1.20
   Compiling thread-id v3.0.0
   Compiling net2 v0.2.29
   Compiling nix v0.8.1
   Compiling iovec v0.1.0
   Compiling rand v0.3.15
   Compiling thread_local v0.3.3
   Compiling rustc_version v0.1.7
   Compiling num_cpus v1.4.0
   Compiling uuid v0.4.0
   Compiling num-bigint v0.1.37
   Compiling futures-cpupool v0.1.5
   Compiling syntex_errors v0.58.1
   Compiling bytes v0.4.3
error: failed to run custom build command for `portaudio-sys v0.1.1`
process didn't exit successfully: `/home/admin/pkgbuild/librespot/target/release/build/portaudio-sys-1d51e49e2566437a/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Failed to run `"pkg-config" "--libs" "--cflags" "portaudio-2.0"`: No such file or directory (os error 2)', /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/portaudio-sys-0.1.1/build.rs:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.

In case it helps, uname -a says Linux alarmpi 4.9.37-1-ARCH #1 SMP Sat Jul 15 22:06:31 UTC 2017 armv7l GNU/Linux.

The only issue I could find which looks related is https://github.com/mvdnes/portaudio-rs/issues/17, but I checked and I do have portaudio installed, version 190600_20161030.

Your help is appreciated. Let me know if you need more info.

plietar commented 7 years ago

Do you have pkg-config installed ?

marcvangend commented 7 years ago

Thanks, you were right: I didn't. After installing pkg-config, the build finishes without errors.

That said, portaudio-sys still produced a warning:

Compiling portaudio-sys v0.1.1
warning: redundant linker flag specified for library `portaudio`

Could it be related, should I do something about it?

sashahilton00 commented 7 years ago

I just built it on OS X and got the same warning, looks like something might have changed in port audio. Wouldn't worry about it given that it is redundant. Also if fixed, please close issue :)

marcvangend commented 7 years ago

Thanks for your feedback @sashahilton00. I would have closed the issue if I were certain that the warning is not related. In fact your "looks like something... wouldn't worry" doesn't sound too sure either :-) But anyway, it's just a warning, not an error, so let's close this.