PlaneShift
Support => Linux Specific Issues => Topic started by: Induane on March 29, 2006, 09:28:04 am
-
This is my first ever attempt at a guide. It is based off of the debian build guide on laanx, and on this (http://www.vaikene.net/planeshift/cvs.htm) build guide as well. Please feel free to let me know how it works for you, as well as if I made any mistakes. Commands will be entered using the new code highlighting, and entries in text files will be colored green
I also have a versoin of it on my site as well: http://vaalnor.mine.nu/cvs.htm
Guide to building PlaneShift on Ubuntu Dapper Drake:
First off this may contain errors, so please let me know. I'll probabily be making a dapper script to handle this later on. Also note that this is a guide to compiling bleeding edge. This means it compiles the latest and greatest (or buggyies) code available. It also means that there is a possibility that even if it all builds fine, you may not be able to log into the server becase your version is too "new". I'll definately be fixing this with build dates at some point but that is more to maintain so for now this will have to do :D Also note that you need to have the universe and multiverse repositories enabled for this to work. I may post how to change that later on. If you are having troubles try using my sources.list file found on gttp://vaalnor.mine.nu/sources.list In addition please make sure that you have 3d acceleration enabled before attempting this. You can test this by entering glxinfo | grep direct and watching to see if it says direct render = yes
Well, with that out of the way lets get this party started!
Section 1: Resolving Dependencies
From a command line run this:
sudo apt-get update
and then:
sudo apt-get --assume-yes install libjpeg62-dev x11proto-gl-dev autoconf libcurl3-dev jam bison flex-old automake1.9 jam libcurl3-dev libmng-dev libmikmod2-dev libogg-dev libvorbis-dev zlib1g-dev libpng3-dev build-essential cvs libtool libglu1-mesa-dev xserver-xorg-dev libxt-dev libopenal0a libopenal-dev subversion
Section 2: Setting up Build Environment
Next get yourself a working directory to compile in. I usually prefer to install in /opt so I do as follows:
sudo mkdir /opt/planeshift_cvs
sudo chmod a+rw /opt/planeshift_cvs
and then
cd /opt/planeshift_cvs
ahh thats better! Now that we are in our new working directory and have permission to write there lets move on!
Section 3: Checking Out Source Code From CVS and SVN
cvs -d:pserver:anonymous:@planeshift.cvs.sourceforge.net:/cvsroot/planeshift loginand hit enter
then type:
cvs -z3 -d:pserver:anonymous@planeshift.cvs.sourceforge.net:/cvsroot/planeshift co planeshift
and hit enter.
this will throw a bunch of text on your screen blah blah blah. The long short of this is that you now have a new directory called planeshift
in the directory you are in now. It contains the latest cvs source code! FUN!
go ahead and enter that directory like so:
cd planeshift
Now we\'ll get the latest source to planeshifts dependacies - Cal3d, Crystalspace, and CEL!
enter this:
cvs -d:pserver:anonymous:@cal3d.cvs.sourceforge.net:/cvsroot/cal3d loginand hit enter
and then enter this:
cvs -z3 -d:pserver:anonymous@cal3d.cvs.sourceforge.net:/cvsroot/cal3d co cal3d
More text.... scrolling alll alllllong the screen! Yay! OK once thats finished lets grab CrystalSpace like this:
svn co https://svn.sourceforge.net/svnroot/crystal/CS/trunk csand hit enter
once that finishes lets get CEL!
svn co https://svn.sourceforge.net/svnroot/cel/cel/trunk celhit enter of course!
Section 4: Setup Environment Variables
type this to open a file for editing.
gedit profile
and paste the following lines into the file.. be sure to change the paths if you choose to install in a different directory:
export LD_LIBRARY_PATH=/opt/planeshift_cvs/planeshift/cal3d/src/cal3d/.libs/:$LD_LIBRARY_PATH
export CRYSTAL=/opt/planeshift_cvs/planeshift/cs
export CEL=/opt/planeshift_cvs/planeshift/cel
export CSCONFPATH=/opt/planeshift_cvs/planeshift/cel
export CAL3D=/opt/planeshift_cvs/planeshift/cal3d
now save the file and exit ? then enter this:
source profile
if there are no errors then you probably did it correctly.
Section 5: Compiling
cd into the cal3d directory that was created when you checked out cal3d from cvs like so:
cd cal3d
and then enter this:
./autogen.sh
and then:
./configure --prefix=$CAL3D
once this configure completes, you are ready to build!
go ahead and type the following ? it won\'t take too long so stick it out:
make
and once that is done type
make install
if it errors out and you see an error like this:
g++: @all_libraries@: No such file or directory
Then enter this command:
sed -i 's/all_libraries = @all_libraries@/#all_libraries = @all_libraries@/' /opt/planeshift_cvs/planeshift/cal3d/src/cal3d/Makefile.am
Then redo your build like so:
./configure --prefix=$CAL3D
make
make install
if there were no errors then we are ready to go on to the next step ? which for me was always the toughest. We'll be building CrystalSpace. Now if the install of cal3d failed, type ./configure ?prefix=$CAL3D again and watch for the things it is checking for ? you can scroll in your gnome terminal to see it all once it is done. if you see: checking for.... blah blahc......no then try looking for similar files in synaptic to install and try again.
OK whew! Now lets compile crystalspace!
enter this to get to the crystalspace directory:
cd ../csNow that we are there go ahead and run
./configure --without-python --without-java --with-cal3d=$CAL3D
once that finishes, run:
jam -aq libs plugins cs-config walktest
and take a nap, get a cup of tea or amuse yourself some other way. Because this is going to freaking take forever.
Once that has FINALLY finished, test it by entering
./walktest -fullbright
if you get a little 3d environment you can run around in then all is good! If there are errors then StarsandBars made this suggestion which you might try;
Sometimes you might have to use --with-libcel=/path/to/cel in CS compilation.
Using the paths I suggested, it would be --with-libcel=/opt/planeshift_cvs/planeshift/cel
Now time to build CEL! Hurray we\'re getting closer. - enter this:
cd ../cel
and then do an:
./autogen.sh
when that finishes ? type this:
./configure --without-python
and when that gets done... get this... type:
jam -aq
hurray this one doesn\'t take nearly as long as crystalspace!! Huzzah for sanity!!!
Guess what? Now we get to compile planeshift! Hurray!
first do this:
cd ..
and then do this:
./autogen.sh
and follow it with this:
./configure --with-cal3d=$CAL3D --with-cel-prefix=$CEL
now that that is done, go ahead and run this:
jam -aq client
whew that was a chore! If you are lucky and everything worked, you could go ahead and enter this:
ls
and if you see a file called psclient, updater, and pssetup among the files listed (they will probably be in green) then we are doing great! Soooo... now what.... still more waiting ahead so don\'t worry. We still need to modify some stuff...
Section 6: Necessary Tweaks
gedit updaterconfig.xml
look for this line:
<whole_zips>0</whole_zips>
and change it to read:
<whole_zips>1</whole_zips>
Then find this:
<autoinclude_os>1</autoinclude_os>
and change it to read
<autoinclude_os>0</autoinclude_os>
Then, keep on going down until you see this part:
<mirrors>
<active id=\"1\" />
<mirror id=\"1\" name=\"local\" url=\"http://192.168.2.19/updater/\" />
<mirror id=\"2\" name=\"mirror\" url=\"http://192.168.2.12/\" repository=\"repos.zip\" versioninfo=\"ver.dat\" />
</mirrors>
replace with this:
<mirrors>
<active id=\"1\" />
<mirror id=\"1\" name=\"mir1\" url=\"http://psmirror.pfdev.net/psupdater/\" repository=\"repository.zip\" files=\"\" />
<mirror id=\"2\" name=\"mir2\" url=\"http://planeshift.mirror.thumbnail.cz/psupdater/\" repository=\"repository.zip\" files=\"\" />
<mirror id=\"3\" name=\"mir3\" url=\"http://www.psmirror.org/psupdater/\" repository=\"repository.zip\" files=\"\" />
<mirror id=\"4\" name=\"mir4\" url=\"http://psmirror.u24.solone.net/psupdater/\" repository=\"repository.zip\" files=\"\" />
<mirror id=\"5\" name=\"backp\" url=\"http://laanx.fragnetics.com/updater_hidden/\" repository=\"repository.zip\" files=\"\" />
</mirrors>
now save the file and exit.
now enter this:
./updater --auto
once that finally finally finally finishes downloading the art you can now make a little startup script to make sure all variables are loaded correctly. Start by entering this:
gedit runplaneshift.sh
Section 7: Launcher Scripts & Running Planeshift
Lets start by opening a new file for editing:
gedit runplaneshift.sh
and adding these lines:
#
#!/bin/sh
#
source profile
export MALLOC_CHECK_=0
./psclient
once that is finished, save the file and exit. then enter this command:
chmod a+x runplaneshift.sh
so now to start planeshift all you have to do is enter at command prompt:
cd /opt/planeshift_cvs/planeshift
./runplaneshift.sh
if you want to add a gnome menu entry you can do so by right-clicking on the applications menu and hitting edit menus.
Go to the games part on the left and click it. Then click on the File menu and select ?New Entry?
enter the following:
Name: PlaneShift
Comments: Free MMORPG
Command: /opt/planeshift_cvs/planeshift/runplaneshift.sh
And browse to an icon if you want to.
And there you have it! You should how have a functioning PlaneShift on your system.
please let me know if this can be improved any way, or if I have made any mistakes. Also, Dapper users, let me know how this works for you and if I left out any dependencies as I was punching those out from memory.
If you get segmentation faults that usually means that there is a bug in the cvs you are trying to build, and not anything to do with the steps you took too build.. try a different build date besides bleeding edge, or try the next day.
-
Hi !
First of all, thank you for your guide. I was unable to use the installer on my dapper, getting a Windows-Language-Like error (something like f546666667a64f846a468g468a4s654g68786746z84654...)
so I decided to try your way.
It seems it has worked properly, I\'m waiting for the updater to finish to shout hurray!!! .
But I\'ve found two little errors in configure steps option:
--with-libcal3d= do not work, and may be replaced by --with-cal3d=
--with-libcel= do not work and may be replaced by --with-cel-prefix=
I\'ll post again once the update will be finished, to tell you if all is finally working fine :)
Thank you again :)
-
Thank you so much for those corrections. I\'m on my way out the door but I\'ll correct them as soon as I return. Thanks!
-
You\'re welcome ^^
Oki so after I noticed that my disk was full (0kb free ^^) I finally manage to finish the update...
But when I try to login it tell me I don\'t use the good version of the client for the server.
So can you tell me please if you had to specify a special server? I gonna look around the forum, maybe i\'ll find the solution :)
Thank you again for you guide.
Oh! I almost forgot... :) I\'ve found another little error :
in the command : ./updater ?auto I don\'t know how you wrote the \"?\" but a copy paste of your line won\'t work (lauching the updater gui, wich is really weird without arts files :) )
this one may work better (at least it worked for me ^^) :
./updater -auto (Not sure you\'ll notice the diff?rence so I write both side by side : your, then mine : \"?\" \"-\" , See? mine is smaller but damn more efficient ::D )
-
ahem...
i did exactly what I should, but when i launch ./runplaneshift.sh a beautiful error show up :
gyscos@pc-alex:/opt/planeshift_cvs/planeshift$ ./runplaneshift.sh
WARNING: could not load plugin \'crystalspace.window.x.extf86vm\'
DEBUG: Software Renderer Initializing..
NOTIFY: Configured for driver [crystalspace.sndsys.software.driver.alsa]
ALSA lib pcm_dmix.c:819: (snd_pcm_dmix_open) unable to open slave
planeshift.application.client:
PlaneShift Crystal Blue
This game uses Crystal Space Engine created by Jorrit and others
0.99 r0 [Unix-x86-GCC]
All LOGS are off.
Mounting skin: /this/art/skins/default.zip
Mounting skin: /planeshift/art/skins/base/client_base.zip
psEngine initialized.
Using fontsize 16 for resolution 1024x768
./runplaneshift.sh: line 7: 16970 Erreur de segmentation ./psclient
gyscos@pc-alex:/opt/planeshift_cvs/planeshift$
what should I do ?...
-
Like Induane said, if you get a segmentation fault, there isn\'t much to do, except retrying to build later with new sources.
-
ooops
sorry, i hadnt seen it xD
-
hi Induane,
i am very eager to know what version of gcc you used with the build, as i know there are some problems with gcc4.
-
I\'ve been able to build with GCC 4.01 for some time now with no problems. Also though - the server version error is because you are building with current sources. These are ahead of the server version, so if you build with the release dates listed in irc.freenode.net #planeshift-build - look at the channel topic - that could get you a build that will work on the current server.
-
i can compile with gcc 4.02 on my debian box,, but it failed to located my graphic card, always complain like that, even i have the nvidia-cg-toolkit install the to /usr folder
--------------------------
debian:/home/semson/planeshift/CS# ./walktest -fullbright
WARNING: could not load plugin \'crystalspace.graphics2d.glx\'
Error loading Graphics2D plugin.
WARNING: failed to initialize plugin \'crystalspace.graphics3d.opengl\'
ERROR: Console: Unable to locate 3D renderer plugin!
WARNING: failed to initialize plugin \'crystalspace.console.output.simple\'
DEBUG: Sound System: Software Renderer Initializing..
DEBUG: Sound System: Configured for driver [crystalspace.sndsys.software.driver.oss]
Sound System: OSS driver for software sound renderer initialized.
No 3D driver!
crystalspace.system: No iGraphics3D plugin!
crystalspace.system: Error initializing system!
Cleaning up...
Segmentataion fault
-
open a terminal and enter this:
sudo apt-get --assume-yes install libjpeg62-dev x11proto-gl-dev autoconf libcurl3-dev jam bison flex-old automake1.9 jam libcurl3-dev libmng-dev libmikmod2-dev libogg-dev libvorbis-dev zlib1g-dev libpng3-dev build-essential cvs libtool libglu1-mesa-dev xserver-xorg-dev libxt-dev libopenal0a libopenal-dev subversion
if you are getting that error you are missing some of those dependacies.
-
when i try to load anything i keep getting these errors:
DEBUG: Software Renderer Initializing..
NOTIFY: Configured for driver [crystalspace.sndsys.software.driver.alsa]
WARNING: could not load plugin \'crystalspace.sndsys.software.driver.alsa\'
ERROR: Failed to load driver [crystalspace.sndsys.software.driver.alsa].
WARNING: failed to initialize plugin \'crystalspace.sndsys.renderer.software\'
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Cannot use preferred GLX visual - Generic visual will be used.
Xlib: extension \"GLX\" missing on display \":0.0\".
Graphics display does not support a generic visual with double buffer and
depth buffer
Xlib: extension \"GLX\" missing on display \":0.0\".
Graphics display does not provide double buffering
Xlib: extension \"GLX\" missing on display \":0.0\".
Graphics display does not support a depth buffer
Xlib: extension \"GLX\" missing on display \":0.0\".
Graphics display does not support at least 12 bit color
crystalspace.graphics3d.opengl: Error opening Graphics2D context.
Warning: Cannot convert string \"vlines2\" to type Pixmap
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Xlib: extension \"GLX\" missing on display \":0.0\".
Cannot use preferred GLX visual - Generic visual will be used.
Xlib: extension \"GLX\" missing on display \":0.0\".
Graphics display does not support a generic visual with double buffer and
depth buffer
Xlib: extension \"GLX\" missing on display \":0.0\".
Graphics display does not provide double buffering
Xlib: extension \"GLX\" missing on display \":0.0\".
Graphics display does not support a depth buffer
Xlib: extension \"GLX\" missing on display \":0.0\".
Graphics display does not support at least 12 bit color
planeshift.application.client:
PlaneShift Crystal Blue
This game uses Crystal Space Engine created by Jorrit and others
0.99 r0 [Unix-x86-GCC]
Failed to init app!
but i don\'t know where i went wrong
-
your gl acceleration isnt enabled do you by any chance use an nvidia driver from the livna repo?
if that is the case try this
type as root
chcon -t texrel_shlib_t /usr/lib/xorg/modules/extensions/nvidia/*.so
and restart your X-environement [ ctrl backspace ]
after that try again, it should work now...
-
The XML code did not transfer over.
Does anybody have the code that I should put into my updaterconfig?
-
For the last two weeks:
yiliar:/home/pmeyer/src/planeshift -> cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cal3d login
Logging in to :pserver:anonymous@cvs.sourceforge.net:2401/cvsroot/cal3d
CVS password:
cvs [login aborted]: end of file from server (consult above messages if any)
:(
FC5
2.6.16-1.2096_FC5
-
Obtaining libCG before compiling Cal3D would probably be a good idea.
Sometimes you might have to use --with-libcel=/path/to/cel in CS compilation. That was the case with the last version I compiled.
@Hargoth: SourceForge CVS sucks.
-
Errors so far:
--
cstool/objmodel.h not found
solved by:
ln -s `pwd`/CS/include/igeom/objmodel.h `pwd`/CS/include/cstool
--
src/client/psclientdr.h:59: error: extra qualification ‘psClientDR::’ on member ‘HandleDeath’
line 59 reads:
void psClientDR::HandleDeath(GEMClientActor * gemObject);
no solution :(
-
src/client/psclientdr.h:59: error: extra qualification ‘psClientDR::’ on member ‘HandleDeath’
line 59 reads:
void psClientDR::HandleDeath(GEMClientActor * gemObject);
no solution :(
Just delete the psClientDR:: part and make the line looking like this:
void HandleDeath(GEMClientActor * gemObject);
-
I've updated CS and CEL to use the new SVN repositories now. Hopefully if anyone was having some major sourceforge headaches, this will help.
-
Just a post to say thanks Iduane for your guide and thanks to Stars for help in CS compilation \\o//
now i just have a problem with sound and server is down ;D
but no matter it's working :thumbup:
Sometimes you might have to use --with-libcel=/path/to/cel in CS compilation. That was the case with the last version I compiled.
-
thats good advice I'll add that to the guide now. :D
-
Oh, and if anyone has trouble with Dapper's default ATI drivers (8.25.18) just work around the fglrx errors by downloading revision 8.14.13 off of ATI's site and taking libGL.so.1 from that package, then replacing it with the one in /usr/lib.
-
Oh, and if anyone has trouble with Dapper's default ATI drivers (8.25.18) just work around the fglrx errors by downloading revision 8.14.13 off of ATI's site and taking libGL.so.1 from that package, then replacing it with the one in /usr/lib.
Do you mean the error where its all tweaky, and flickery and crashy? Also do you mean install the revision from ati's site and then copy libGL.so.1 over the copy of libGL.so.1 in /usr/lib or do you mean to take the copy of libGL.so.1 and use it in place of the one in the downloaoded driver?[/color]
-
Oh, and if anyone has trouble with Dapper's default ATI drivers (8.25.18) just work around the fglrx errors by downloading revision 8.14.13 off of ATI's site and taking libGL.so.1 from that package, then replacing it with the one in /usr/lib.
Do you mean the error where its all tweaky, and flickery and crashy? Also do you mean install the revision from ati's site and then copy libGL.so.1 over the copy of libGL.so.1 in /usr/lib or do you mean to take the copy of libGL.so.1 and use it in place of the one in the downloaoded driver?[/color]
I mean the error where OpenGL acceleration won't start and Mesa's default drivers are still listed under fireglcontrolpanel. Upon running something like fgl_glxgears you'll see a whole bunch of fglrx revision errors and it'll likewise fail to start.
"Tweaky and flickery and crashy" is secondary IMO.
As to the second question, I mean to install 8.25.18, then take the libGL from 8.14.13 with
sudo sh ./ati-driver-installer-8.14.13-<architecture>-deb --extract <directory>
sudo mv /usr/lib/libGL.so.1 /usr/lib/libGL.so.1.backup
sudo cp directory/x690/usr/X11R6/lib/libGL.so.1 /usr/lib/libGL.so.1
and use it in place of the one that you were given from 8.25.18.
That should make OpenGL start up normally. Your framerate in glxgears might seem slower than usual, but that shouldn't translate into a real performance dip.
Mine is, with this fix enabled:
9543 frames in 5.0 seconds = 1908.511 FPS
10041 frames in 5.0 seconds = 2008.128 FPS
5106 frames in 5.0 seconds = 1021.069 FPS
5003 frames in 5.0 seconds = 1000.435 FPS
9652 frames in 5.0 seconds = 1930.089 FPS
5011 frames in 5.0 seconds = 1002.100 FPS
-
hello ! i'm trying to compile planeshift and i have a problem... whe i do ./autogen.sh for the first time => in the cal3d directory it says tha i must have autocon>=2.53 installed but i've the 2.60 ?!?! i try to reinstall it but nothing to do : i must have the autoconf>=2.53 ::| i'm blocked :'( what can i do ?? (i'm on edgy)
thanks !
-
In current SVN version of cal3d there is no autogen.sh script. Instead of that use command:
autoreconf --install --force
(I think that compiling guide should be updated...)