• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux Prepare linux for compile OTServer (Debian or RedHat)

brunodsfreitas

New Member
Joined
Jul 11, 2011
Messages
3
Reaction score
0
Location
Brazil
  • First, sorry my english.

For compile OTServer on linux based in Debian distributions, like Ubuntu (32 or 64), you need have root previleges, and run the next commands:

#apt-get update
!! corrected
#apt-get install autoconf libxml2-dev liblua5.1-0-dev g++ libgmp3-dev libcrypto++-dev libboost-filesystem-dev libboost-system-dev libboost-regex-dev libboost-thread-dev libmysqlclient15-dev make openssl libcurl4-openssl-dev mysql-server sqlite libsqlite3-dev


I dont have errors with compile TFS0.3

For compile OTServer on linux based in RedHat distributions, like centos (32 or 64), you need have root previleges and run next commands:

#yum update
#yum install boost-devel boost libxml2-devel libxml2 mysql-devel autoconf automake gcc-c++ gcc mysql-server sqlite-devel boost-devel libxml2-devel lua-devel


If otserver show message like "Killed" or "Process killed", is insufficient memory. The global server need more than 3,5GB only for start server with low performance.

If you have any error, post and i try to resolve the error

Thanks
 
Last edited:
Thanks mate, that kicked me off in the right direction. If you could continue this into a fully fledged RedHat compiling tutorial, that would be great!

I'm currently stuck on ./configure, it throws this error
Code:
checking gmp.h usability... no
checking gmp.h presence... no
checking for gmp.h... no
configure: error: "GMP header not found."

Any idea mate?

Thanks

**EDIT** Sorted it out with
Code:
wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.2.tar.bz2
tar -xjvf gmp-4.2.2.tar.bz2
cd gmp-4.2.2
./configure
make
make check
make install

For anyone else having the same problem.
 
Last edited:
Thanks mate, that kicked me off in the right direction. If you could continue this into a fully fledged RedHat compiling tutorial, that would be great!

I'm currently stuck on ./configure, it throws this error
Code:
checking gmp.h usability... no
checking gmp.h presence... no
checking for gmp.h... no
configure: error: "GMP header not found."

Any idea mate?

Thanks

**EDIT** Sorted it out with
Code:
wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.2.tar.bz2
tar -xjvf gmp-4.2.2.tar.bz2
cd gmp-4.2.2
./configure
make
make check
make install

For anyone else having the same problem.


U can find packages first on default repository with this command:

if Debian use:
aptitude search XXXX (in newer ubuntu version, u need install aptitude command with this: apt-get install aptitude)

else if RedHat (like centos)
yum search XXXX
 
i can't compile server 0.3 rev 3777 with this distributions..

when make this command
./configure --enable-mysql
take this error:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for ptrdiff_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for ceil... yes
checking for floor... yes
checking for ftime... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for memset... yes
checking for pow... yes
checking for sqrt... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for strstr... yes
checking for strtol... yes
checking for xml2-config... /usr/bin/xml2-config
checking for libxml - version >= 2.6.5... yes (version 2.7.8)
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for main in -lz... yes
checking for main in -lboost_thread-gcc-mt... no
checking for main in -lboost_thread-mt... yes
checking for main in -lboost_regex-gcc-mt... no
checking for main in -lboost_regex-mt... yes
checking for main in -lboost_system-gcc-mt... no
checking for main in -lboost_system-mt... yes
checking for main in -lpthread... yes
checking for main in -lboost_date_time-gcc-mt... no
checking for main in -lboost_date_time-mt... yes
checking for main in -lboost_filesystem-gcc-mt... no
checking for main in -lboost_filesystem-mt... yes
checking openssl/rsa.h usability... yes
checking openssl/rsa.h presence... yes
checking for openssl/rsa.h... yes
checking openssl/bn.h usability... yes
checking openssl/bn.h presence... yes
checking for openssl/bn.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking openssl/sha.h usability... yes
checking openssl/sha.h presence... yes
checking for openssl/sha.h... yes
checking openssl/md5.h usability... yes
checking openssl/md5.h presence... yes
checking for openssl/md5.h... yes
checking for main in -lcrypto... yes
checking for LUA... no
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
checking lua5.1/lua.h usability... yes
checking lua5.1/lua.h presence... yes
checking for lua5.1/lua.h... yes
checking for main in -llua... no
checking for main in -llua5.1... yes
checking mysql/mysql.h usability... yes
checking mysql/mysql.h presence... yes
checking for mysql/mysql.h... yes
checking for main in -lmysqlclient... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

theforgottenserver 0.4.3777

Server diagnostics.......... : no
Login server mode........... : no
OTAdmin protocol............ : no
Root run permission......... : no
Login server mode........... : no
Home-directory configuration : no
OTServ custom allocator..... : no
Debug build................. : no
Using LuaJIT................ : no

Build with MySQL............ : yes
Build with SQLite........... : no
Build with PostgreSQL....... : no
 
And when execute this command
./build.sh
take this error:

TheForgottenServer build script -
Using ccache
CCache binaries located in /usr/lib/ccache

Start building on 4 cores, using 5 processes

make all-am
make[1]: Entering directory `/home/sources'
CXX actions.o
CXX baseevents.o
CXX beds.o
CXX chat.o
CXX combat.o
In file included from /usr/include/boost/thread/pthread/thread_data.hpp:11,
from /usr/include/boost/thread/thread.hpp:18,
from /usr/include/boost/thread.hpp:14,
from otsystem.h:35,
from inputbox.h:21,
from otpch.h:46,
from combat.cpp:18:
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::thread_exception::thread_exception()’:
/usr/include/boost/thread/exceptions.hpp:41: error: no match for call to ‘(const boost::system::error_category) ()’
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::thread_exception::thread_exception(int)’:
/usr/include/boost/thread/exceptions.hpp:45: error: no match for call to ‘(const boost::system::error_category) ()’
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::thread_exception::thread_exception(int, const char*)’:
/usr/include/boost/thread/exceptions.hpp:49: error: no match for call to ‘(const boost::system::error_category) ()’
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::thread_exception::thread_exception(int, const std::string&)’:
/usr/include/boost/thread/exceptions.hpp:53: error: no match for call to ‘(const boost::system::error_category) ()’
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::condition_error::condition_error()’:
/usr/include/boost/thread/exceptions.hpp:75: error: no match for call to ‘(const boost::system::error_category) ()’
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::condition_error::condition_error(int)’:
/usr/include/boost/thread/exceptions.hpp:78: error: no match for call to ‘(const boost::system::error_category) ()’
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::condition_error::condition_error(int, const char*)’:
/usr/include/boost/thread/exceptions.hpp:82: error: no match for call to ‘(const boost::system::error_category) ()’
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::condition_error::condition_error(int, const std::string&)’:
/usr/include/boost/thread/exceptions.hpp:86: error: no match for call to ‘(const boost::system::error_category) ()’
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::thread_resource_error::thread_resource_error()’:
/usr/include/boost/thread/exceptions.hpp:125: error: ‘boost::system::errc’ has not been declared
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::unsupported_thread_option::unsupported_thread_option()’:
/usr/include/boost/thread/exceptions.hpp:153: error: ‘boost::system::errc’ has not been declared
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::invalid_thread_argument::invalid_thread_argument()’:
/usr/include/boost/thread/exceptions.hpp:177: error: ‘boost::system::errc’ has not been declared
/usr/include/boost/thread/exceptions.hpp: In constructor ‘boost::thread_permission_error::thread_permission_error()’:
/usr/include/boost/thread/exceptions.hpp:201: error: ‘boost::system::errc’ has not been declared
In file included from /usr/include/boost/thread/pthread/mutex.hpp:13,
from /usr/include/boost/thread/mutex.hpp:17,
from /usr/include/boost/thread/pthread/thread_data.hpp:14,
from /usr/include/boost/thread/thread.hpp:18,
from /usr/include/boost/thread.hpp:14,
from otsystem.h:35,
from inputbox.h:21,
from otpch.h:46,
from combat.cpp:18:
/usr/include/boost/range/iterator_range_core.hpp:553: error: redefinition of ‘template<class ForwardRange> boost::iterator_range<typename boost::range_iterator<C>::type> boost::make_iterator_range(ForwardRange&)’
/usr/include/boost/range/iterator_range.hpp:560: error: ‘template<class ForwardRange> boost::iterator_range<typename boost::range_iterator<C>::type> boost::make_iterator_range(ForwardRange&)’ previously declared here
/usr/include/boost/range/iterator_range_core.hpp:561: error: redefinition of ‘template<class ForwardRange> boost::iterator_range<typename boost::range_iterator<const T>::type> boost::make_iterator_range(const ForwardRange&)’
/usr/include/boost/range/iterator_range.hpp:568: error: ‘template<class ForwardRange> boost::iterator_range<typename boost::range_iterator<const T>::type> boost::make_iterator_range(const ForwardRange&)’ previously declared here
/usr/include/boost/range/iterator_range_core.hpp:575: error: redefinition of ‘template<class Range> boost::iterator_range<typename boost::range_iterator<C>::type> boost::iterator_range_detail::make_range_impl(Range&, typename boost::range_difference<C>::type, typename boost::range_difference<C>::type)’
/usr/include/boost/range/iterator_range.hpp:582: error: ‘template<class Range> boost::iterator_range<typename boost::range_iterator<C>::type> boost::iterator_range_detail::make_range_impl(Range&, typename boost::range_difference<C>::type, typename boost::range_difference<C>::type)’ previously declared here
In file included from /usr/include/boost/lexical_cast.hpp:156,
from otsystem.h:39,
from inputbox.h:21,
from otpch.h:46,
from chat.cpp:18:
/usr/include/boost/range/iterator_range_core.hpp:611: error: redefinition of ‘template<class Range> boost::iterator_range<typename boost::range_iterator<C>::type> boost::make_iterator_range(Range&, typename boost::range_difference<C>::type, typename boost::range_difference<C>::type)’
/usr/include/boost/range/iterator_range.hpp:618: error: ‘template<class Range> boost::iterator_range<typename boost::range_iterator<C>::type> boost::make_iterator_range(Range&, typename boost::range_difference<C>::type, typename boost::range_difference<C>::type)’ previously declared here
/usr/include/boost/range/iterator_range_core.hpp:621: error: redefinition of ‘template<class Range> boost::iterator_range<typename boost::range_iterator<const T>::type> boost::make_iterator_range(const Range&, typename boost::range_difference<C>::type, typename boost::range_difference<C>::type)’
/usr/include/boost/range/iterator_range.hpp:628: error: ‘template<class Range> boost::iterator_range<typename boost::range_iterator<const T>::type> boost::make_iterator_range(const Range&, typename boost::range_difference<C>::type, typename boost::range_difference<C>::type)’ previously declared here
In file included from /usr/include/boost/lexical_cast.hpp:156,
from otsystem.h:39,
from inputbox.h:21,
from otpch.h:46,
from chat.cpp:18:
/usr/include/boost/range/iterator_range_core.hpp:638: error: redefinition of ‘template<class SeqT, class Range> SeqT boost::copy_range(const Range&)’
/usr/include/boost/range/iterator_range.hpp:645: error: ‘template<class SeqT, class Range> SeqT boost::copy_range(const Range&)’ previously declared here
make[1]: *** [chat.o] Error 1
make[1]: Leaving directory `/home/sources'
make: *** [all] Error 2

help me please :(
 
Back
Top