PyO3 / maturin-action

GitHub Action to install and run a custom maturin command with built-in support for cross compilation
MIT License
132 stars 37 forks source link

PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH #187

Closed Omicronlawful closed 1 year ago

Omicronlawful commented 1 year ago

I tried to use pango with rust. It needs the depndency installed so i added

- name: Install pango library
  run: sudo apt-get install -y libpango1.0-dev nasm

That works fine when i try to use rust.yaml, but it isnt working for this action. My guess is that it does not find libpango. It works with matrurin build on my machine, so the problem is the action

Install a sysroot for the target platform and configure it via
[480](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:487)
  PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
[481](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:488)
  cross-compiling wrapper for pkg-config and set it via
[482](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:489)
  PKG_CONFIG environment variable.
warning: pkg-config has not been configured to support cross-compilation.
[458](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:465)

[459](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:466)
error: failed to run custom build command for `glib-sys v0.18.0 (https://github.com/gtk-rs/gtk-rs-core.git#aa4b78e1)`
[460](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:467)

[461](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:468)
Caused by:
[462](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:469)
  process didn't exit successfully: `/home/runner/work/test/test/target/release/build/glib-sys-da763739ba4249f1/build-script-build` (exit status: 1)
[463](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:470)
  --- stdout
[464](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:471)
  cargo:rerun-if-env-changed=GLIB_2.0_NO_PKG_CONFIG
[465](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:472)
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_armv7-unknown-linux-gnueabihf
[466](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:473)
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_armv7_unknown_linux_gnueabihf
[467](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:474)
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
[468](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:475)
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
[469](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:476)
  cargo:rerun-if-env-changed=PKG_CONFIG_armv7-unknown-linux-gnueabihf
[470](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:477)
  cargo:rerun-if-env-changed=PKG_CONFIG_armv7_unknown_linux_gnueabihf
[471](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:478)
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
[472](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:479)
  cargo:rerun-if-env-changed=PKG_CONFIG
[473](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:480)
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_armv7-unknown-linux-gnueabihf
[474](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:481)
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_armv7_unknown_linux_gnueabihf
[475](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:482)
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
[476](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:483)
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
[477](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:484)
  cargo:warning=pkg-config has not been configured to support cross-compilation.
[478](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:485)

[479](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:486)
  Install a sysroot for the target platform and configure it via
[480](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:487)
  PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
[481](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:488)
  cross-compiling wrapper for pkg-config and set it via
[482](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:489)
  PKG_CONFIG environment variable.
[483](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:490)
warning: build failed, waiting for other jobs to finish...
[484](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:491)
💥 maturin failed
[485](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:492)
  Caused by: Failed to build a native library through cargo
[486](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:493)
  Caused by: Cargo build finished with "exit status: 101": `PYO3_CONFIG_FILE="/home/runner/work/test/test/target/maturin/pyo3-config-armv7-unknown-linux-gnueabihf-3.7.txt" "cargo" "rustc" "--target" "armv7-unknown-linux-gnueabihf" "--message-format" "json-render-diagnostics" "--manifest-path" "/home/runner/work/test/test/Cargo.toml" "--release" "--lib"`
[487](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:494)
Error: The process '/usr/bin/docker' failed with exit code 1
[488](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:495)
    at ExecState._setResult (/home/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1702:25)
[489](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:496)
    at ExecState.CheckComplete (/home/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1685:18)
[490](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:497)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1579:27)
[491](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:498)
    at ChildProcess.emit (node:events:527:28)
[492](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:499)
    at maybeClose (node:internal/child_process:1092:16)
[493](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:500)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
[494](https://github.com/Omicronlawful/test/actions/runs/5181785241/jobs/9337772301#step:5:501)
Error: The process '/usr/bin/docker' failed with exit code 1