Кросс-компиляция — это RUST

Я делаю кросс-компиляцию на своем ноутбуке для raspberry pi. Целевая тройка на моем ноутбукеx86_64-linux-gnuЦелевой триплет на моем raspberry piarm-linux-gnueabihfЯ использую УБУНТУ 20.04.

.cargo/confi.toml имеет

      [target.armv7-unknown-linux-musleabihf]
linker = "ld.lld"


[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

Однако я получаю эту ошибку

      Compiling regex-automata v0.1.10
   Compiling owned_ttf_parser v0.6.0
   Compiling futures-task v0.3.24
   Compiling crc32fast v1.3.2
   Compiling libudev-sys v0.1.4
   Compiling crossbeam-utils v0.8.12
   Compiling unicode-normalization v0.1.22
   Compiling maybe-uninit v2.0.0
   Compiling wide v0.7.4
   Compiling http-body v0.3.1
   Compiling headers-core v0.2.0
   Compiling matrixmultiply v0.1.15
   Compiling httparse v1.8.0
   Compiling num_cpus v1.13.1
error: failed to run custom build command for `libudev-sys v0.1.4`

Caused by:
  process didn't exit successfully: `/home/abc/csd/target/release/build/libudev-sys-0463db1d4d4cbd4d/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBUDEV_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
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "pkg-config has not been configured to support cross-compilation.\n\nInstall a sysroot for the target platform and configure it via\nPKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a\ncross-compiling wrapper for pkg-config and set it via\nPKG_CONFIG environment variable."', /home/akumar/.cargo/registry/src/github.com-1ecc6299db9ec823/libudev-sys-0.1.4/build.rs:38:41
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

0 ответов

Другие вопросы по тегам