Building a fresh Amethyst project on Debian Linux fails since it can't find Freetype2. This makes servo-fontconfig-sys bomb out.
Fixed by running sudo apt install libfreetype6-dev on the system before building Amethyst. Might want to add that to https://book.amethyst.rs/stable/getting-started.html
cargo install amethyst_cliamethyst new foo; cd foocargo buildBuilds successfully
Build fails in servo-fontconfig-sys
Build screed:
error: failed to run custom build command for `servo-fontconfig-sys v4.0.7`
process didn't exit successfully: `/home/srv/hg/icefox/srht/icefox/RustGameFrameworkGuide/astro_amethyst/target/debug/build/servo-fontconfig-sys-6c40d8c89880fa23/build-script-build` (exit code: 101)
--- stdout
cd /home/srv/hg/icefox/srht/icefox/RustGameFrameworkGuide/astro_amethyst/target/debug/build/servo-fontconfig-sys
-77d72d54a2471225/out && \
CC="gcc" \
AR="ar" \
FREETYPE_CFLAGS="" \
FREETYPE_LIBS="" \
CFLAGS=""" -fPIC" \
/home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/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
checking for x86_64-unknown-linux-gnu-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
...piles of autotools garbage...
checking for struct statfs.f_flags... yes
checking for struct statfs.f_fstypename... no
checking for struct dirent.d_type... yes
checking for FREETYPE... no
--- stderr
configure: error: Package requirements (freetype2) were not met:
No package 'freetype2' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables FREETYPE_CFLAGS
and FREETYPE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make: *** [makefile.cargo:83: /home/srv/hg/icefox/srht/icefox/RustGameFrameworkGuide/astro_amethyst/target/debu$
/build/servo-fontconfig-sys-77d72d54a2471225/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().un$
rap().success()', /home/icefox/.cargo/registry/src/github.com-1ecc6299db9ec823/servo-fontconfig-sys-4.0.7/build$
rs:20:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
It's on our README (https://github.com/amethyst/amethyst/blob/master/README.md#dependencies) and we now link to the dependencies from the book.
Most helpful comment
It's on our README (https://github.com/amethyst/amethyst/blob/master/README.md#dependencies) and we now link to the dependencies from the book.