home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Cube on Debian Problem

by Mo' Mo on 04/06/2005 21:38, 8 messages, last message: 05/06/2005 23:03, 2573 views, last view: 05/05/2024 18:48

I\\\'m using the current Woody release of Debian on an old system (I have to use either Woody, or OpenBSD on this box. No choice). I just want to run the server, but it won\\\'t run because it doesn\\\'t have libstdc++.so.5, and it won\\\'t compile (has some problems with enet/unix.h and /usr/include/bits/socket.h). Anyone out there managed to either get libstdc++5 (plus the glibc that it requires) onto Debian, and from where?

   Board Index   

#1: yeah

by Drakker_ on 04/11/2005 04:50

Rename the sleep function to something else and it should compile alright. Some people will also have an ifdef that wont work in enet, you can safely remove it and it will compile alright (happened to me with debian/unstable).

Note that the client you will get won't connect to servers using the binary version of cube, but anyone should be able to connect to your custom server.

reply to this message

#2: ..

by Grogan on 04/13/2005 20:42

I compile cube under Linux and I find that I (and others that I've helped) have to take the following steps.

First of all, the cube/source/src/Makefile needs a couple of edits.

CXXOPTFLAGS=-Wno-deprecated -O3 -fsigned-char -fomit-frame-pointer -fpermissive
CXXFLAGS=$(CXXOPTFLAGS) -I../enet/include -I/usr/X11R6/include -I/usr/X11R6/include/GL `sdl-config --cflags`

CLIENT_LIBS=-L../enet -L/usr/X11R6/lib -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL -lGLU

To the CXXOPTFLAGS variable, I add -Wno-deprecated (I don't need to see those warnings). If you are using a newer gcc compiler like gcc 3.4.x, you will need to add -fpermissive to allow it to ignore an arbitrary error condition (It'll issue warnings). gcc 3.3.x will not have this problem. You can also add processor optimizations to that line (e.g. -march=yourprocessor) but I wouldn't bother unless your whole system is compiled using the flag.

To the CXXFLAGS variable, I have to add -I/usr/X11R6/include -I/usr/X11R6/include/GL to get it to compile.

To the CLIENT_LIBS variable I have to add -L/usr/X11R6/lib

OK, that's the Makefile.

Go to cube/source/enet/include/enet and find unix.h and change a typedef down near the bottom of the file (line 31 is where it starts on my copy). Change int to __socklen_t (that's two underscores before the s) to match kernel interfaces. It should look like this:

#ifndef HAS_SOCKLEN_T
typedef __socklen_t socklen_t;
#endif

I have had to do this for Linux 2.6 kernel headers, as well as modern 2.4. You can also just delete that entire #ifndef/#endif section and the binaries will compile.

Now, I also have a problem in cube/src/clientgame.cpp. This is what Drakker is pointing out. On line 203 there's a function:

void sleep(char *msec, char *cmd) { sleepwait = atoi(msec)+lastmillis; strcpy_s(sleepcmd, cmd); };

Change the void sleep to void anything. Somewhat like this:

void banana(char *msec, char *cmd) { sleepwait = atoi(msec)+lastmillis; strcpy_s(sleepcmd, cmd); };

Now, CD into cube/source/enet and do chmod 755 configure (zip doesn't preserve those bits), and then run it.

./configure

Finally, cd into cube/source/src and issue the make command.

The results will be named cube_client and cube_server and you can copy them to the bin_unix directory and/or rename them to linux_client and linux_server respectively.

reply to this message

#3: ..

by jc13 on 04/14/2005 00:56

I took the libstdc from doom3 x-D

reply to this message

#4: Re: ..

by Sparr on 05/06/2005 12:39, refers to #2

your solution got me through the compile. sadly i now have two problems.

a) i was recompiling specifically to fix a bug in 'sleep', so that is useless now :(

b)
sparr@shaggy:/usr/local/games/cube$ bin_unix/cube_client
init: sdl
init: net
init: world
game mode is ffa/default
init: video: sdl
init: video: mode
init: video: misc
init: gl
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
sparr@shaggy:/usr/local/games/cube$


:(

reply to this message

#5: Re: ..

by kernowyon on 05/06/2005 16:45, refers to #4

The SDL parachute problem is usually a sign that the sound card is in use by another program I have found. Do you use KDE? If so, try the Sound and Multimedia settings in KDE control centre, then Sound System. Set the Auto-suspend time to 1 second and enable it. Apply. See if that helps :)

reply to this message

#6: Re: ..

by Sparr on 05/06/2005 18:54, refers to #5

I tried killing artsd as suggested in another thread. No help there :(

reply to this message

#7: Re: ..

by kernowyon on 05/06/2005 21:19, refers to #6

Tried artsdsp -m /path/to/cube_unix? Not sure if artsdsp -m would really help in the case of cube though.
Looking at the error again, it fails after gl. Not sure how the cube loading works off hand, but wondering if your 3d acceleration is OK? Do other 3d games play ok? Dont rely on glxgears as a test - I have seen boxes run that fine but fail to run tuxracer or gltron.
In Debian, I think you have to run a command to actually set up 3d in Nvidia cards. I cant recall it at the moment - nvidia-glx update or something I think.
If you have an nvidia card, and tuxracer or other 3d games fail, I could look it up for you - I have Deb on another box here - but I cant get cube running on that as its a 64 bit system :(

reply to this message

#8: Re: ..

by Sparr on 05/06/2005 23:03, refers to #7

it fails after gl, before 'base textures', so not sure which is the problem. i would assume gl, given the level of complexity and libraries required.

yes, other GL stuff works fine, including the precompiled cube binaries (and cedega, and ut2004, and tuxracer, and neverball...)

reply to this message

   Board Index   


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


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