Author Topic: Build Guide for Ubuntu Dapper Drake (Updated for SVN)  (Read 4993 times)

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Build Guide for Ubuntu Dapper Drake (Updated for SVN)
« 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 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:

Code: [Select]
sudo apt-get update
and then:

Code: [Select]
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:

Code: [Select]
sudo mkdir /opt/planeshift_cvs
Code: [Select]
sudo chmod a+rw /opt/planeshift_cvs
and then

Code: [Select]
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

Code: [Select]
cvs -d:pserver:anonymous:@planeshift.cvs.sourceforge.net:/cvsroot/planeshift loginand hit enter

then type:

Code: [Select]
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:

Code: [Select]
cd planeshift

Now we\'ll get the latest source to planeshifts dependacies  - Cal3d, Crystalspace, and CEL!

enter this:

Code: [Select]
cvs -d:pserver:anonymous:@cal3d.cvs.sourceforge.net:/cvsroot/cal3d loginand hit enter

and then enter this:

Code: [Select]
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:

Code: [Select]
svn co https://svn.sourceforge.net/svnroot/crystal/CS/trunk csand hit enter

once that finishes lets get CEL!

Code: [Select]
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.

Code: [Select]
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:

Code: [Select]
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:

Code: [Select]
cd cal3d
and then enter this:


Code: [Select]
./autogen.sh
and then:

Code: [Select]
./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:

Code: [Select]
make
and once that is done type

Code: [Select]
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:

Code: [Select]
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:

Code: [Select]
./configure --prefix=$CAL3D
Code: [Select]
make
Code: [Select]
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:

Code: [Select]
cd ../csNow that we are there go ahead and run

Code: [Select]
./configure --without-python --without-java --with-cal3d=$CAL3D
once that finishes, run:

Code: [Select]
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

Code: [Select]
./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:

Code: [Select]
cd ../cel
and then do an:

Code: [Select]
./autogen.sh
when that finishes ? type this:

Code: [Select]
./configure --without-python
and when that gets done... get this... type:

Code: [Select]
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:

Code: [Select]
cd ..
and then do this:

Code: [Select]
./autogen.sh
and follow it with this:

Code: [Select]
./configure --with-cal3d=$CAL3D --with-cel-prefix=$CEL
now that that is done, go ahead and run this:

Code: [Select]
jam -aq client
whew that was a chore!  If you are lucky and everything worked, you could go ahead and enter this:

Code: [Select]
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

Code: [Select]
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:

Code: [Select]
./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:

Code: [Select]
gedit runplaneshift.sh

Section 7: Launcher Scripts  & Running Planeshift

Lets start by opening a new file for editing:

Code: [Select]
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:

Code: [Select]
chmod a+x runplaneshift.sh
so now to start planeshift all you have to do is enter at command prompt:

Code: [Select]
cd /opt/planeshift_cvs/planeshift
Code: [Select]
./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.
« Last Edit: June 23, 2006, 06:42:42 pm by Induane »

Doki

  • Wayfarer
  • *
  • Posts: 3
    • View Profile
Maybe...
« Reply #1 on: April 01, 2006, 04:17:55 pm »
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 :)

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Corrections
« Reply #2 on: April 01, 2006, 06:27:28 pm »
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!
« Last Edit: June 01, 2006, 04:12:39 pm by Induane »

Doki

  • Wayfarer
  • *
  • Posts: 3
    • View Profile
oki^^
« Reply #3 on: April 02, 2006, 02:55:16 am »
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 )

Gyscos

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
(No subject)
« Reply #4 on: April 02, 2006, 01:22:08 pm »
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 ?...
« Last Edit: April 02, 2006, 01:22:29 pm by Gyscos »

Doki

  • Wayfarer
  • *
  • Posts: 3
    • View Profile
Nothing ^^
« Reply #5 on: April 02, 2006, 01:57:08 pm »
Like Induane said, if you get a segmentation fault, there isn\'t much to do, except retrying to build later with new sources.

Gyscos

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
(No subject)
« Reply #6 on: April 02, 2006, 03:18:30 pm »
ooops
sorry, i hadnt seen it xD

semson

  • Traveller
  • *
  • Posts: 10
    • View Profile
(No subject)
« Reply #7 on: April 02, 2006, 07:03:28 pm »
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.

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Compiler Versions
« Reply #8 on: April 03, 2006, 04:31:01 am »
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.
« Last Edit: June 01, 2006, 04:18:04 pm by Induane »

semson

  • Traveller
  • *
  • Posts: 10
    • View Profile
(No subject)
« Reply #9 on: April 04, 2006, 05:31:09 pm »
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

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Missing Dependacies
« Reply #10 on: April 04, 2006, 09:35:59 pm »
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.
« Last Edit: June 01, 2006, 04:19:20 pm by Induane »

yooper

  • Wayfarer
  • *
  • Posts: 1
    • View Profile
still no go:(
« Reply #11 on: April 18, 2006, 09:03:57 am »
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

sardit

  • Hydlaa Resident
  • *
  • Posts: 73
    • View Profile
(No subject)
« Reply #12 on: April 19, 2006, 02:57:23 am »
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...

Psibyre

  • Traveller
  • *
  • Posts: 23
    • View Profile
Re: Build Guide for Ubuntu Dapper Drake
« Reply #13 on: April 29, 2006, 10:57:53 pm »
The XML code did not transfer over.

Does anybody have the code that I should put into my updaterconfig?

Hargoth

  • Traveller
  • *
  • Posts: 10
    • View Profile
Re: Build Guide for Ubuntu Dapper Drake
« Reply #14 on: April 30, 2006, 06:27:23 am »
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