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

Unable to build bluster on Raspberry Pi (3B, 4) #35

Open
Jesus805 opened this issue Sep 30, 2020 · 4 comments
Open

Unable to build bluster on Raspberry Pi (3B, 4) #35

Jesus805 opened this issue Sep 30, 2020 · 4 comments

Comments

@Jesus805
Copy link

Hi,

  1. I created a new Rust project on a clean install of Raspberry Pi OS.
  2. I added bluster to Cargo.toml (I tried both bluster = "0.1.2" and bluster = { git = "https://github.com/dfrankland/bluster" }
  3. I get the error below when running cargo check

Am I missing any dependencies?

error: failed to run custom build command for `libdbus-sys v0.2.1`

Caused by:
  process didn't exit successfully: `/home/pi/pgpemu-rs/pgpemu_rs/target/debug/build/libdbus-sys-24c9796f51ee346b/build-scrip                            t-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=DBUS_1_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=DBUS_1_STATIC
  cargo:rerun-if-env-changed=DBUS_1_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_armv7-unknown-linux-gnueabihf
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_armv7_unknown_linux_gnueabihf
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_armv7-unknown-linux-gnueabihf
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_armv7_unknown_linux_gnueabihf
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_armv7-unknown-linux-gnueabihf
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_armv7_unknown_linux_gnueabihf
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--c                            flags\" \"dbus-1\" \"dbus-1 >= 1.6\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package dbu                            s-1 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `dbus-1.pc\'\nto the PKG_CO                            NFIG_PATH environment variable\nNo package \'dbus-1\' found\nPackage dbus-1 was not found in the pkg-config search path.\nPer                            haps you should add the directory containing `dbus-1.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'dbus-1\'                             found\n" } }', /home/pi/.cargo/registry/src/github.com-1285ae84e5963aae/libdbus-sys-0.2.1/build.rs:6:70
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
@dfrankland
Copy link
Owner

Hi there! You may want to read through this guide here:
https://github.com/diwic/dbus-rs/blob/master/libdbus-sys/cross_compile.md

@Jesus805
Copy link
Author

Thank you for the fast reply @dfrankland !
I'm able to build it after installing libdbus-1-dev
sudo apt-get install libdbus-1-dev
It might be useful to have this dependency in the README :)

@dfrankland
Copy link
Owner

This crate is mostly a proof of concept, so there's nary any documentation as of yet

@enochc
Copy link

enochc commented Feb 13, 2021

I've been cross compiling this on a Raspberry py 3B a lot. I did have to do some work to set up a proper cross compiler using Docker: https://hub.docker.com/repository/docker/vonamos/rust_berry

I've also built a custom script for passing in some pre compile libs for DBUS. I'm happy to share with anyone interested.

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

3 participants