You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to compile the example on Ubuntu x64 (WSL2) for Raspberry Pi 3 (i.e. armv7-unknown-linux-gnueabihf), compilation fails. This (AFAICS) has to do with the failing cross compilation of some native libraries: pkg_config failed: pkg-config has not been configured to support cross-compilation.
Just wanted to add this issue for future reference for other users bumping into this same issue. Found this issue on the dbus-rs repo outlining the problem and offering a (rather complicated) solution. Haven't tried it yet, but seems promising.
Expected Behavior
Successful compilation of the example.
Actual Behavior
❯ cargo build --target armv7-unknown-linux-gnueabihf --example testing
Compiling libdbus-sys v0.2.2
Compiling quote v1.0.15
Compiling num-traits v0.2.14
error: failed to run custom build command for `libdbus-sys v0.2.2`
Caused by:
process didn't exit successfully: `/home/eflukx/code-native/networkmanager-rs/target/debug/build/libdbus-sys-3da2e4d0d9fbb5c1/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=DBUS_1_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_armv7-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_armv7_unknown_linux_gnueabihf
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_armv7-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=PKG_CONFIG_armv7_unknown_linux_gnueabihf
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
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=TARGET_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
pkg_config failed: pkg-config has not been configured to support cross-compilation.
Install a sysroot for the target platform and configure it via
PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
cross-compiling wrapper for pkg-config and set it via
PKG_CONFIG environment variable.
One possible solution is to check whether packages
'libdbus-1-dev' and 'pkg-config' are installed:
On Ubuntu:
sudo apt install libdbus-1-dev pkg-config
On Fedora:
sudo dnf install dbus-devel pkgconf-pkg-config
thread 'main' panicked at 'explicit panic', /home/eflukx/.cargo/registry/src/garden.eu.org-1ecc6299db9ec823/libdbus-sys-0.2.2/build.rs:16:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
When trying to compile the example on Ubuntu x64 (WSL2) for Raspberry Pi 3 (i.e.
armv7-unknown-linux-gnueabihf
), compilation fails. This (AFAICS) has to do with the failing cross compilation of some native libraries:pkg_config failed: pkg-config has not been configured to support cross-compilation.
Just wanted to add this issue for future reference for other users bumping into this same issue. Found this issue on the dbus-rs repo outlining the problem and offering a (rather complicated) solution. Haven't tried it yet, but seems promising.
Expected Behavior
Successful compilation of the example.
Actual Behavior
Steps to Reproduce the Problem
sudo apt install libdbus-1-dev pkg-config
cargo build --target armv7-unknown-linux-gnueabihf --example testing
The text was updated successfully, but these errors were encountered: