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

fails trying to build skia-bindings crate that isn't required #318

Open
brianmay opened this issue Mar 28, 2023 · 1 comment
Open

fails trying to build skia-bindings crate that isn't required #318

brianmay opened this issue Mar 28, 2023 · 1 comment
Labels
question Further information is requested

Comments

@brianmay
Copy link

brianmay commented Mar 28, 2023

Project dir: https://github.com/brianmay/robotica-rust/tree/b772cea414f261da0096d96b1ee37fe2ca6a1ec7

error: builder for '/nix/store/f2zbmxj2bph4393nx5jlyjj6iz83423a-crate-skia-bindings-0.58.0.drv' failed with exit code 101;
       last 10 log lines:
       >   cargo:rerun-if-env-changed=SKIA_NINJA_COMMAND
       >   cargo:rerun-if-env-changed=SKIA_GN_COMMAND
       >   Probing 'python'
       >   Python 3 found: "python"
       >   Synchronizing Skia dependencies
       >   DOWNLOADING: https://codeload.github.com/rust-skia/skia/tar.gz/m109-0.57.1
       >
       >   --- stderr
       >   thread 'main' panicked at 'Failed to download https://codeload.github.com/rust-skia/skia/tar.gz/m109-0.57.1 (https://codeload.github.com/rust-skia/skia/tar.gz/m109-0.57.1: Dns Failed: resolve dns name 'codeload.github.com:443': failed to lookup address information: Temporary failure in name resolution)', build_support/binary_cache/download.rs:68:35
       >   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       For full logs, run 'nix log /nix/store/f2zbmxj2bph4393nx5jlyjj6iz83423a-crate-skia-bindings-0.58.0.drv'.
error: 1 dependencies of derivation '/nix/store/fajkyqznd8jb04kwz8jv430kwkl2krxz-crate-skia-safe-0.58.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/00vgbsxgvkcbq31yrjfjwij2j71lkhvs-crate-i-slint-renderer-skia-0.3.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/13w9gkc12c1h6drsykk0l0mqcviaiv9r-crate-i-slint-backend-winit-0.3.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gyxan3r5m0kfhx7h8vl6mk1kba05qcyn-crate-i-slint-backend-selector-0.3.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/v7s8i3yzq380jyb73fl6s206az783g0l-crate-slint-0.3.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/kzwjchdiw800vgj1p73krcngpbpqkba2-crate-robotica-slint-0.1.0.drv' failed to build

But that crate normally should not be required by this project:

$ cargo tree  -p robotica-slint  | grep skia-bindings
<no matches>

Not sure where to go from here. I think skia isn't packaged in nix, but I don't really need it either.

@psionic-k
Copy link
Member

Looks like a built-time network fetch, which fails due to sandbox.

If you indeed don't need skia bindings, the workaround is probably to eliminate that dependency manually by patching your Cargo.nix. You can just remove it from all depednencies lists.

Underlying issue could be platform dependencies, which are not encoded in the Cargo.nix expressions yet (currently working on this).

In case you need skia, you need to do an override to fix the build script to succeed in the cargo2nix nix builder (mkcrate.nix). The build script for the skia bindings crate seems to support SKIA_LIBRARY_SEARCH_PATH to explicitly provide it. An override could likely avoid the network attempt if it provided the lib and then the package config hook enabled discovery without setting SKIA_LIBRARY_SEARCH_PATH

@psionic-k psionic-k added the question Further information is requested label Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants