Skip to content

"renderer-skia" static linking failed #9394

Closed

Description

@coder-hxl

Bug Description

I searched and found that there is rust-skia/rust-skia#1119 where a similar problem was encountered. Mine seems not to have had a permission issue, but the build also failed.

Could this be caused by the renderer-skia component of slint?

.cargo\config.toml

[target.'cfg(windows)']
rustflags = ["-C", "target-feature=+crt-static"]

cargo build --release error log:

error: failed to run custom build command for `skia-bindings v0.87.0`

Caused by:
  process didn't exit successfully: `E:\Project\recovery\src-installer\slint-rust\target\release\build\skia-bindings-56d18114351cc6b1\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=DOCS_RS
  cargo:rerun-if-env-changed=SKIA_DEBUG
  cargo:rerun-if-env-changed=SKIA_SOURCE_DIR
  cargo:rerun-if-env-changed=FORCE_SKIA_BUILD
  cargo:rerun-if-env-changed=FORCE_SKIA_BINARIES_DOWNLOAD
  TRYING TO DOWNLOAD AND INSTALL SKIA BINARIES: 0.87.0/e551f334ad5cbdf43abf-x86_64-pc-windows-msvc-d3d-gl-pdf-textlayout-static
  cargo:rerun-if-env-changed=SKIA_BINARIES_URL
    FROM: https://github.com/rust-skia/skia-binaries/releases/download/0.87.0/skia-binaries-e551f334ad5cbdf43abf-x86_64-pc-windows-msvc-d3d-gl-pdf-textlayout-static.tar.gz
  DOWNLOAD AND INSTALL FAILED: curl error code: "22"
  curl stderr: "curl: (22) The requested URL returned error: 404\r\n"
  STARTING A FULL BUILD
  HOST: x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=CLANGCC
  cargo:rerun-if-env-changed=CC
  cargo:rerun-if-env-changed=CLANGCXX
  cargo:rerun-if-env-changed=CXX
  cargo:rerun-if-env-changed=OPT_LEVEL
  cargo:rerun-if-env-changed=SKIA_USE_SYSTEM_LIBRARIES
  cargo:rerun-if-env-changed=SDKTARGETSYSROOT
  cargo:rerun-if-env-changed=SDKROOT
  cargo:rerun-if-env-changed=VCINSTALLDIR
  cargo:rerun-if-env-changed=LLVM_HOME
  cargo:rerun-if-env-changed=USERPROFILE

  --- stderr
  Checking for "C:\\Program Files\\LLVM\\bin\\clang-cl.exe"
  Checking for "C:\\LLVM\\bin\\clang-cl.exe"
  Checking for "C:\\Users\\Administrator\\scoop\\apps\\llvm\\current\\bin\\clang-cl.exe"

  thread 'main' panicked at C:\Users\Administrator\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\skia-bindings-0.87.0\build_support\platform\windows.rs:32:13:
  Unable to locate LLVM installation
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I have tried using LLVM, but it has had some issues:

  --- stderr
  Checking for "D:/Install/LLVM\\bin\\clang-cl.exe"

  thread 'main' panicked at C:\Users\Administrator\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\skia-bindings-0.87.0\build_support\skia\config.rs:385:9:
  >>>>> Probing for Python 3 failed, please make sure that it's available in PATH, probed executables are: ["python", "python3"] <<<<<
  note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Is a Python environment still required when using LLVM for compilation?

Reproducible Code (if applicable)

Environment Details

  • Slint Version: 1.13.0
  • Platform/OS: Windows10
  • Programming Language: Rust
  • Backend/Renderer: renderer-skia

Product Impact

No response

Activity

  1. added theissue type on Sep 12, 2025
  2. added
    need triagingIssue that the owner of the area still need to triage
    on Sep 12, 2025
  3. tronical commented on Sep 12, 2025

    @tronical
    Member

    Could this be caused by the renderer-skia component of slint?

    Yes. I suspect that the rust flags cause a rebuild. Generally, some configurations may require re-compiling skia - as opposed to the default of downloading pre-built versions. You're running into that, and for that your environment needs to be set up to compile Skia. This starts with making a version of Python 3 available in your %PATH%.

  4. locked and limited conversation to collaborators on Sep 12, 2025
  5. converted this issue into a discussion #9401 on Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:renderer-skiaSkia Renderer (mS)need triagingIssue that the owner of the area still need to triage

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions