-
Notifications
You must be signed in to change notification settings - Fork 4
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
cargo build occur error #2
Comments
Thanks for reporting the issue @defpis , do you have harfbuzz installed on your machine ? |
First, use pkg-config --cflags harfbuzz If you are using homebrew, then sometimes it's unaware of broken symlinks for dependencies that harfbuzz used.
As far as I know, the harfbuzz's Rust bindings is compiled without FreeType integration APIs. That's to say, you have to setup local patch for provok diff --git a/Cargo.toml b/Cargo.toml
index a3ba62b..185b327 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,3 +23,6 @@ serde = {version = "1.0.126", features = ["derive"]}
serde_json = "1.0.64"
thiserror = "1.0"
ttf-parser = "0.12.0"
+
+[patch.crates-io]
+harfbuzz-sys = { path = "../rust-harfbuzz/harfbuzz-sys" } Local harfbuzz-sys: diff --git a/harfbuzz-sys/makefile.cargo b/harfbuzz-sys/makefile.cargo
index d0ec7a8..45c5ba2 100644
--- a/harfbuzz-sys/makefile.cargo
+++ b/harfbuzz-sys/makefile.cargo
@@ -32,7 +32,7 @@ CONFIGURE_FLAGS = \
--enable-static \
--disable-shared \
--without-icu \
- --without-freetype \
+ --without-freetype=auto \
--without-glib \
--with-coretext=auto
diff --git a/harfbuzz-sys/wrapper.h b/harfbuzz-sys/wrapper.h
index d2cfc6e..bfbc21c 100644
--- a/harfbuzz-sys/wrapper.h
+++ b/harfbuzz-sys/wrapper.h
@@ -1,3 +1,4 @@
#include "harfbuzz/src/hb.h"
+#include "harfbuzz/src/hb-ft.h"
#include "harfbuzz/src/hb-ot.h"
#include "harfbuzz/src/hb-aat.h" Re-generate |
when I run
make install
occur error:system_profiler:
The text was updated successfully, but these errors were encountered: