HowTo:Compile from SVN

From VsWiki

Jump to: navigation, search
main.php?g2_view=core.DownloadItem&g2_itemId=6604&g2_serialNumber=1&ext=.png Compiling with Cygwin main.php?g2_view=core.DownloadItem&g2_itemId=6608&g2_serialNumber=1&ext=.png HowTos Compiling from SVN on Mac OSX main.php?g2_view=core.DownloadItem&g2_itemId=6606&g2_serialNumber=1&ext=.png

How to compile from SVN under Linux.

See also: HowTo:Cygwin Compiling, HowTo:VCPP Compiling, HowTo:Checkout SVN (Ubuntu Linux)

Contents

Getting the SVN-files

Requirements

In order to compile Vegastrike there are a few things to check:

  • Make sure you have these packages installed ...
    • make
    • gcc
    • automake at least version 1.6
    • autoconf at least version 2.53
    • X11...
    • libpng + libpng-devel <-- libpng 3 is recommended.
    • python and python-dev <-- 2.2.1
    • expat + expat-devel
    • (lib)jpeg + libjpeg-devel
    • opengl (see below) (you probably already have it)
    • glut + glut-devel
    • openal + openal-devel
    • libgtk2.0 + libgtk2.0-devel
    • libfreeimage3 (vegastrike itself can compile without it, but mesher can't)

This probably should do the trick in debian/ubuntu (copy and paste the entire code into terminal):

sudo apt-get install libpng12-0 libpng12-dev python-dev libexpat1-dev     \
        libjpeg62-dev glutg3-dev libopenal-dev libgtk2.0-dev libogg-dev libvorbis-dev \
        build-essential libgl1-mesa-dev automake autoconf

Compiling

The compile procedure should look like the following listing. Remember the configure part depends on above requirements. Though autoconf may not work, if so just skip it.

cd ./vegastrike
./bootstrap-sh
./configure --enable-flags='-O3 -g'  # or --enable-debug to disable optimization.  -ffast-math will cause problems in code that checks for infinities. Note that in the first flag there's a capital 'o', not a zero.
make
make install # [AS ROOT]


  • To be sure set the data dir to your vs-data dir:
./configure --with-data-dir=<DIR> ........
  • When using libpng 1.2,
--with-png-inc=<DIR>

is needed. An example is

--with-png-inc=/usr/include/libpng12/
  • If you don't want to compile with GTK just turn it off, however you will not get a setup program if you do this:
./configure --disable-gtk ...........
  • If you only want the server, and want to disable all GUI components--This removes the dependency on X11, OpenGL, SDL, GLUT, OpenAL.
./configure --disable-client ...........
  • See this thread about boost versions. Set this option to 1.28, 1.29, 1.33, or "system" if the default does not compile.
./configure --with-boost=<VER> ...........

You will likely receive some error messages during any of these stages, especially during the configure part. If they tell you that your system is missing some development libraries, install them. How this is done depends on your Linux distribution, but we will assist you in the Compiling Problems forums. You will be left with a file called "config.log" please attach that instead of copy-and-pasting thousands of lines of error messages. It's all in this file.

After you installed the missing libraries repeat the last (failed) step and continue.


Note: The configure script currently has a bug that can cause it to incorrectly report on the absence of GLUT. If you are sure you have installed glut-devel and are still seeing this error, check near the end of config.log to see if another library (such as libxmu or libxi) is the true culprit. [1]


Make

The final step for compiling is the make command. The Makefile should be able to compile most of the included utilities.

To compile mesher, for example, type:

make mesher
  • Running
make all-am

reduces memory usage while compiling because there's only one instance of make instead of two. From this forum thread.

  • The step
make install

is optional as the program is quite happy running in userland.

If you receive error without any mention of missing library (or something like) after very long line about running g++, try to set proper permissions or simply force your way through it and see whether it's your problem (if you're superuser). It looks like that:

collect2: ld returned 1 exit status
make[1]: *** [vegastrike] Error 1
make[1]: Leaving directory `/home/username/Games/VegaStrike/vegastrike'
make: *** [all] Error 2
~/Games/VegaStrike/vegastrike$ sudo make

See also


main.php?g2_view=core.DownloadItem&g2_itemId=6604&g2_serialNumber=1&ext=.png Compiling with Cygwin main.php?g2_view=core.DownloadItem&g2_itemId=6608&g2_serialNumber=1&ext=.png HowTos Compiling from SVN on Mac OSX main.php?g2_view=core.DownloadItem&g2_itemId=6606&g2_serialNumber=1&ext=.png
Personal tools