Amethyst: [BUG] Compiling `servo-fontconfig-sys` on Linux fails

Created on 30 May 2019  路  1Comment  路  Source: amethyst/amethyst

Description

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

Reproduction Steps

  • Install amethyst CLI tool: cargo install amethyst_cli
  • Create new project: amethyst new foo; cd foo
  • Try to build it: cargo build

What You Expected to Happen

Builds successfully

What Actually Happened

Build fails in servo-fontconfig-sys

Screenshots and Logs

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                                        

Your Environment

  1. Operating System: Debian Linux
  2. Operating System Version: 10
  3. Version of Amethyst: 0.10.0
needs triage bug

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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Emiller88 picture Emiller88  路  3Comments

Type1J picture Type1J  路  3Comments

kvark picture kvark  路  5Comments

jojolepro picture jojolepro  路  3Comments

cloudfreexiao picture cloudfreexiao  路  3Comments