-
-
Notifications
You must be signed in to change notification settings - Fork 198
Compiling OTX2 on Ubuntu
A detailed and always up-to-date tutorial may be found here: Download required packages Launch a terminal, and paste in the following commands:
apt-get update
apt-get install git unzip zip gdb screen htop build-essential pkg-config libboost-dev libgmp3-dev libxml2-dev sqlite3 libsqlite3-dev libtcmalloc-minimal4 liblua5.1 libmysqlclient-dev ccache libboost-filesystem-dev libboost-regex-dev libboost-system-dev libboost-thread-dev libboost-iostreams-dev
(ps, on debian 8+, you must enable backports, or better yet, replace libmysqlclient-dev
with libmariadbclient-dev-compat
)
Compiling
Download sources - Launch a terminal, and paste in this command:
for otx2:
git clone https://github.com/mattyx14/otxserver.git -b otxserv2
After downloading the sources, enter the corresponding directory in your machine(the one with the .h and .cpp files), by default OTX2 is set to compile using MYSQL, if you want to use SQLITE you'll have to open the Makefile and change there. After everything is as you please, just type this in the terminal:
make -j $(nproc)
where $(nproc) is the amount of cores that the system will use to compile the sources. If you have a system with 4 cores, it should be like this:
make -j 4
If you are using UBUNTU 16 and the compillation fails with an error about the libtcmalloc-minimal4 not being found(g++: error: /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4: No such file or directory) just open the Makefile inside the sources folder, look for '/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4' and change it to the correct path.(it may vary based on your operational system, for UBUNTU 16 the correct one is /usr/lib/libtcmalloc_minimal.so.4)