Compiling NeL On GNU/Linux
Requirements
Be sure to have the following tools and libraries installed, see how to add required libraries, if you do not have these installed:
| Name | Tested Version(s) | description |
|---|---|---|
| gcc | 3.4.4, 4.1.2, 4.2.2 | |
| autoconf | 2.59, 2.61 | |
| automake | 1.6.3, 1.10 | |
| libtool | 1.5.2, 1.5.24 | |
| lex/flex | 2.5.33 | |
| yacc/bison | 2.3 | |
| FreeType 2 | 2.3.5 | font rendering in NeL3D |
| Gtk+ 2 (optional) | 2.12.1 | used in the GtkDisplayer |
| OpenAL (optional) | 0.0.8 | 3D sound engine for locational sfx |
| libogg (optional) | 1.1.3 | music support for the OpenAL sound port |
| libvorbis (optional) | 1.2.0 | music support for the OpenAL sound port |
For NeL3D, OpenGL is required. This comes with the proprietary drivers for ATI/AMD and nVidia or by installing Mesa3D, where every newer version will support the minimum requirements easily.
Instead of OpenAL, FMod 3
can used for sound purposes, but it must be installed manually. (Note: Keep in mind there is no specific x86_64 version for AMD64 systems, so it's either not working there at all or needs respective 32bit libraries installed. FModEx will level this problem, but there is no official support for that in OpenNeL/Linux, yet.)
You will also need to have a copy of SVN checked out. If you need assistance with this, please refer to the SVN documentation for more information.
Compiling On GNU/Linux
Change to the engine root directory and make sure that the autogen script is executable, then run it:
$ cd code/nel
$ sh autogen.sh
To compile all of the modules run the command below to configure the build environment and compile. The rest of the modules are on by default, to exclude compilation of sound, simply remove --enable-sound from the configure parameters. Use the disable syntax to disable other modules you may not be interested in. For example if you are only compiling the servers you more than likely will not need the 3D libraries. To disable the 3D libraries, add --disable-3d to prevent their compilation. For most purposes the process below will be sufficient:
$ ./configure --with-gtk --enable-sound
$ make
To install you must be root (see short FAQ below for non-root installs). Switch to root and run the install process:
$ su -
# make install
Add to /etc/ld.so.conf if not present the line below. This automatically instructs both gcc and your shell how to find libraries for compilation and dynamic libraries for running the binaries.
/usr/local/lib
You will need to update the shared library cache so that the programs you link and run know how to find their libraries, once complete you can exit back to your normal user:
# ldconfig
# exit
$
Questions and Answers
Question: Is it possible to install NeL with no access to the root account ?
Answer: Yes, you have to call configure with --prefix argument, like this:
./configure --prefix=/home/my_account/release/install
When you will launch make install, it will create /home/my_account/release/install and the sub-directories listed below and install the files:
- bin
- include
- lib
Question: No matter what I do with configure I still get debugging symbols!
Answer: automake and autoconf set default CXXFLAGS. You can override this yourself by overriding the CXXFLAGS environment variable when running configure:
# CXXFLAGS= ./configure