Open darkyzhou opened 1 year ago
Got bit by this today when trying to build mdbook-katex. Is there a reason you have to dynamically apply a diff during software build, rather than just having it pre-applied? Makes no sense to me why this is even being done to begin with.
error: failed to run custom build command for `libquickjs-sys v0.9.0`
Caused by:
process didn't exit successfully: `/tmp/cargo-installjeiq4Y/release/build/libquickjs-sys-4694cd90dd302129/build-script-build` (exit status: 101)
--- stderr
Applying patches...
Applying "js-tobigint64-overflow.patch"...
thread 'main' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/libquickjs-sys-0.9.0/build.rs:133:14:
Could not apply patches: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `mdbook-katex v0.5.10`, intermediate artifacts can be found at `/tmp/cargo-installjeiq4Y`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Summary Successfully installed mdbook, mdbook-admonish, mdbook-catppuccin, mdbook-embed! Failed to install mdbook-katex (see error(s) above).
I got following errors when building my project with the library:
And it turns out that
build.rs
relies onpatch
binary to patch the source codes of QuickJS, and the build image I am using(debian-slim) does not offerpatch
binary by default. So I have to install it first before compiling.I suggest manually checking for the presence of the binary before actually calling it in the
build.rs
.