home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Compiling under Linux?

by thojoh370 on 07/07/2007 06:00, 24 messages, last message: 08/16/2007 04:24, 9036 views, last view: 05/05/2024 08:09

Hi,
I have been using Code::Blocks to edit the Sauerbraten source code this far. I have been able to compile and run under Windows (XP), but how do I compile the Linux version? Is Code::Blocks capable of that, or will I have to compile it in some other application in Linux? And if so, what is the name of it?

Go to first 20 messagesGo to previous 20 messages    Board Index   

#5: :)

by Osbios on 07/07/2007 22:29

For me it was the hard part to compiling sauerbraten on windows. :)

reply to this message

#6: Re: :)

by windows_sux|mac_sux|linux_sux|bsd_sux on 07/07/2007 23:31, refers to #5

I agree. "make" ftw. :P

reply to this message

#7: Error in compilation :(

by I wanna run in linux on 08/12/2007 07:41

Hi,

I do the make install command to generate executable, but i have the following message:

make -C enet/ all
make[1]: Entering directory `/home/wolf/Desktop/sauerbraten/src/enet'
Making all in include
make[2]: Entering directory `/home/wolf/Desktop/sauerbraten/src/enet/include'
Making all in enet
make[3]: Entering directory `/home/wolf/Desktop/sauerbraten/src/enet/include/enet'
make[3]: Nada a ser feito para `all'.
make[3]: Leaving directory `/home/wolf/Desktop/sauerbraten/src/enet/include/enet'
make[3]: Entering directory `/home/wolf/Desktop/sauerbraten/src/enet/include'
make[3]: Nada a ser feito para `all-am'.
make[3]: Leaving directory `/home/wolf/Desktop/sauerbraten/src/enet/include'
make[2]: Leaving directory `/home/wolf/Desktop/sauerbraten/src/enet/include'
make[2]: Entering directory `/home/wolf/Desktop/sauerbraten/src/enet'
make[2]: Nada a ser feito para `all-am'.
make[2]: Leaving directory `/home/wolf/Desktop/sauerbraten/src/enet'
make[1]: Leaving directory `/home/wolf/Desktop/sauerbraten/src/enet'
g++ -O3 -fomit-frame-pointer -Wall -fsigned-char -Ienet/include -I. -Ishared -Iengine -Ifpsgame `sdl-config --cflags` -c -o engine/3dgui.o engine/3dgui.cpp
In file included from engine/engine.h:9,
from engine/3dgui.cpp:7:
engine/texture.h:9: error: syntax error before `;' token
engine/texture.h:10: error: syntax error before `;' token
engine/texture.h:11: error: syntax error before `;' token
engine/texture.h:12: error: syntax error before `;' token
engine/texture.h:13: error: syntax error before `;' token
engine/texture.h:14: error: syntax error before `;' token
engine/texture.h:15: error: syntax error before `;' token
engine/texture.h:16: error: syntax error before `;' token
engine/texture.h:17: error: syntax error before `;' token
engine/texture.h:18: error: syntax error before `;' token
engine/texture.h:19: error: syntax error before `;' token
engine/texture.h:20: error: syntax error before `;' token
engine/texture.h:21: error: syntax error before `;' token
engine/texture.h:86: error: parse error before `,' token
In file included from engine/3dgui.cpp:7:
engine/engine.h:19: error: syntax error before `;' token
engine/engine.h:20: error: syntax error before `;' token
engine/engine.h:21: error: syntax error before `;' token
engine/engine.h:22: error: syntax error before `;' token
engine/engine.h:23: error: syntax error before `;' token
engine/engine.h:24: error: syntax error before `;' token
engine/engine.h:25: error: syntax error before `;' token
engine/engine.h:28: error: syntax error before `;' token
engine/engine.h:29: error: syntax error before `;' token
engine/engine.h:30: error: syntax error before `;' token
engine/engine.h:31: error: syntax error before `;' token
engine/engine.h:32: error: syntax error before `;' token
engine/engine.h:33: error: syntax error before `;' token
engine/engine.h:34: error: syntax error before `;' token
engine/engine.h:37: error: syntax error before `;' token
engine/engine.h:38: error: syntax error before `;' token
engine/engine.h:39: error: syntax error before `;' token
engine/engine.h:40: error: syntax error before `;' token
engine/engine.h:41: error: syntax error before `;' token
engine/engine.h:42: error: syntax error before `;' token
engine/engine.h:43: error: syntax error before `;' token
engine/engine.h:44: error: syntax error before `;' token
engine/engine.h:45: error: syntax error before `;' token
engine/engine.h:46: error: syntax error before `;' token
make: ** [engine/3dgui.o] Erro 1

What i can do?

reply to this message

#8: Re: Error in compilation :(

by eihrul on 08/12/2007 08:38, refers to #7

The version of OpenGL you have is extremely old and requires updating.

reply to this message

#9: ..

by Passa on 08/12/2007 10:46

While this topic has been bumped.. I reinstalled Ubuntu and now I've been unable to compile Sauerbraten.. no idea why. I have all the SDL-dev packages installed..

andrew@andrewdesktop:~/games/sauerbraten/src$ make
make -C enet/ all
make[1]: Entering directory `/home/andrew/games/sauerbraten/src/enet'
Making all in include
make[2]: Entering directory `/home/andrew/games/sauerbraten/src/enet/include'
Making all in enet
make[3]: Entering directory `/home/andrew/games/sauerbraten/src/enet/include/enet'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/andrew/games/sauerbraten/src/enet/include/enet'
make[3]: Entering directory `/home/andrew/games/sauerbraten/src/enet/include'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/andrew/games/sauerbraten/src/enet/include'
make[2]: Leaving directory `/home/andrew/games/sauerbraten/src/enet/include'
make[2]: Entering directory `/home/andrew/games/sauerbraten/src/enet'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/andrew/games/sauerbraten/src/enet'
make[1]: Leaving directory `/home/andrew/games/sauerbraten/src/enet'
g++ -O3 -fomit-frame-pointer -Wall -fsigned-char -Ienet/include -I. -Ishared -Iengine -Ifpsgame `sdl-config --cflags` -o sauer_client shared/tools.o shared/geom.o engine/3dgui.o engine/client.o engine/command.o engine/console.o engine/crypto.o engine/cubeloader.o engine/grass.o engine/lightmap.o engine/main.o engine/material.o engine/menus.o engine/normal.o engine/octa.o engine/octaedit.o engine/octarender.o engine/physics.o engine/rendergl.o engine/rendermodel.o engine/renderparticles.o engine/rendersky.o engine/rendertext.o engine/renderva.o engine/server.o engine/serverbrowser.o engine/shader.o engine/spheretree.o engine/sound.o engine/texture.o engine/water.o engine/world.o engine/worldio.o fpsgame/fps.o rpggame/rpg.o -Lenet -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL -lGLU
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make: *** [client] Error 1
andrew@andrewdesktop:~/games/sauerbraten/src$


Being a general noob at this stuff, I have no idea how to fix this problem on my own.. any idea why it errors?

reply to this message

#10: Re: ..

by Quin on 08/12/2007 11:42, refers to #9

/usr/bin/ld: cannot find -lGL

Install the GL/GLU development packages too :P

reply to this message

#11: Re: ..

by Passa on 08/12/2007 13:20, refers to #10

They are installed. I removed -lGL from the makefile and it seems to have compiled fine.. strange.

But now trying to compile SauerMod, I get this:

andrew@andrewdesktop:~/Desktop/src$ sudo make
cd enet; ./configure
/bin/sh: ./configure: not found
make: *** [enet/Makefile] Error 127

:(

reply to this message

#12: Re: compiling issues

by MeatROme on 08/12/2007 17:10, refers to #11

re: -lGL
Hm, removing -lGL is really not the way to go, Passa ... just out of curiosity :
paste the output of
passa@box:~$ dpkg -l | grep gl | grep -v glib | grep dev | awk '{print $2}'
(to make sure you've got the right ones)
I have libgl1-mesa-dev and libglu1-mesa-dev here and that works for me ...

re: enet compiling
Mmmh. If the file "src/enet/configure" exists then something else is up, but if not then check-out again - that should (re-)create it ... or copying from the vanilla sauerbraten src-tree should work too. Actually building enet isn't really required any more ... I used to even disable those lines in my Makefile to speed up building ;)

reply to this message

#13: ..

by Grogan on 08/13/2007 04:13

I find I have to pass the include and library paths in the Makefile to get it to find opengl. I've never had it compile yet, without editing the Makefile.

Essentially, -I/usr/X11R6/include -I/usr/X11R6/include/GL -L/usr/X11R6/lib

(assuming it's in /usr/X11R6 on your system)

Near the top of the Makefile, that can be done similar to this:

CXX=g++
CXXOPTFLAGS=-O3 -march=pentium4 -fomit-frame-pointer
CXXFLAGS=$(CXXOPTFLAGS) -Wall -Wno-deprecated -fsigned-char -Ienet/include -I/usr/X11R6/include -I/usr/X11R6/include/GL -I. -Ishared -Iengine -Ifpsgame `sdl-config --cflags`

PLATFORM_PREFIX=native
CLIENT_LIBS=-Lenet -L/usr/X11R6/lib -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL -lGLU

reply to this message

#14: Re: ..

by Quin on 08/13/2007 06:39, refers to #11

If 'src/enet/configure' exists, then maybe you need to 'chmod +x' it?

As far as GL goes, SDL provides a certain amount of backward compatibility for it (SDL_opengl.h), so yes it will compile (I used to resort to this when using DevCPP on Windows), but it's really not recommended to use SDL's OGL.

reply to this message

#15: Re: compiling issues

by Passa on 08/13/2007 14:54, refers to #12

MeatROme:
freeglut3-dev
libgl1-mesa-dev
libglu1-mesa-dev
libglu1-xorg-dev
libglut3-dev

Anyhow.. Quin, all the folders and files are set to read+write and executable. And I've tried make under root and that doesn't work either :(

reply to this message

#16: Re: compiling issues

by SheeEttin on 08/13/2007 17:18, refers to #15

Might it be that the file is not there?
You can get it from CVS at http://sauerbraten.cvs.sourceforge.net/sauerbraten/sauerbraten/src/enet/configure?revision=1.12&view=markup

reply to this message

#17: Re: compiling issues

by MeatROme on 08/13/2007 18:47, refers to #15

just to be on the safe side ...
... did you do a "make clean" ?!
The /full/ make-dance consists of the steps:
make clean
make
make install

And just check that CVS isn't showing up any files as being modified ... well, ok, apart maybe from some CFGs :)

reply to this message

#18: Re: compiling issues

by MeatROme on 08/13/2007 19:12, refers to #17

I'd suspect a Makefile ... maybe the paths are wrong ... or your missing more basic stuff, can't see it in the backlog ATM ... you've compiled on this system succesfully before!?!

reply to this message

#19: Re: compiling issues

by Passa on 08/14/2007 10:01, refers to #18

andrew@andrewdesktop:~/Desktop/src$ make clean
cd enet; ./configure
/bin/sh: ./configure: not found
make: *** [enet/Makefile] Error 127


Same error for Sauer CVS or SauerMod CVS. I compiled on this system on a previous Ubuntu install.. but the system had a different mobo/cpu back then, not sure if that would make a difference..

reply to this message

#20: Re: compiling issues

by SheeEttin on 08/14/2007 16:55, refers to #19

Does enet/configure exist?

reply to this message

#21: Re: compiling issues

by Passa on 08/15/2007 08:04, refers to #20

http://img356.imageshack.us/img356/9910/yeskp8.jpg

I believe so.

reply to this message

#22: Re: compiling issues

by SheeEttin on 08/15/2007 17:09, refers to #21

Hm.
Well, I'd skip "make clean" and go to "make". "make clean" isn't required, it just removes binaries from the source tree. You shouldn't need it at all for the first compile.

reply to this message

#23: ..

by Grogan on 08/15/2007 23:32

I always go into the src/enet directory first and do ./configure (make sure configure is +x first) and make. When that is built, I go up a level to src and type make to compile Sauerbraten.

I find that enet is often the most problematic part of it for me and I like to sort issues there first. (For a recent example in FreeBSD 7.0-CURRENT it doesn't seem to get FreeBSD defined and erroneously goes to the #else for gethostbyname_r in unix.c). Just for interest's sake, how I work around that is to add #define FREEBSD in the unix.c file.

I don't remember the last time I built it from CVS, so I don't recall if you need GNU autoconf and automake installed. (but you should have them anyways). Normally when you get stuff from CVS, configure and friends need to be generated first by the autotools.

reply to this message

#24: Re: ..

by SheeEttin on 08/16/2007 04:24, refers to #23

Sauerbraten's pretty "out-of-the-box" compared to most other projects. For example, a checkout even includes recent binaries (the current CVS binaries are just short of two days old).

In the case of compiling from source, it's usually just "./configure; make; make install".

reply to this message

Go to first 20 messagesGo to previous 20 messages    Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53871491 visitors requested 71646693 pages
page created in 0.025 seconds using 10 queries
hosted by Boost Digital