-
Notifications
You must be signed in to change notification settings - Fork 455
-
Hi,
I am trying to cross compile to a Raspberry Pi Zero 2 W with help of cross. I need some system dependencies, so the current Cross.toml file is like this:
[target.aarch64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update",
"apt-get install --assume-yes libdbus-1-dev:$CROSS_DEB_ARCH pkg-config:$CROSS_DEB_ARCH"
]
But then on compilation, the libdbus-sys crate reports:
error: failed to run custom build command for `libdbus-sys v0.2.5`
Caused by:
process didn't exit successfully: `/target/release/build/libdbus-sys-6d49800a54e2f33f/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-changed=build_vendored.rs
cargo:rerun-if-env-changed=DBUS_1_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64_unknown_linux_gnu
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_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=TARGET_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_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu
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 exited with status code 1
> PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/: PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags dbus-1 dbus-1 >= 1.6
The system library `dbus-1` required by crate `libdbus-sys` was not found.
The file `dbus-1.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
PKG_CONFIG_PATH contains the following:
- /usr/lib/aarch64-linux-gnu/pkgconfig/
-
HINT: you may need to install a package such as dbus-1, dbus-1-dev or dbus-1-devel.
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
So it can't find the libdbus, although there is the pre-build to install it.
I am obviously doing something wrong, so what am I missing here?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
what version of cross are you using? Can you try to install the version from the main branch?
cargo install cross --git https://github.com/cross-rs/cross
Beta Was this translation helpful? Give feedback.
All reactions
-
Ok, cross was on version 0.2.5, installed it now from the main branch:
> cross --version
cross 0.2.5 (4090bec 2024年10月15日)
[cross] note: Falling back to `cargo` on the host.
cargo 1.84.0 (66221abde 2024年11月19日)
But this unfortunately gives the same result.
Beta Was this translation helpful? Give feedback.