Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Cannot cross compile #67

Open
unlimitedbacon opened this issue Oct 3, 2022 · 1 comment
Open

Cannot cross compile #67

unlimitedbacon opened this issue Oct 3, 2022 · 1 comment

Comments

@unlimitedbacon
Copy link

Trying to build with cargo build --target aarch64-unknown-linux-gnu on an AMD64 system fails with the following error.

error: failed to run custom build command for `servo-fontconfig-sys v5.1.0`

Caused by:
  process didn't exit successfully: `/home/neo/Code/stl-thumb/target/release/build/servo-fontconfig-sys-a320be42ed14a7e2/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=FONTCONFIG_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=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
  thread 'main' panicked at '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.', /home/neo/.cargo/registry/src/github.com-1ecc6299db9ec823/servo-fontconfig-sys-5.1.0/build.rs:34:17
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
cargo-deb: build failed
@olofwalker
Copy link

olofwalker commented Oct 3, 2022

I see the same error when trying to build, the dependency is pulled in by winit.

Building on:

5.15.0-47-generic #51-Ubuntu SMP Thu Aug 11 07:51:15 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Edit:

In my case, libfontconfig-dev had been cleaned out for some reason, I just added it back, and it built correctly again.

sudo apt install libfontconfig-dev

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants