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

build-rust-crate: ensure info about build.rs failures reaches the log #190592

Closed
wants to merge 1 commit into from
Closed

build-rust-crate: ensure info about build.rs failures reaches the log #190592

wants to merge 1 commit into from

Commits on Sep 10, 2022

  1. build-rust-crate: ensure info about build.rs failures reaches the log

    When execution of a `build.rs` script fails, information about the failure is
    sent to stdout (using "cargo:foo=" prefixes) rather than stderr.  Because of
    this, information needed to diagnose the failure is not available in `nix log`.
    An example of that information is found below.
    
    Let's do the simplest thing possible, and replace `>` with `tee` so the output
    of executing `build.rs` gets copied to the log.
    
      cargo:warning=Could not run `"pkg-config" "--libs" "--cflags" "cairo" "cairo >= 1.14"`
      The pkg-config command could not be found.
    
      Most likely, you need to install a pkg-config package for your OS.
      Try `apt install pkg-config`, or `yum install pkg-config`,
      or `pkg install pkg-config` depending on your distribution.
    
      If you've already installed it, ensure the pkg-config command is one of the
      directories in the PATH environment variable.
    
      If you did not expect this build to link to a pre-installed system library,
      then check documentation of the cairo-sys-rs crate for an option to
      build the library from source, or disable features or dependencies
      that require pkg-config.
    Adam Joseph committed Sep 10, 2022
    Configuration menu
    Copy the full SHA
    b89077c View commit details
    Browse the repository at this point in the history