How to compile OpenTTD for a Synology DS212+
This guide explains how to compile and install an OpenTTD server on your Synology DS212+ NAS.
Installing dependencies
Compiler packages
sudo ipkg install optware-devel |
sudo ipkg install optware-devel
Zlib
wget http://zlib.net/zlib-1.2.7.tar.gz
tar zxvf zlib-1.2.7.tar.gz
cd zlib-1.2.7
./configure --prefix=/opt --static
make
sudo make install |
wget http://zlib.net/zlib-1.2.7.tar.gz
tar zxvf zlib-1.2.7.tar.gz
cd zlib-1.2.7
./configure --prefix=/opt --static
make
sudo make install
LZO
wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz
tar zxvf lzo-2.06.tar.gz
cd lzo-2.06
./configure --prefix=/opt
make
sudo make install |
wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz
tar zxvf lzo-2.06.tar.gz
cd lzo-2.06
./configure --prefix=/opt
make
sudo make install
LZMA
wget http://tukaani.org/xz/xz-5.0.4.tar.gz
tar zxvf xz-5.0.4.tar.gz
cd xz-5.0.4
./configure --prefix=/opt
make
sudo make install |
wget http://tukaani.org/xz/xz-5.0.4.tar.gz
tar zxvf xz-5.0.4.tar.gz
cd xz-5.0.4
./configure --prefix=/opt
make
sudo make install
Create a symlink to the liblzma.so.5 to prevent start up errors later on.
sudo ln -s /opt/lib/liblzma.so.5 /usr/lib/liblzma.so.5 |
sudo ln -s /opt/lib/liblzma.so.5 /usr/lib/liblzma.so.5
Last thing you need to do is patch the pc file since the installed pkg-config version doesnt understand the URL entry.
sudo nano /opt/lib/pkgconfig/liblzma.pc |
sudo nano /opt/lib/pkgconfig/liblzma.pc
Change
URL: http://tukaani.org/xz/
to
#URL: http://tukaani.org/xz/
Save the file
Compiling OpenTTD
cd ~
mkdir games
cd games
wget http://binaries.openttd.org/releases/1.2.2/openttd-1.2.2-source.tar.gz
tar zxvf openttd-1.2.2-source.tar.gz
cd openttd-1.2.2
./configure --enable-dedicated --with-zlib=/opt/lib/libz.a --with-liblzo2=/opt/lib/liblzo2.a |
cd ~
mkdir games
cd games
wget http://binaries.openttd.org/releases/1.2.2/openttd-1.2.2-source.tar.gz
tar zxvf openttd-1.2.2-source.tar.gz
cd openttd-1.2.2
./configure --enable-dedicated --with-zlib=/opt/lib/libz.a --with-liblzo2=/opt/lib/liblzo2.a
Now you can compile OpenTTD (this might take a while…)
Done!
Launching OpenTTD
- Install a base graphics set (or install OpenGFX). Copy the files to:
- Change to the bin directory
- Launch openttd in server mode:
I have try to follow you tutorial but
I have the following error when I do make :
DiskStation> make
make[1]: Entering directory `/root/games/openttd-1.3.0-RC1/openttd-1.2.3/objs/lang’
[LANG] Compiling and Linking endian_check
/opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libm.so: undefined reference to `__adddf3@GLIBC_2.3.3′
/opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libm.so: undefined reference to `__muldf3@GLIBC_2.3.3′
/opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libm.so: undefined reference to `__fixunsdfsi@GLIBC_2.3.3′
/opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libm.so: undefined reference to `__floatsidf@GLIBC_2.3.3′
/opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libm.so: undefined reference to `__extendsfdf2@GLIBC_2.3.3′
/opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libm.so: undefined reference to `__subdf3@GLIBC_2.3.3′
collect2: ld returned 1 exit status
make[1]: *** [endian_check] Error 1
make[1]: Leaving directory `/root/games/openttd-1.3.0-RC1/openttd-1.2.3/objs/lang’
make: *** [all] Error 1
do you know why I have this error ?
Thanks a lot for you response
11 Mar 2013 |
Strange, not sure why this is happening (seems like a missing lib). Are you trying to compile 1.3.0-RC1 or 1.2.3? Your path name is a bit confusing. Perhaps try to install the package “optware-devel” and try again?
14 Mar 2013 |
I have try to compile the version 1.3.0 (last stable version) and the 1.2.3. I have the same issue with both.
The strange path is because I have try first with 1.3.0 and then with 1.2.3 (downloaded in the directory of 1.3.0).
The first line of the tuto is “sudo ipkg install optware-devel” so I have already install this package.
I’m completely loss I don’t know why it doesn’t works
16 Mar 2013 |
I forgot to specified that I try on a DS413
11 Mar 2013 |
Hello,
I am able to make a server and run it without LZMA but without it I can’t save the map.
So now I want to make a server with LZMA installed but I keep getting the following error:
you supplied ‘/usr/lib/liblzma.so.5’, but it seems invalid
I am using the following command:
./configure –enable-dedicated –with-zlib=/opt/lib/libz.so.1 –with-
liblzo2=/opt/lib/liblzo2.a –with-lzma=/opt/lib/liblzma.so.5
I have installed all libs and updated them.
28 May 2013 |
So far, the very first command line is proving tricky enough. It seems, however, that this link: https://gist.github.com/marlun78/9349792 was of great help, so I will share it here for others.
02 Aug 2017 |
I keep running into this `/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: ERROR: /lib/libc.so.6 uses VFP register arguments, endian_check does not` error message when make. All the packages we succesfully installed using iplg, and `./configure` successfully, but not to libz. Could this be the (root of the) problem?
Thanks in advance for any help.
03 Aug 2017 |