2

I want to compile a game from github. I followed this guide http://powdertoy.co.uk/Wiki/W/Compiling_for_Linux.html 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

1
  • try sudo apt-get install libsdl1.2-dev libbz2-dev liblua5.1-0-dev build-essential libfftw3-dev and make it again.
    – user91091
    Oct 12, 2012 at 22:51

2 Answers 2

2

Are you on a 64 Bit system? Try to install gcc-multilib

sudo apt-get install gcc-multilib

and make again.

1
  • sudo apt-get install build-essential Dec 4, 2018 at 13:19
0

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 1

Also, 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.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .