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 failed with rust-safe 0.68.0 and 0.69.0 #913

Closed
aimixsaka opened this issue Dec 26, 2023 · 3 comments · Fixed by #916 or felixonmars/archriscv-packages#3392
Closed

Build failed with rust-safe 0.68.0 and 0.69.0 #913

aimixsaka opened this issue Dec 26, 2023 · 3 comments · Fixed by #916 or felixonmars/archriscv-packages#3392
Labels
bug Something isn't working build Related to building this repository.

Comments

@aimixsaka
Copy link

aimixsaka commented Dec 26, 2023

Description

I'm building neovide 0.12.0 (which depends on rust-safe 0.68.0) on Arch Linux RISC V.

  • My compiling command:
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
CFLAGS+=' -ffat-lto-objects'
export SKIA_USE_SYSTEM_LIBRARIES=true
export FORCE_SKIA_BUILD=true
export SKIA_GN_COMMAND=gn
export SKIA_NINJA_COMMAND=ninja
cargo build --frozen --release --features embed-fonts
  • Error Log:
...
--- stderr
  thread 'main' panicked at /build/.cargo/git/checkouts/rust-skia-627fca40798b1c0d/5bec56d/skia-bindings/build_support/skia_bindgen.rs:786:59:
  called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
...

How to reproduce directly on rust-skia

  1. install gn ninja git patch cargo python clang fontconfig freetype2 libjpeg cmake
export FORCE_SKIA_BUILD=true
export SKIA_USE_SYSTEM_LIBRARIES=true
export SKIA_NINJA_COMMAND=ninja
export SKIA_GN_COMMAND=gn
git clone https://github.com/rust-skia/rust-skia --recurse-submodules
cd rust-skia

#  Prevent calling fetch-gn if gn is specified in env 
patch -Np1 -i <(curl -L https://github.com/aimixsaka/rust-skia/commit/cf7b521d631f8a8d1bcc82449c3e2bc8b14cecd4.diff)
# Make fetch-gn optional in git-sync-deps 
patch -d skia-bindings/skia/ -Np1 -i <(curl -L https://github.com/aimixsaka/skia/commit/00c0df064e0595deff2aa14fb73ee8a6d90b80b9.diff)

cargo build -vv -p skia-safe --features gl --features textlayout
@aimixsaka aimixsaka changed the title Build failed with rust-safe 0.68.0 Build failed with rust-safe 0.68.0 and 0.69.0 Dec 26, 2023
@pragmatrix pragmatrix added the build Related to building this repository. label Dec 28, 2023
@pragmatrix
Copy link
Member

I suspect that the problem is that icu is not compiled when SKIA_USE_SYSTEM_LIBRARIES=true, but the icu.ninja file is expected to exist for reading out the declarations.

@pragmatrix
Copy link
Member

Can you try to build with the branch in #916?

@pragmatrix pragmatrix removed their assignment Dec 28, 2023
aimixsaka added a commit to aimixsaka/archriscv-packages that referenced this issue Dec 29, 2023
- Remove unneeded depends
- Remove ring 0.16 patch as upstream updated to 0.17
- Bump `rust-skia` to self-forked `0.68.0` [1]
  to catch up upstream [2].
  This fix:
  ```
  warning: Patch `SOMETHING` was not used in the crate graph.
  Check that the patched package version and available features
  are compatible with the dependency requirements
  ```
- Backport rust-skia/rust-skia#916 to fix rust-skia/rust-skia#913

- Remaining relevant pr/issue:
  - google/skia#146
  - https://gitlab.archlinux.org/archlinux/packaging/packages/neovide/-/issues/1

[1]: https://github.com/aimixsaka/rust-skia/tree/riscv-skia-bindings-0.68.0
[2]: https://github.com/neovide/neovide/blob/af9869bd6d8d3434b187e29f85032ee74e40b536/Cargo.toml#L59C68-L59C68
@aimixsaka
Copy link
Author

Can you try to build with the branch in #916?

Tested on both x86_64 and riscv64, truly fixed by #916. Thx :)

felixonmars pushed a commit to felixonmars/archriscv-packages that referenced this issue Dec 29, 2023
- Remove unneeded depends
- Remove ring 0.16 patch as upstream updated to 0.17
- Bump `rust-skia` to self-forked `0.68.0` [1]
  to catch up upstream [2].
  This fix:
  ```
  warning: Patch `SOMETHING` was not used in the crate graph.
  Check that the patched package version and available features
  are compatible with the dependency requirements
  ```
- Backport rust-skia/rust-skia#916 to fix rust-skia/rust-skia#913

- Remaining relevant pr/issue:
  - google/skia#146
  - https://gitlab.archlinux.org/archlinux/packaging/packages/neovide/-/issues/1

[1]: https://github.com/aimixsaka/rust-skia/tree/riscv-skia-bindings-0.68.0
[2]: https://github.com/neovide/neovide/blob/af9869bd6d8d3434b187e29f85032ee74e40b536/Cargo.toml#L59C68-L59C68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Related to building this repository.
Projects
None yet
2 participants