Ubuntu intrepid
From Peragro Tempus Wiki
Contents |
Version 8.10
Before you start
Before you start building Peragro Tempus from source, you need to make sure that you have several development packages installed. The instructions here are tested using Ubuntu Intrepid Linux.
Please Note, this guide is for Ubuntu Intrepid though it should work as a reference guide for most Linux distro's.
Since Intrepid is installed by default with minimal packages, many required packages are not installed. This command should install all necessary packages. You will also need your universe and multiverse repositories enabled. To enable these do the following:
First open a terminal. This is located in Applications ---> Accessories ---> Terminal This will open a command prompt in which you are going to be typing the following commands. Don't close it accidentally like I do all the time!
# sudo gedit /etc/apt/sources.list
Delete everything in it that you haven't added yourself (which is often everything in the file), and paste the following into the file and save it:
# If you get GPG errors with this sources.list, locate the GPG key in this file
# and run these commands (where KEY is replaced with that key)
#
# gpg --keyserver hkp://subkeys.pgp.net --recv-keys KEY
# gpg --export --armor KEY | sudo apt-key add -
# Ubuntu supported packages
# GPG key: 437D05B5
deb http://us.archive.ubuntu.com/ubuntu/ intrepid main restricted
deb http://us.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ intrepid universe
deb http://us.archive.ubuntu.com/ubuntu/ intrepid-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ intrepid multiverse
deb http://us.archive.ubuntu.com/ubuntu/ intrepid-updates multiverse
# Ubuntu community supported packages
# GPG key: 437D05B5
deb http://security.ubuntu.com/ubuntu intrepid-security main restricted
deb http://security.ubuntu.com/ubuntu intrepid-security universe
deb http://security.ubuntu.com/ubuntu intrepid-security multiverse
# Ubuntu backports project
# GPG key: 437D05B5
deb http://us.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse
Now we need to double check that the gpg keys are added correctly to avoid gpg errors. Sounds scary, but worry not! All it takes is one simple command:
# gpg --keyserver hkp://subkeys.pgp.net --recv-keys 437D05B5 && gpg --export --armor 437D05B5 | sudo apt-key add -
After that we need to refresh our sources.list file like so:
# sudo apt-get update
Once that is completed, we can now fetch all packages that are needed using the following command:
# sudo apt-get --assume-yes install libjpeg62-dev x11proto-gl-dev autoconf jam bison flex-old automake1.9 libcurl4-openssl-dev libmng-dev libmikmod2-dev libogg-dev libvorbis-dev zlib1g-dev libpng12-dev build-essential libtool libglu1-mesa-dev libglu1-xorg-dev xserver-xorg-dev libxt-dev libopenal1 libopenal-dev subversion zlibc libttf2 libfreetype6-dev libfreetype6 libasound2-dev alsa-oss libxxf86vm-dev libxext-dev x11proto-xext-dev libxerces-c2-dev libode0-dev swig libpcre3-dev
Build Instructions
Create a profile file that sets all the necessary environment variables. We'll use a simple command to automatically create the file for you. Remember you should be in the directory you created, usually peragro_svn.
Make sure you're in the correct directory by issuing the command:
cd $ptdir
Now export the variables:
echo 'export CRYSTAL=$PWD/CS_latest
export CEL=$PWD/CEL_latest
export CSCONFPATH=$PWD/CEL_latest
export CEGUI=$PWD/CEGUI-0.7.1
export LD_LIBRARY_PATH=$CEGUI/lib:\
$PWD/CS_latest/:$PWD/CEL_latest/:$LD_LIBRARY_PATH' > profile
Then load the profile. You have to reload the profile every time you exit the console and start another one.
peragro_svn $ source profile
Build CeGui 0.7.1
peragro_svn/ $ cd $ptdir/CEGUI-0.7.1
peragro_svn/CEGUI-0.7.1 $ ./configure --prefix=$CEGUI --disable-xerces-c
peragro_svn/CEGUI-0.7.1 $ make
peragro_svn/CEGUI-0.7.1 $ make install
Build CrystalSpace
peragro_svn/CEGUI-0.7.1 $ cd $ptdir/CS_latest
peragro_svn/CS_latest $ ./configure --without-java --with-CEGUI=$CEGUI
Note: If you want to compile with optimizations for your specific processor, add the following tag to the configure command above. Be warned this may make things less stable.
--enable-cpu-specific-optimizations
Note: If you want to compile debug enabled, add the following tag to the configure command above. Be warned this may make things slower.
--enable-debug
Note: If you want to compile more quickly while utilizing multiple cores in newer multicore systems you might want to try adding the following tag.
-j3
peragro_svn/CS_latest $ jam -aq libs plugins cs-config cs-config-1.9 walktest
Build CEL
peragro_svn/CS_latest $ cd $ptdir/CEL_latest
peragro_svn/CEL_latest $ ./autogen.sh
peragro_svn/CEL_latest $ ./configure
Note: If you want to compile with optimizations for your specific processor, add the following tag to the configure command above. Be warned this may make things less stable.
--enable-cpu-specific-optimizations
peragro_svn/CEL_latest $ jam -aq libs plugins cel-config cel-config-1.9
Building BOOST
PT needs at least boost 1.37, which isn't available in intrepid, you need to compile and install it yourself.
wget http://sourceforge.net/projects/boost/files/boost/1.39.0/boost_1_39_0.tar.gz/download
tar xzf boost_1_39_0.tar.gz
cd boost_1_39_0
./bootstrap.sh --with-libraries=thread --with-libraries=program_options
sudo ./bjam install
Yes you read that correctly, {,} is a bash expansion thing, so executed that exactly like that.
sudo ln -sf /usr/local/include/boost{-1_39,}
Notes
If PT configure stops with:
checking whether the Boost::Program_Options library is available... yes
configure: error: Could not link against !
Configure failed to detect the lib directory for boost. So let's help it. Do:
locate libboost_program_options
Which will give a few lines like:
/lib64/libboost_program_options-gcc43-mt-1_39.so.1.39.0
/lib64/libboost_program_options-gcc43-mt.so
/lib64/libboost_program_options-gcc43-mt-1_39.a
/lib64/libboost_program_options-gcc43-mt.a
/lib64/libboost_program_options-gcc43-mt-1_39.so
So apparently boost's libs got installed in '/lib64/'. So let's configure PT with:
./configure --with-CEGUI=$CEGUI --with-boost-libdir=/lib64/
Build Peragro Tempus
peragro_svn/CEL_latest $ cd $ptdir/peragro
peragro_svn/peragro $ ./autogen.sh
peragro_svn/peragro $ ./configure --with-CEGUI=$CEGUI
peragro_svn/peragro $ jam -q
If everything went right you should now have a fully compiled client rearing and ready to go!
