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

compile tfs 0.4 on debian 19

ximmy

Member
Joined
Oct 31, 2009
Messages
374
Reaction score
6
is it possible to do?
please help
I have error:

Code:
./autogen.sh
'utoreconf: unknown warning category `none
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
 utoreconf: running: aclocal --force --warnings=none
autoreconf: configure.ac: tracing
'utom4te: unknown warning category `none
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force --warnings=none
autoreconf: running: /usr/bin/autoheader --force --warnings=none
autoreconf: running: automake --add-missing --copy --force-missing --warnings=none
autoreconf: Leaving directory `.'
 
Solution
Yes, fun times, thanks gcc.

You need to make clean.
You need to make clean dist. Ignore error if one occurs.

Then you need to add the parameters -no-pie -fno-PIE to both the compiler and linker flags in the .ac files. Then you need to ./autogen.sh again. Then you need to ./configure again. Then you need make again.

Or something like that. I'd have to make a Debian VM to know for sure.
That is not an error. They are only warnings.

If you do the command /usr/bin/ls -lAtr you should see a fresh configure script

And yes, you are likely to run into problems trying to compile TFS 0.40 these days. I have been working on the problem, but due to my refusal to accept utilizing an ancient version of OpenSSL for it's RSA code, I'm not done yet. Porting the RSA code from the current TFS 1.3 back into TFS 0.40 is one of the crazier things I've undertaken.
 
ok thanks but in next step this error:
Code:
 ./build.sh
TheForgottenServer build script -
Using ccache
CCache binaries located in /usr/lib/ccache

Start building on 10 cores, using 11 processes

make  all-am
make[1]: Entering directory '/home/funtera/tmp'
  CXXLD    theforgottenserver
/usr/bin/ld: actions.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: baseevents.o: relocation R_X86_64_32S against symbol `_ZTV5Event' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: beds.o: relocation R_X86_64_32 against symbol `_ZSt4clog@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: chat.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: combat.o: relocation R_X86_64_32 against symbol `g_game' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: condition.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: configmanager.o: relocation R_X86_64_32S against symbol `_ZTV13ConfigManager' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: connection.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: container.o: relocation R_X86_64_32 against symbol `_ZN4Item5itemsE' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: creature.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: creatureevent.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: cylinder.o: relocation R_X86_64_32S against symbol `_ZTV8Cylinder' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: database.o: relocation R_X86_64_32S against symbol `_ZTV8DBInsert' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: databasemanager.o: relocation R_X86_64_32 against symbol `g_config' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: databasemysql.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: depot.o: relocation R_X86_64_32 against symbol `_ZN4Item5itemsE' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: dispatcher.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: fileloader.o: relocation R_X86_64_32S against symbol `_ZTV10FileLoader' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: game.o: relocation R_X86_64_32 against symbol `_ZN4Item5itemsE' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: globalevent.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: group.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: gui.o: relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: house.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: housetile.o: relocation R_X86_64_32 against symbol `g_config' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: inputbox.o: relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ioban.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ioguild.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: iologindata.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: iomap.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: iomapserialize.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: item.o: relocation R_X86_64_32 against symbol `g_game' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: itemattributes.o: relocation R_X86_64_32S against symbol `_ZTV13ItemAttribute' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: items.o: relocation R_X86_64_32S against symbol `_ZTV8ItemType' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: luascript.o: relocation R_X86_64_32 against symbol `_ZN12LuaInterface11m_scriptEnvE' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: mailbox.o: relocation R_X86_64_32 against symbol `g_config' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: manager.o: relocation R_X86_64_32S against symbol `_ZN12LuaInterface11m_scriptEnvE' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: map.o: relocation R_X86_64_32S against symbol `_ZTV9QTreeNode' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: monster.o: relocation R_X86_64_32 against symbol `g_config' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: monsters.o: relocation R_X86_64_32 against symbol `g_config' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: movement.o: relocation R_X86_64_32 against symbol `_ZN15MoveEventScript15luaCallFunctionEP9lua_State' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: networkmessage.o: relocation R_X86_64_32S against symbol `_ZNSs4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: npc.o: relocation R_X86_64_32 against symbol `_ZN9NpcScript14luaActionFocusEP9lua_State' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: otpch.o: relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: otserv.o: relocation R_X86_64_32 against symbol `g_config' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: outfit.o: relocation R_X86_64_32 against symbol `g_game' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: outputmessage.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: party.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: playerbox.o: relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: player.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: position.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: protocol.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: protocolgame.o: relocation R_X86_64_32 against symbol `g_game' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: protocolhttp.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: protocollogin.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: protocolold.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: quests.o: relocation R_X86_64_32S against symbol `_ZNSs4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: raids.o: relocation R_X86_64_32 against symbol `g_game' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: scheduler.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: scriptmanager.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: server.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: spawn.o: relocation R_X86_64_32S against symbol `_ZTV6Spawns' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: spells.o: relocation R_X86_64_32S against symbol `_ZTV11CombatSpell' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: status.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: talkaction.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: teleport.o: relocation R_X86_64_32 against symbol `g_game' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: textlogger.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: thing.o: relocation R_X86_64_32 against symbol `_ZTI8Cylinder' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: tile.o: relocation R_X86_64_32 against symbol `_ZN4Item5itemsE' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: tools.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: trashholder.o: relocation R_X86_64_32 against symbol `_ZN4Item5itemsE' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: waitlist.o: relocation R_X86_64_32 against symbol `g_config' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: weapons.o: relocation R_X86_64_32 against symbol `_ZN4Item5itemsE' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: vocation.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:504: theforgottenserver] Error 1
make[1]: Leaving directory '/home/funtera/tmp'
make: *** [Makefile:446: all] Error 2
Post automatically merged:

i try:
./build.sh -fPIE
and not working
 
Last edited:
Yes, fun times, thanks gcc.

You need to make clean.
You need to make clean dist. Ignore error if one occurs.

Then you need to add the parameters -no-pie -fno-PIE to both the compiler and linker flags in the .ac files. Then you need to ./autogen.sh again. Then you need to ./configure again. Then you need make again.

Or something like that. I'd have to make a Debian VM to know for sure.
 
Solution
thanks! thats work but next problem:

all error here: Untitled - Pastebin (https://pastebin.pl/view/09629314)

Code:
./build.sh
TheForgottenServer build script -
Using ccache
CCache binaries located in /usr/lib/ccache

                 from connection.cpp:18:
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:16: note: candidate: ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*)’
   57 |       explicit seconds(T const& s,
      |                ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:16: note:   template argument deduction/substitution failed:
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp: In substitution of ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*) [with T = Connection::<unnamed enum>]’:
connection.cpp:439:82:   required from here
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:16: error: no type named ‘type’ in ‘struct boost::enable_if<boost::is_integral<Connection::<unnamed enum> >, void>’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘boost::posix_time::seconds::seconds(const boost::posix_time::seconds&)’
   53 |   class BOOST_SYMBOL_VISIBLE seconds : public time_duration
      |                              ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note:   no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘const boost::posix_time::seconds&’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘boost::posix_time::seconds::seconds(boost::posix_time::seconds&&)’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note:   no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘boost::posix_time::seconds&&’
connection.cpp: In member function ‘void Connection::internalSend(OutputMessage_ptr)’:
connection.cpp:507:84: error: no matching function for call to ‘boost::posix_time::seconds::seconds(Connection::<unnamed enum>)’
  507 |   m_writeTimer.expires_from_now(boost::posix_time::seconds(Connection::writeTimeout));
      |                                                                                    ^
In file included from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:16,
                 from /usr/include/boost/asio/time_traits.hpp:23,
                 from /usr/include/boost/asio/basic_deadline_timer.hpp:28,
                 from /usr/include/boost/asio.hpp:24,
                 from otsystem.h:33,
                 from inputbox.h:20,
                 from otpch.h:45,
                 from connection.cpp:18:
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:16: note: candidate: ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*)’
   57 |       explicit seconds(T const& s,
      |                ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:16: note:   template argument deduction/substitution failed:
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp: In substitution of ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*) [with T = Connection::<unnamed enum>]’:
connection.cpp:507:84:   required from here
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:16: error: no type named ‘type’ in ‘struct boost::enable_if<boost::is_integral<Connection::<unnamed enum> >, void>’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘boost::posix_time::seconds::seconds(const boost::posix_time::seconds&)’
   53 |   class BOOST_SYMBOL_VISIBLE seconds : public time_duration
      |                              ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note:   no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘const boost::posix_time::seconds&’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘boost::posix_time::seconds::seconds(boost::posix_time::seconds&&)’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note:   no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘boost::posix_time::seconds&&’
make[1]: *** [Makefile:598: connection.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from baseevents.cpp:21:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
  124 | int32_t round(float v);
      |                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from baseevents.cpp:17:
/usr/include/c++/9/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
make[1]: *** [Makefile:598: baseevents.o] Error 1
In file included from raids.h:28,
                 from item.h:29,
                 from tile.h:23,
                 from housetile.h:20,
                 from house.h:30,
                 from configmanager.cpp:21:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
  124 | int32_t round(float v);
      |                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from configmanager.cpp:17:
/usr/include/c++/9/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
make[1]: *** [Makefile:598: configmanager.o] Error 1
In file included from raids.h:28,
                 from item.h:29,
                 from tile.h:23,
                 from creatureevent.h:23,
                 from creatureevent.cpp:22:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
  124 | int32_t round(float v);
      |                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from creatureevent.cpp:17:
/usr/include/c++/9/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
make[1]: *** [Makefile:598: creatureevent.o] Error 1
In file included from map.h:20,
                 from combat.h:24,
                 from combat.cpp:20:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
  124 | int32_t round(float v);
      |                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from combat.cpp:17:
/usr/include/c++/9/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
combat.cpp: In member function ‘void CombatArea::copyArea(const MatrixArea*, MatrixArea*, CombatArea::MatrixOperation_t) const’:
combat.cpp:1217:42: error: call of overloaded ‘round(float)’ is ambiguous
1217 |      rotatedX = round(newX * a + newY * b),
      |                                          ^
In file included from /usr/include/features.h:446,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from /usr/include/libxml2/libxml/xmlmemory.h:15,
                 from otpch.h:29,
                 from combat.cpp:17:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:298:1: note: candidate: ‘double round(double)’
  298 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__));
      | ^~~~~~~~~~~
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from combat.cpp:17:
/usr/include/c++/9/cmath:1760:3: note: candidate: ‘constexpr long double std::round(long double)’
1760 |   round(long double __x)
      |   ^~~~~
/usr/include/c++/9/cmath:1756:3: note: candidate: ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
In file included from map.h:20,
                 from combat.h:24,
                 from combat.cpp:20:
tools.h:124:9: note: candidate: ‘int32_t round(float)’
  124 | int32_t round(float v);
      |         ^~~~~
combat.cpp:1220:15: error: ‘rotatedY’ was not declared in this scope; did you mean ‘rotatedX’?
1220 |     (*output)[rotatedY + rotateCenterY][rotatedX + rotateCenterX] = (*input)[y][x];
      |               ^~~~~~~~
      |               rotatedX
combat.cpp:1209:9: warning: unused variable ‘c’ [-Wunused-variable]
1209 |   float c = std::sin(angleRad), d = std::cos(angleRad);
      |         ^
combat.cpp:1209:33: warning: unused variable ‘d’ [-Wunused-variable]
1209 |   float c = std::sin(angleRad), d = std::cos(angleRad);
      |                                 ^
make[1]: *** [Makefile:598: combat.o] Error 1
In file included from raids.h:28,
                 from item.h:29,
                 from beds.h:20,
                 from beds.cpp:19:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
  124 | int32_t round(float v);
      |                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from beds.cpp:17:
/usr/include/c++/9/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
make[1]: *** [Makefile:598: beds.o] Error 1
In file included from condition.cpp:20:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
  124 | int32_t round(float v);
      |                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from condition.cpp:17:
/usr/include/c++/9/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
make[1]: *** [Makefile:598: condition.o] Error 1
In file included from map.h:20,
                 from creature.h:28,
                 from creature.cpp:19:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
  124 | int32_t round(float v);
      |                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from creature.cpp:17:
/usr/include/c++/9/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
make[1]: *** [Makefile:598: creature.o] Error 1
In file included from map.h:20,
                 from creature.h:28,
                 from player.h:23,
                 from party.h:20,
                 from chat.h:24,
                 from chat.cpp:18:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
  124 | int32_t round(float v);
      |                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from chat.cpp:17:
/usr/include/c++/9/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
chat.cpp: In member function ‘ChatChannel* Chat::getChannel(Player*, uint16_t)’:
chat.cpp:1145:10: error: cannot convert ‘bool’ to ‘ChatChannel*’ in return
1145 |   return false;
      |          ^~~~~
make[1]: *** [Makefile:598: chat.o] Error 1
In file included from raids.h:28,
                 from item.h:29,
                 from container.h:23,
                 from container.cpp:19:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
  124 | int32_t round(float v);
      |                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from container.cpp:17:
/usr/include/c++/9/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
make[1]: *** [Makefile:598: container.o] Error 1
In file included from actions.cpp:21:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
  124 | int32_t round(float v);
      |                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21,
                 from /usr/include/boost/container_hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/container_hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/container_hash/hash.hpp:21,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from otpch.h:35,
                 from actions.cpp:17:
/usr/include/c++/9/cmath:1756:3: note: previous declaration ‘constexpr float std::round(float)’
1756 |   round(float __x)
      |   ^~~~~
make[1]: *** [Makefile:598: actions.o] Error 1
make[1]: Leaving directory '/home/funtera/tmp'
make: *** [Makefile:446: all] Error 2
root@vmi368124:/home/funtera/tmp#
 
That first is a problem that requires you to patch the source code to make an explicit casting. However my sources for TFS at rev 3884 do not have a connection.cpp this is over 507 lines long, as yours does evidenced in line 21 of the log you have embedded above.

If you are needing a version of TFS for a Tibia protocol greater than 8.60, why are you compiling this old version at all?

The rest of your bugs are not immediately familiar but I'm sure there shouldn't be that many problems from cmath
 
Back
Top