Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

[deppin][cargo] configure: error: expat is required. or try to use --enable-libxml2 #41

Closed
Itanq opened this issue Jun 10, 2019 · 2 comments

Comments

@Itanq
Copy link

Itanq commented Jun 10, 2019

I use the deppin linux, build the libfontconfig error, the error information as following:

zmant@zmant-PC:~/.cargo/registry/src/code.aliyun.com-738b7dba08a2a41e/servo-fontconfig-sys-4.0.7$ cargo build
    Updating `https://code.aliyun.com/rustcc/crates.io-index.git` index
   Compiling cc v1.0.37
   Compiling pkg-config v0.3.14
   Compiling servo-fontconfig-sys v4.0.7 (/home/zmant/.cargo/registry/src/code.aliyun.com-738b7dba08a2a41e/servo-fontconfig-sys-4.0.7)
   Compiling cmake v0.1.40
   Compiling expat-sys v2.1.6
   Compiling servo-freetype-sys v4.0.5
error: failed to run custom build command for `servo-fontconfig-sys v4.0.7 (/home/zmant/.cargo/registry/src/code.aliyun.com-738b7dba08a2a41e/servo-fontconfig-sys-4.0.7)`
process didn't exit successfully: `/home/zmant/.cargo/registry/src/code.aliyun.com-738b7dba08a2a41e/servo-fontconfig-sys-4.0.7/target/debug/build/servo-fontconfig-sys-629d23b1c91d4858/build-script-build` (exit code: 101)
--- stdout
cd /home/zmant/.cargo/registry/src/code.aliyun.com-738b7dba08a2a41e/servo-fontconfig-sys-4.0.7/target/debug/build/servo-fontconfig-sys-e2e076ea1cae67fa/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 a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
.......
hecking 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/.cargo/registry/src/code.aliyun.com-738b7dba08a2a41e/servo-fontconfig-sys-4.0.7/target/debug/build/servo-fontconfig-sys-e2e076ea1cae67fa/out/Makefile' failed

--- stderr
configure: error: 
*** expat is required. or try to use --enable-libxml2
make: *** [/home/zmant/.cargo/registry/src/code.aliyun.com-738b7dba08a2a41e/servo-fontconfig-sys-4.0.7/target/debug/build/servo-fontconfig-sys-e2e076ea1cae67fa/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()', build.rs:20:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

I has installed expat libxml2-dev libfreetype6-dev fontconfig fontconfig libxml2 libXpm*

@jdm
Copy link
Member

jdm commented Jun 10, 2019

It looks like you need to install an expat development package.

@Itanq
Copy link
Author

Itanq commented Jun 10, 2019

Thank you, I have installed the expat package, I found the solution:
$ sudo apt install pkg-config libasound2-dev libssl-dev cmake libfreetype6-dev libexpat1-dev libxcb-composite0-dev

the solution from https://community.amethyst.rs/t/default-amethyst-new-name-programm-has-trouble-compiling/532

Thanks !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants