• 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!

Compiling Compiling The Forgotten Server on Debian

Dan Mandes

The same old Man
Joined
Jul 11, 2007
Messages
39
Reaction score
0
Location
São Paulo, Brasil
The binary of The Forgotten Server Linux Version precompiled don't works on many Debian Based Distros, the soluction is compile the sources in this distros.

Thanks to Talaturen

First, you must download the Requered packages:
# apt-get install subversion autoconf automake make g++ libxml2 libxml2-dev libxml++2.6-dev lua5.1 liblua5.1-0 liblua5.1-0-dev libboost-dev libboost-regex-dev libboost-thread-dev libmysql++-dev libgmp3-dev

Now, u need download the lastest version of sources:

$ svn checkout https://forgottenserver.svn.sourceforge.net/svnroot/forgottenserver/

And compile it!:
$ cd forgottenserver/
$ make


Credits 99,9% by Talaturen.
and 0,1% by me
 
Hello,
My first post on this forum ;d.
I have error witch compiling in Ubuntu 7.10.
Code:
game.cpp: In member function ‘bool Game::playerCloseRuleViolation(uint32_t, const std::string&)’:
game.cpp:1945: error: no match for ‘operator=’ in ‘it = 0’
/usr/include/c++/4.1.3/bits/stl_tree.h:152: note: candidates are: std::_Rb_tree_iterator<std::pair<const unsigned int, RuleViolation> >& std::_Rb_tree_iterator<std::pair<const unsigned int, RuleViolation> >::operator=(const std::_Rb_tree_iterator<std::pair<const unsigned int, RuleViolation> >&)
make: *** [game.o] Error 1
I own all necessary libraries [ofc. libraries posted in this topic].
Please help.
#Edit
Solution:
Linux users can comment line 1945 in game.cpp for now ( it = NULL; ), if you don't want to comment it then report it to the OpenTibia developers.
Regards,
Mistral
 
Last edited:
So I did the apt-get and svn checkout, no problems there. And then changed to the forgottenserver directory and typed in 'make' and hit enter and this is what happens.

wtf.png


I looked through the forgottenserver directory a bit and only saw a auto-sql-updater, forgottenadmin, forgottenserver, and tfscms directories, and under those for the most part were only directories labeled trunk.

I'm stupid I know, but where's the makefile or what do I put as a target for the make command? :/


---------------EDIT----------------
So yeah, I am stupid, I went to the tags/0.2 folder and ran make, but it got to like the 2nd file and told me I was out of virtual memory so I'm restarting my server and hopefully it doesn't run out of memory >.< (I have a debian based VPS that I'm trying to install this on, doesn't seem to be working out well)
 
Last edited:
I have problem with compiling TFS 0.3 on debian.
Code:
ks355867:/home/ots/source/trunk# make
rm -rf *.o
g++ -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__NO_HOMEDIR_CONF__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -O1 -c account.cpp
g++ -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__NO_HOMEDIR_CONF__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -O1 -c actions.cpp
g++ -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__NO_HOMEDIR_CONF__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -O1 -c admin.cpp
In file included from admin.cpp:24:
connection.h:25:20: error: asio.hpp: Nie ma takiego pliku ani katalogu
connection.h:65: error: expected ';' before '(' token
connection.h:98: error: 'asio' has not been declared
connection.h:98: error: expected `)' before '&' token
connection.h:118: error: 'asio' has not been declared
connection.h:118: error: ISO C++ forbids declaration of 'socket' with no type
connection.h:118: error: expected ';' before '&' token
connection.h:120: error: expected `;' before 'void'
connection.h:128: error: expected ',' or '...' before '::' token
connection.h:128: error: ISO C++ forbids declaration of 'asio' with no type
connection.h:129: error: expected ',' or '...' before '::' token
connection.h:129: error: ISO C++ forbids declaration of 'asio' with no type
connection.h:131: error: expected ',' or '...' before '::' token
connection.h:131: error: ISO C++ forbids declaration of 'asio' with no type
connection.h:133: error: expected ',' or '...' before '::' token
connection.h:133: error: ISO C++ forbids declaration of 'asio' with no type
connection.h:134: error: expected ',' or '...' before '::' token
connection.h:134: error: ISO C++ forbids declaration of 'asio' with no type
connection.h:143: error: 'asio' has not been declared
connection.h:143: error: ISO C++ forbids declaration of 'socket' with no type
connection.h:143: error: expected ';' before 'm_socket'
make: *** [admin.o] Błąd 1
How can i solve it?
 
If you have asio errors, execute this (Ubuntu):
Code:
wget http://heanet.dl.sourceforge.net/sourceforge/asio/boost_asio_1_0_0.tar.gz
tar -xf boost_asio_1_0_0.tar.gz
sudo cp -ar boost_asio_1_0_0/boost/* /usr/include/boost/
sudo g++ boost_asio_1_0_0/libs/system/src/error_code.cpp -c -o /usr/lib/libboost_system.a

Debian (as root):
Code:
wget http://heanet.dl.sourceforge.net/sourceforge/asio/boost_asio_1_0_0.tar.gz
tar -xf boost_asio_1_0_0.tar.gz
cp -ar boost_asio_1_0_0/boost/* /usr/include/boost/
g++ boost_asio_1_0_0/libs/system/src/error_code.cpp -c -o /usr/lib/libboost_system.a
 
I'm gettin' this error when I'm using command MAKE and trying to compile it.

Code:
g++ -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__NO_HOMEDIR_CONF__ -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -Werror -O1 -c admin.cpp
In file included from /usr/include/c++/4.3/ext/hash_map:64,
                 from definitions.h:151,
                 from otpch.h:10,
                 from admin.cpp:20:
/usr/include/c++/4.3/backward/backward_warning.h:32:2: error: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
make: *** [admin.o] Error 1
 
When I'm using command

Code:
make

I get this one:

Code:
g++ -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__NO_HOMEDIR_CONF__ -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -Werror -O1 -c admin.cpp
In file included from /usr/include/c++/4.3/ext/hash_map:64,
                 from definitions.h:151,
                 from otpch.h:10,
                 from admin.cpp:20:
/usr/include/c++/4.3/backward/backward_warning.h:32:2: error: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
make: *** [admin.o] Error 1

Can someone tell me what is wrong?

I got the same problem but instead of admin.cpp i got accounts.cpp
 
I have solved the problem already , If you want I can tell you what to do :)
 
Well it turned out to be as simple as compiler says (again :3 )

Text edit the makefile, look for the line beggining with "FLAGS = " and at the end of the line ( I mean just after the last phrase, in my case it's -D__ENABLE_SERVER_DIAGNOSTIC__ ) add "-Wno-deprecated" , but without " and ". Of course keep in mind that spaces between phrases have to be kept.

Though I am receiving another error
Code:
game.o: In function `Game::playerSayCommand(Player*, SpeakClasses, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
game.cpp:(.text+0xb427): undefined reference to `commands'
collect2: ld returned 1 exit status

EDIT : Hahz updating the sources solved the problem. Would you tell me what was the error ?
 
Last edited:
Back
Top