[GH-ISSUE #174] Crosscompiling with PortAudio fails #115

Closed
opened 2026-02-27 19:28:55 +03:00 by kerem · 1 comment
Owner

Originally created by @TheBigFatTony on GitHub (Feb 28, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/174

I want to compile librespot-org from my Fedora 27 to my Raspberry Pi Model B Rev 2 with the PortAudio backend using this command:
docker run -v /tmp/librespot-build:/build:Z librespot-cross cargo build --release --target arm-unknown-linux-gnueabi --no-default-features --features portaudio-backend
But it fails with this error:

error: failed to run custom build command for `portaudio-sys v0.1.1`
process didn't exit successfully: `/build/release/build/portaudio-sys-ec384f39d055f1f8/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Cross compilation detected. Use PKG_CONFIG_ALLOW_CROSS=1 to override', /build/cache/registry/src/github.com-1ecc6299db9ec823/portaudio-sys-0.1.1/build.rs:8:19
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Full output: https://pastebin.com/Y3C5GQ3c

How can I set PKG_CONFIG_ALLOW_CROSS to 1?

Can anyone help me fix this?
(If I set --features to alsa-backend, it compiles and runs on the Raspberry Pi, although there is no sound just weird beeps. Full output: https://pastebin.com/ezi5B76e)

Originally created by @TheBigFatTony on GitHub (Feb 28, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/174 I want to compile librespot-org from my Fedora 27 to my Raspberry Pi Model B Rev 2 with the PortAudio backend using this command: `docker run -v /tmp/librespot-build:/build:Z librespot-cross cargo build --release --target arm-unknown-linux-gnueabi --no-default-features --features portaudio-backend` But it fails with this error: ``` error: failed to run custom build command for `portaudio-sys v0.1.1` process didn't exit successfully: `/build/release/build/portaudio-sys-ec384f39d055f1f8/build-script-build` (exit code: 101) --- stderr thread 'main' panicked at 'Cross compilation detected. Use PKG_CONFIG_ALLOW_CROSS=1 to override', /build/cache/registry/src/github.com-1ecc6299db9ec823/portaudio-sys-0.1.1/build.rs:8:19 note: Run with `RUST_BACKTRACE=1` for a backtrace. ``` Full output: https://pastebin.com/Y3C5GQ3c How can I set PKG_CONFIG_ALLOW_CROSS to 1? Can anyone help me fix this? (If I set `--features` to `alsa-backend`, it compiles and runs on the Raspberry Pi, although there is no sound just weird beeps. Full output: https://pastebin.com/ezi5B76e)
kerem closed this issue 2026-02-27 19:28:55 +03:00
Author
Owner

@sashahilton00 commented on GitHub (Feb 28, 2018):

Run the docker command like this:

docker run -v /tmp/librespot-build:/build:Z librespot-cross PKG_CONFIG_ALLOW_CROSS=1 cargo build --release --target arm-unknown-linux-gnueabi --no-default-features --features portaudio-backend

The best place to discuss this is on the Gitter chat, as responses will be faster, and this isn't really an issue with librespot. You can find the chat here. Hope to chat there :) Will close this in the meantime.

<!-- gh-comment-id:369290971 --> @sashahilton00 commented on GitHub (Feb 28, 2018): Run the docker command like this: ``` docker run -v /tmp/librespot-build:/build:Z librespot-cross PKG_CONFIG_ALLOW_CROSS=1 cargo build --release --target arm-unknown-linux-gnueabi --no-default-features --features portaudio-backend ``` The best place to discuss this is on the Gitter chat, as responses will be faster, and this isn't really an issue with librespot. You can find the chat [here](https://gitter.im/librespot-org/spotify-connect-resources). Hope to chat there :) Will close this in the meantime.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#115
No description provided.