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

I can't compile mupdf-rs on Windows 11 #73

Closed
kusaanko opened this issue Aug 7, 2023 · 1 comment
Closed

I can't compile mupdf-rs on Windows 11 #73

kusaanko opened this issue Aug 7, 2023 · 1 comment

Comments

@kusaanko
Copy link

kusaanko commented Aug 7, 2023

When I run cargo tauri dev on my project, I got this error.

Compiling mupdf-sys v0.4.2
error: failed to run custom build command for `mupdf-sys v0.4.2`

Caused by:
  process didn't exit successfully: `C:\Users\kusaanko\***\target\debug\build\mupdf-sys-9e5eebcec878fe08\build-script-build` (exit code: 101)
  --- stderr
  thread 'main' panicked at 'Build error:
  STDERR:
  STDOUT:', C:\Users\kusaanko\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mupdf-sys-0.4.2\build.rs:330:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I found some font files are lost, so I put resources/fonts on https://github.com/ArtifexSoftware/mupdf in mupdf-sys-0.4.2/src.
Then, I can run cargo tauri dev.

And I found these font files are excluded in Cargo.toml

[package]
edition = "2018"
name = "mupdf-sys"
version = "0.4.2"
authors = ["messense <[email protected]>"]
links = "mupdf-wrapper"
exclude = [
    "mupdf/resources/cmaps/*",
    "mupdf/resources/icc/*",
    "mupdf/resources/fonts/droid/*",
    "mupdf/resources/fonts/han/*",
    "mupdf/resources/fonts/noto/*",
    "mupdf/resources/fonts/sil/*",
    "mupdf/resources/fonts/urw/input/*",

When I build libresources using Visual Studio 2022, I got this error(sorry for Japanese)

重大度レベル	コード	説明	プロジェクト	ファイル	行	抑制状態
エラー	MSB3721	コマンド "Release\bin2coff.exe "C:\Users\kusaanko\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mupdf-sys-0.4.2\mupdf\resources\fonts\droid\DroidSansFallback.ttf" "x64\Release\libresources\DroidSansFallback_ttf.obj" _binary_DroidSansFallback_ttf x64" はコード 1 で終了しました。	libresources	C:\Users\kusaanko\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mupdf-sys-0.4.2\mupdf\platform\win32\bin2coff.targets	76	

I can compile mupdf-rs on macOS without any changes.

@kusaanko
Copy link
Author

kusaanko commented Aug 7, 2023

Same to #72
I'll move to #72.

@kusaanko kusaanko closed this as completed Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant