I want to compile a game from github. I followed this guide and when I get to the end when I need to use the make command to compile i get the following error
pavle@Pavle:~/TPT$ make powder-sse
gcc -c -w -std=c99 -D_POSIX_C_SOURCE=200112L -DLUACONSOLE -DGRAVFFT -Iincludes/ -D_GNU_SOURCE -m32 -DLIN32 -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -march=native -DX86 -DX86_SSE -o build/obj/air.powder-sse.o src/air.c
In file included from /usr/include/math.h:28:0, from src/air.c:18:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make: *** [build/obj/air.powder-sse.o] Error 1
pavle@Pavle:~/TPT$ What am I doing wrong I tried using sse2, sse3, 64bit nad opengl(looked it up in the make file) nothing worked. Help please
12 Answers
Are you on a 64 Bit system? Try to install gcc-multilib
sudo apt-get install gcc-multiliband make again.
There are one or two things to note: on 64 bit systems, you may need slightly different libraries as another answer mentions, so I should make sure you have all the dependencies (as noted in the comments).
In particular, you seem to be missing the critical libfftw3-dev, which provides the 'air' files and headers, and so you get this error:
make: *** [build/obj/air.powder-sse.o] Error 1Also, you must use a version of SSE that your CPU can utilise- I just successfully compiled it by using make powder-sse2 and then running it with ./powder-sse2. However, by default just typing make will create an SSE3 version that will not work on CPUs without that extension.
So I should check your dependencies and then run make clean and try the compile again, with a suitable SSE value for your CPU.