Compiling 0.4 on linux

Sun

Knowledge is power - France is bacon
Joined
Jan 26, 2015
Messages
333
Best answers
22
Reaction score
174
Open your terminal and run the following lines in succession.
NOTE: if you're on debian change libmysqlclient-dev to libmariadbclient-dev
Code:
sudo apt-get install autogen autoconf automake build-essential cmake g++ cpp gcc subversion lib32ncurses5-dev libreadline-dev libboost-dev libboost-thread-dev libboost-regex-dev libboost-date-time-dev libboost-filesystem-dev libxml2-dev libssl-dev libmysql++-dev libtool pkg-config libxml++-dev zlib1g-dev libcrypto++-dev libmysqlclient-dev
cd to directory before sources_folder
sudo chmod -R 777 sources_folder
cd sources

sed -i 's/it->leaf()/it->path().filename().string()/g' *.cpp
sed -i 's/it->path().filename() + "/" + s, npc, recursively/(it->path() / s).native(), npc, recursively/g' *.cpp
sed -i 's/-llua/-llua5.1/g' Makefile
sed -i 's/ -lxml2$/ -lxml2 -lpthread/' Makefile

./autogen.sh
./configure --enable-mysql
make -j 2
Updated with methods provided by @Don Daniello
 
Last edited:

Don Daniello

/root
Staff member
Administrator
Joined
Apr 11, 2008
Messages
3,523
Best answers
15
Reaction score
931
Location
Proland
Good idea to share this.

I think installing Lua from source is completely unnecessary.

I have in the past prepared commands to automatically fix the source like you did:
Code:
sed -i 's/it->leaf()/it->path().filename().string()/g' *.cpp
sed -i 's/#define BOOST_FILESYSTEM_VERSION 2/#define BOOST_FILESYSTEM_VERSION 3/g' definitions.h
sed -i 's/ -lxml2$/ -lxml2 -lpthread/' Makefile
 
Top