mupdf-rs icon indicating copy to clipboard operation
mupdf-rs copied to clipboard

bin2coff exists with code 1, executed with invalid path

Open swip3798 opened this issue 2 years ago • 3 comments
trafficstars

When trying to add the mupdf crate to an empty project and building it on windows, I get the following error:

C:\dev\Rust\mupdf-test\target\debug\build\mupdf-sys-61a5ef3cbd8e3793\out\build\platform\win32\bin2coff.targets(76,5): error MSB3721: The command "Release\bin2coff.exe "C:\dev\Rust\mupdf-test\target\debug\build\mupdf-sys-61a5ef3cbd8e3793\out\build\resources\fonts\droid\DroidSansFallback.ttf" "x64\Release\libresources\DroidSansFallback_ttf.obj" _binary_DroidSansFallback_ttf x64" exited with code 1. [C:\dev\Rust\mupdf-test\target\debug\build\mupdf-sys-61a5ef3cbd8e3793\out\build\platform\win32\libresources.vcxproj]

The mentioned directory for the font "C:\dev\Rust\mupdf-test\target\debug\build\mupdf-sys-61a5ef3cbd8e3793\out\build\resources\fonts\droid\DroidSansFallback.ttf" doesn't exists in the build directory.

I couldn't find something similar online, so I thought I might ask here.

swip3798 avatar Jul 17 '23 08:07 swip3798

I have same problem. When I put resouces/fonts on https://github.com/ArtifexSoftware/mupdf in mupdf-rs-sys-0.4.2/src, I can compile mupdf-rs.

I found these fonts files are excluded in Cargo.toml of mupdf-rs.

[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/*",

kusaanko avatar Aug 07 '23 14:08 kusaanko

Unfortunately crates.io has a size limit, so we can't include all of the fonts.

For now, you can try to use git dependency instead.

messense avatar Aug 12 '23 05:08 messense

Hey i have the same issues with the driod sans fallback.ttf - what was the work around in this case??

meanjellybean1 avatar Jan 22 '24 01:01 meanjellybean1