Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
try sudo apt-get install libsdl1.2-dev libbz2-dev liblua5.1-0-dev build-essential libfftw3-dev and make it again. –  cadadr Oct 12 '12 at 22:51
add comment

2 Answers

up vote 0 down vote accepted

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

sudo apt-get install gcc-multilib

and make again.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.