Default amethyst new [name] programm has trouble compiling

(Julius Guthunz) #1

Hey, everyone
I have already tried amethyst some time ago on my Windows PC without a hassle but I ditched it for Linux. Though when I wanted to refresh my knowledge and compile the default amethyst new [project name] the compiler gives out an error that frankly I have never seen before and unlike the usual errors is a bit confusing and contains typo errors. I thought that maybe installing the packages it is missing would get me there but honestly I don’t really know what to do. Thanks for the help in advance, this community is amazing.
Here is the error:

> julius@julius-T100TAM:~/eclipse-workspace/rust/pong01$ cargo run
>    Compiling servo-fontconfig-sys v4.0.7                                        
>    Compiling minterpolate v0.3.0                                                
>    Compiling parking_lot_core v0.2.14                                           
>    Compiling parking_lot_core v0.3.1                                            
>    Compiling shred v0.7.1                                                       
>    Compiling lewton v0.9.3                                                      
>    Compiling unicode-normalization v0.1.8                                       
>    Compiling gl_generator v0.9.0                                                                                                                                         
> error: failed to run custom build command for `servo-fontconfig-sys v4.0.7`                                                                                              
> process didn't exit successfully: `/home/julius/eclipse-workspace/rust/pong01/target/debug/build/servo-fontconfig-sys-fc7f6bb3e38fcf48/build-script-build` (exit code: 101)
> --- stdout
> cd /home/julius/eclipse-workspace/rust/pong01/target/debug/build/servo-fontconfig-sys-958ca5fef19403ff/out && \
> 	CC="gcc" \
> 	AR="ar" \
> 	FREETYPE_CFLAGS="" \
> 	FREETYPE_LIBS="" \
> 	CFLAGS=""" -fPIC" \
> 	/home/julius/.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... /bin/mkdir -p
> checking for gawk... no
> checking for mawk... mawk
> checking whether make sets $(MAKE)... yes
> checking whether make supports nested variables... yes
> checking whether make supports nested variables... (cached) yes
> checking whether to enable maintainer-specific portions of Makefiles... no
> checking for x86_64-unknown-linux-gnu-gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables... 
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking whether gcc understands -c and -o together... yes
> checking for style of include used by make... GNU
> checking dependency style of gcc... gcc3
> checking how to run the C preprocessor... gcc -E
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking minix/config.h usability... no
> checking minix/config.h presence... no
> checking for minix/config.h... no
> checking whether it is safe to define __EXTENSIONS__... yes
> checking for special C compiler options needed for large files... no
> checking for _FILE_OFFSET_BITS value needed for large files... no
> checking whether ln -s works... yes
> checking whether make sets $(MAKE)... (cached) yes
> checking for x86_64-unknown-linux-gnu-pkg-config... no
> checking for pkg-config... /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for RM macro... rm -f
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking how to print strings... printf
> checking for a sed that does not truncate output... /bin/sed
> checking for fgrep... /bin/grep -F
> checking for ld used by gcc... /usr/bin/ld
> checking if the linker (/usr/bin/ld) is GNU ld... yes
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
> checking the name lister (/usr/bin/nm -B) interface... BSD nm
> checking the maximum length of command line arguments... 1572864
> checking whether the shell understands some XSI constructs... yes
> checking whether the shell understands "+="... yes
> checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
> checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
> checking for /usr/bin/ld option to reload object files... -r
> checking for x86_64-unknown-linux-gnu-objdump... no
> checking for objdump... objdump
> checking how to recognize dependent libraries... pass_all
> checking for x86_64-unknown-linux-gnu-dlltool... no
> checking for dlltool... no
> checking how to associate runtime and link libraries... printf %s\n
> checking for x86_64-unknown-linux-gnu-ar... ar
> checking for archiver @FILE support... @
> checking for x86_64-unknown-linux-gnu-strip... strip
> checking for x86_64-unknown-linux-gnu-ranlib... no
> checking for ranlib... ranlib
> checking command to parse /usr/bin/nm -B output from gcc object... ok
> checking for sysroot... no
> checking for x86_64-unknown-linux-gnu-mt... no
> checking for mt... mt
> checking if mt is a manifest tool... no
> checking for dlfcn.h... yes
> checking for objdir... .libs
> checking if gcc supports -fno-rtti -fno-exceptions... no
> checking for gcc option to produce PIC... -fPIC -DPIC
> checking if gcc PIC flag -fPIC -DPIC works... yes
> checking if gcc static flag -static works... yes
> checking if gcc supports -c -o file.o... yes
> checking if gcc supports -c -o file.o... (cached) yes
> checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
> checking dynamic linker characteristics... cflags:  -fPIC
> cppflags: 
> ldflags:  -Wl,-rpath -Wl,/foo
> libs: 
> GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... no
> checking whether to build static libraries... yes
> checking for dirent.h that defines DIR... yes
> checking for library containing opendir... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> none required
> checking for ANSI C header files... (cached) yes
> checking fcntl.h usability... yes
> checking fcntl.h presence... yes
> checking for fcntl.h... yes
> checking regex.h usability... yes
> checking regex.h presence... yes
> checking for regex.h... yes
> checking for stdlib.h... (cached) yes
> checking for string.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking sys/statvfs.h usability... yes
> checking sys/statvfs.h presence... yes
> checking for sys/statvfs.h... yes
> checking sys/vfs.h usability... yes
> checking sys/vfs.h presence... yes
> checking for sys/vfs.h... yes
> checking sys/statfs.h usability... yes
> checking sys/statfs.h presence... yes
> checking for sys/statfs.h... yes
> checking sys/param.h usability... yes
> checking sys/param.h presence... yes
> checking for sys/param.h... yes
> checking sys/mount.h usability... yes
> checking sys/mount.h presence... yes
> checking for sys/mount.h... yes
> checking for stdint types... stdint.h (shortcircuit)
> make use of stdint.h in src/fcstdint.h (assuming C99 compatible system)
> checking for an ANSI C-conforming const... yes
> checking for inline... inline
> checking for flexible array members... yes
> checking for pid_t... yes
> checking for vprintf... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> conftest.c:65:6: warning: conflicting types for built-in function 'vprintf' [-Wbuiltin-declaration-mismatch]
>  char vprintf ();
>       ^~~~~~~
> yes
> checking for _doprnt... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> /usr/bin/ld: /tmp/ccg0B9bI.o: in function `main':
> conftest.c:(.text+0xa): undefined reference to `_doprnt'
> collect2: error: ld returned 1 exit status
> no
> checking for stdlib.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking for sys/param.h... (cached) yes
> checking for getpagesize... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for working mmap... yes
> checking for link... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for mkstemp... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for mkostemp... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for _mktemp_s... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> /usr/bin/ld: /tmp/cc1pRJoc.o: in function `main':
> conftest.c:(.text+0xa): undefined reference to `_mktemp_s'
> collect2: error: ld returned 1 exit status
> no
> checking for mkdtemp... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for getopt... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for getopt_long... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for getprogname... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> /usr/bin/ld: /tmp/ccH4VLqY.o: in function `main':
> conftest.c:(.text+0xa): undefined reference to `getprogname'
> collect2: error: ld returned 1 exit status
> no
> checking for getexecname... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> /usr/bin/ld: /tmp/ccQNSWwc.o: in function `main':
> conftest.c:(.text+0xa): undefined reference to `getexecname'
> collect2: error: ld returned 1 exit status
> no
> checking for rand... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for random... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for lrand48... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for random_r... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for rand_r... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for readlink... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for regcomp... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for regerror... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for regexec... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for regfree... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for fstatvfs... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for fstatfs... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for lstat... cflags:  -fPIC
> cppflags: 
> ldflags: 
> libs: 
> yes
> checking for posix_fadvise in fcntl.h... fcntl.h
> checking for scandir... yes
> checking for struct statvfs.f_basetype... no
> checking for struct statvfs.f_fstypename... no
> checking for struct statfs.f_flags... yes
> checking for struct statfs.f_fstypename... no
> checking for struct dirent.d_type... yes
> checking for FREETYPE... yes
> checking for FT_Get_Next_Char... cflags:  -fPIC -I/usr/include/freetype2 -I/usr/include/libpng16
> cppflags: 
> ldflags: 
> libs:  -lfreetype
> yes
> checking for FT_Get_BDF_Property... cflags:  -fPIC -I/usr/include/freetype2 -I/usr/include/libpng16
> cppflags: 
> ldflags: 
> libs:  -lfreetype
> yes
> checking for FT_Get_PS_Font_Info... cflags:  -fPIC -I/usr/include/freetype2 -I/usr/include/libpng16
> cppflags: 
> ldflags: 
> libs:  -lfreetype
> yes
> checking for FT_Has_PS_Glyph_Names... cflags:  -fPIC -I/usr/include/freetype2 -I/usr/include/libpng16
> cppflags: 
> ldflags: 
> libs:  -lfreetype
> yes
> checking for FT_Get_X11_Font_Format... cflags:  -fPIC -I/usr/include/freetype2 -I/usr/include/libpng16
> cppflags: 
> ldflags: 
> libs:  -lfreetype
> yes
> checking for FT_Select_Size... cflags:  -fPIC -I/usr/include/freetype2 -I/usr/include/libpng16
> cppflags: 
> ldflags: 
> libs:  -lfreetype
> yes
> 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
> 
> --- stderr
> configure: error: 
> *** expat is required. or try to use --enable-libxml2
> make: *** [makefile.cargo:83: /home/julius/eclipse-workspace/rust/pong01/target/debug/build/servo-fontconfig-sys-958ca5fef19403ff/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/julius/.cargo/registry/src/github.com-1ecc6299db9ec823/servo-fontconfig-sys-4.0.7/build.rs:20:5
> note: Run with `RUST_BACKTRACE=1` for a backtrace.
> 
> warning: build failed, waiting for other jobs to finish...
> error: build failed
0 Likes

(Julius Guthunz) #2

I already have expat installed btw

0 Likes

(Théo Degioanni) #3

Routine check: have you installed the Linux-specific dependencies?
On Ubuntu or Debian, simply run:

$ sudo apt install pkg-config libasound2-dev libssl-dev cmake libfreetype6-dev libexpat1-dev libxcb-composite0-dev

or on Fedora

$ sudo dnf install alsa-lib-devel openssl-devel cmake freetype-devel expat-devel libxcb-devel
3 Likes

(Julius Guthunz) #4

I actually don’t have all of these, thanks!

1 Like