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

Error on: cross build --target armv7-unknown-linux-gnueabihf #482

Closed
ravensnowbird opened this issue Nov 6, 2020 · 5 comments
Closed

Error on: cross build --target armv7-unknown-linux-gnueabihf #482

ravensnowbird opened this issue Nov 6, 2020 · 5 comments

Comments

@ravensnowbird
Copy link

   Compiling libc v0.2.80
   Compiling autocfg v1.0.1
   Compiling pkg-config v0.3.19
   Compiling cc v1.0.61
   Compiling getrandom v0.1.15
   Compiling cfg-if v0.1.10
   Compiling proc-macro2 v1.0.24
   Compiling unicode-xid v0.2.1
   Compiling cfg-if v1.0.0
   Compiling syn v1.0.48
   Compiling crc32fast v1.2.1
   Compiling lazy_static v1.4.0
   Compiling const_fn v0.4.3
   Compiling scopeguard v1.1.0
   Compiling ppv-lite86 v0.2.10
   Compiling serde_derive v1.0.117
   Compiling rayon-core v1.9.0
   Compiling bitflags v1.2.1
   Compiling siphasher v0.3.3
   Compiling adler32 v1.2.0
   Compiling tinyvec v0.3.4
   Compiling serde v1.0.117
   Compiling matches v0.1.8
   Compiling log v0.4.11
   Compiling openssl v0.10.30
   Compiling foreign-types-shared v0.1.1
   Compiling ryu v1.0.5
   Compiling doc-comment v0.3.3
   Compiling itoa v0.4.6
   Compiling serde_json v1.0.59
   Compiling byteorder v1.3.4
   Compiling sysinfo v0.10.5
   Compiling native-tls v0.2.4
   Compiling anyhow v1.0.34
   Compiling gcc v0.3.55
   Compiling same-file v1.0.6
   Compiling either v1.6.1
   Compiling percent-encoding v2.1.0
   Compiling once_cell v1.4.1
   Compiling bytes v0.5.6
   Compiling dtoa v0.4.6
   Compiling openssl-probe v0.1.2
   Compiling fnv v1.0.7
   Compiling cfg_aliases v0.1.1
   Compiling tauri-api v0.7.4
   Compiling hashbrown v0.9.1
   Compiling remove_dir_all v0.5.3
   Compiling semver-parser v0.7.0
   Compiling fsio v0.1.3
   Compiling urlencoding v1.1.1
   Compiling really-pi v3.0.0 (/project)
   Compiling base64 v0.12.3
   Compiling webbrowser v0.5.5
   Compiling crossbeam-utils v0.8.0
   Compiling memoffset v0.5.6
   Compiling rayon v1.5.0
   Compiling indexmap v1.6.0
   Compiling phf_shared v0.8.0
   Compiling libdbus-sys v0.2.1
   Compiling miniz_oxide v0.3.7
   Compiling unicode-bidi v0.3.4
   Compiling foreign-types v0.3.2
   Compiling unicode-normalization v0.1.13
   Compiling walkdir v2.3.1
   Compiling openssl-sys v0.9.58
   Compiling bzip2-sys v0.1.9+1.0.8
   Compiling tauri-dialog-sys v0.1.0
   Compiling webview-official-sys v0.1.0
   Compiling semver v0.10.0
   Compiling http v0.2.1
   Compiling nfd v0.0.4
error: failed to run custom build command for `libdbus-sys v0.2.1`

Caused by:
  process didn't exit successfully: `/target/debug/build/libdbus-sys-6a0f73e016fe392f/build-script-build` (exit code: 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
  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=TARGET_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=TARGET_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=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: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"dbus-1\" \"dbus-1 >= 1.6\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package dbus-1 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `dbus-1.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'dbus-1\' found\nPackage dbus-1 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `dbus-1.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'dbus-1\' found\n" } }', /cargo/registry/src/github.com-1ecc6299db9ec823/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

@capnfabs
Copy link

capnfabs commented Nov 6, 2020

Hey @ravensnowbird, this looks like a symptom of the same problem described in #404.

@ddcprg
Copy link

ddcprg commented Nov 12, 2020

is there a workaround for this issue? I'm trying to compile with GitHub actions for x86_64-unknown-linux-musl and I get the same error. The pipeline file is below

on: [push]

name: Alpine build

jobs:
  linux_alpine:
    name: Linux Alpine
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Prepare Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          target: x86_64-unknown-linux-musl
          override: true
      - name: Compile debug
        uses: actions-rs/cargo@v1
        with:
          use-cross: true
          command: build
          args: --target x86_64-unknown-linux-musl

@theunkn0wn1
Copy link
Contributor

@ddcprg I believe the workaround is documented here #149 (comment)

@Alexhuszagh
Copy link
Contributor

I would also assume the images don't have libdbus-1-dev installed by default, so you'd have to extend an image with your own packages as a result. I'll be adding an example on the Wiki on how to integrate pkg-config with cross.

@Alexhuszagh
Copy link
Contributor

With #727 we've added the PKG_CONFIG_PATH to all *-linux-gnu images, so adding external packages is now documented and pkg-config support is enabled by default.

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

No branches or pull requests

5 participants