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

[Cargo] error: failed to run custom build command for servo-fontconfig-sys v4.0.7 #10

Closed
Itanq opened this issue Jun 10, 2019 · 1 comment

Comments

@Itanq
Copy link

Itanq commented Jun 10, 2019

Can't build the example, as following:

zmant@zmant-PC:~/Projects/rust_demo$ cargo build 
   Compiling servo-fontconfig-sys v4.0.7
error: failed to run custom build command for `servo-fontconfig-sys v4.0.7`
process didn't exit successfully: `/home/zmant/Projects/rust_demo/target/debug/build/servo-fontconfig-sys-ab35303d25e9c957/build-script-build` (exit code: 101)
--- stdout
cd /home/zmant/Projects/rust_demo/target/debug/build/servo-fontconfig-sys-d6a6c48eec147b8b/out && \
	CC="gcc" \
	AR="ar" \
	FREETYPE_CFLAGS="" \
	FREETYPE_LIBS="" \
	CFLAGS=""" -fPIC" \
	/home/zmant/.cargo/registry/src/code.aliyun.com-738b7dba08a2a41e/servo-fontconfig-sys-4.0.7/configure \
	--disable-docs \
	--disable-shared \
	 \
	--host=x86_64-unknown-linux-gnu --sysconfdir=/etc --localstatedir=/var
.........
checking for FT_Bitmap_Size.y_ppem... yes
checking for EXPAT... no
checking expat.h usability... no
checking expat.h presence... no
checking for expat.h... no
checking xmlparse.h usability... no
checking xmlparse.h presence... no
checking for xmlparse.h... no
makefile.cargo:83: recipe for target '/home/zmant/Projects/rust_demo/target/debug/build/servo-fontconfig-sys-d6a6c48eec147b8b/out/Makefile' failed

--- stderr
configure: error: 
*** expat is required. or try to use --enable-libxml2
make: *** [/home/zmant/Projects/rust_demo/target/debug/build/servo-fontconfig-sys-d6a6c48eec147b8b/out/Makefile] Error 1
thread 'main' panicked at 'assertion failed: Command::new("make").env("MAKEFLAGS",
                         env::var("CARGO_MAKEFLAGS").unwrap_or_default()).args(&["-R",
                                                                                 "-f",
                                                                                 "makefile.cargo"]).status().unwrap().success()', /home/zmant/.cargo/registry/src/code.aliyun.com-738b7dba08a2a41e/servo-fontconfig-sys-4.0.7/build.rs:20:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

The dependencies:

zmant@zmant-PC:~/Projects/rust_demo$ cat Cargo.toml 
[package]
name = "rust_demo"
version = "0.1.0"
authors = ["zmant"]
edition = "2018"

[dependencies]
plotters =  "0.2"

Did I miss something?

@38
Copy link
Member

38 commented Jun 10, 2019

Yes, I should mention in the readme it depends on font-loader crate which uses a few other libraries.

You can find the instruction from here: https://crates.io/crates/font-loader

sudo apt-get install libfontconfig libfontconfig1-dev

Closing the issue, feel free to reopen it if it's not working.

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

2 participants