• 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 Help Compiling My Source (linux/widnows)

Yusuf El-Shora

Herizona-Ots
Joined
Jul 19, 2015
Messages
170
Reaction score
6
Location
Lala-Land
As the title said..
I need help with compiling .. :(

I got a source and I can't compile it not in Linux or Windows (tfs 0.4/ 8.6 Client)..

Although someone told me it's can be compiled on anyone of these OS ..

I Got two VPS one is Windows Server 2016, the other is LINUX Server Ubunto 16 ..

If anyone professional willing to help I will give him Access to the VPS he want or able to compile in .. :)

Hopefully someone help me.

Thanks in advance :)
 
Last edited by a moderator:
• install libs:
Code:
apt-get install libboost1.55-dev libboost-system1.55-dev libboost-filesystem1.55-dev libboost-date-time1.55-dev libboost-regex1.55-dev libboost-thread1.55-dev libgmp3-dev liblua5.1-0 liblua5.1-0-dev liblua50 liblua50-dev liblualib50 liblualib50-dev lua50 lua5.1 libsqlite0-dev libsqlite3-dev sqlite3 libmysql++-dev libmysqlclient-dev mysql-client-5.5 mysql-server-5.5 mysql-common libxml2-dev libxml++2.6-dev cpp gcc g++ make automake autoconf pkg-config subversion liblua5.1-sql-mysql-dev liblua5.1-sql-sqlite3-dev zlib1g-dev zlib1g libcrypto++-dev libcrypto++8

• NOTE: If it cant find any of the libs just run `apt-cache search LIBNAME` if that doesnt work, update your sources. (apt-get update && apt-get upgrade)

After you've installed the libs go to the sources folder where all the .hpp/h, .cpp files are stored and run the following commands(+options).

1.
Code:
 ./autogen.sh ( IF it says 'permission denied' run ' chmod +x autogen.sh ' )
2.
Code:
 ./configure --enable-mysql --enable-sqlite --enable-remote-control --enable-server-diag
3.
Code:
 make
 
• install libs:
Code:
apt-get install libboost1.55-dev libboost-system1.55-dev libboost-filesystem1.55-dev libboost-date-time1.55-dev libboost-regex1.55-dev libboost-thread1.55-dev libgmp3-dev liblua5.1-0 liblua5.1-0-dev liblua50 liblua50-dev liblualib50 liblualib50-dev lua50 lua5.1 libsqlite0-dev libsqlite3-dev sqlite3 libmysql++-dev libmysqlclient-dev mysql-client-5.5 mysql-server-5.5 mysql-common libxml2-dev libxml++2.6-dev cpp gcc g++ make automake autoconf pkg-config subversion liblua5.1-sql-mysql-dev liblua5.1-sql-sqlite3-dev zlib1g-dev zlib1g libcrypto++-dev libcrypto++8

• NOTE: If it cant find any of the libs just run `apt-cache search LIBNAME` if that doesnt work, update your sources. (apt-get update && apt-get upgrade)

After you've installed the libs go to the sources folder where all the .hpp/h, .cpp files are stored and run the following commands(+options).

1.
Code:
 ./autogen.sh ( IF it says 'permission denied' run ' chmod +x autogen.sh ' )
2.
Code:
 ./configure --enable-mysql --enable-sqlite --enable-remote-control --enable-server-diag
3.
Code:
 make
I did follow many tutorials but no luck, I get some errors and i'm not that good with linux to understand the error and solve it
 
as predicted most of the required libs were missing but they have been installed now.

There seems to be a problem in protocolgame.cpp line 941, which Im not able to understand.
This is what the error says :
Code:
In file included from /usr/include/c++/5/string:52:0,
                 from /usr/include/x86_64-linux-gnu/unicode/std_string.h:33,
                 from /usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
                 from /usr/include/x86_64-linux-gnu/unicode/strenum.h:14,
                 from /usr/include/x86_64-linux-gnu/unicode/uenum.h:24,
                 from /usr/include/x86_64-linux-gnu/unicode/ucnv.h:51,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from otpch.h:28,
                 from protocolgame.cpp:17:
/usr/include/c++/5/bits/basic_string.h:5172:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator<<(basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/basic_string.h:5172:5: note:   template argument deduction/substitution failed:
protocolgame.cpp:941:57: note:   ‘std::stringstream {aka std::__cxx11::basic_stringstream<char>}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
     s << player->getName() << " sent unknown byte: " << hex << std::endl;
                                                         ^
Makefile:546: recipe for target 'protocolgame.o' failed
make[1]: *** [protocolgame.o] Error 1
make[1]: *** Waiting for unfinished jobs....
 
as predicted most of the required libs were missing but they have been installed now.

There seems to be a problem in protocolgame.cpp line 941, which Im not able to understand.
This is what the error says :
Code:
In file included from /usr/include/c++/5/string:52:0,
                 from /usr/include/x86_64-linux-gnu/unicode/std_string.h:33,
                 from /usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
                 from /usr/include/x86_64-linux-gnu/unicode/strenum.h:14,
                 from /usr/include/x86_64-linux-gnu/unicode/uenum.h:24,
                 from /usr/include/x86_64-linux-gnu/unicode/ucnv.h:51,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from otpch.h:28,
                 from protocolgame.cpp:17:
/usr/include/c++/5/bits/basic_string.h:5172:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator<<(basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/basic_string.h:5172:5: note:   template argument deduction/substitution failed:
protocolgame.cpp:941:57: note:   ‘std::stringstream {aka std::__cxx11::basic_stringstream<char>}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
     s << player->getName() << " sent unknown byte: " << hex << std::endl;
                                                         ^
Makefile:546: recipe for target 'protocolgame.o' failed
make[1]: *** [protocolgame.o] Error 1
make[1]: *** Waiting for unfinished jobs....
replace << hex with << hex.str()
 
@Static_ thank you for the help, that solved it. But heres another similar error at talkaction.cpp:247
Code:
In file included from /usr/include/c++/5/string:52:0,
                 from /usr/include/x86_64-linux-gnu/unicode/std_string.h:33,
                 from /usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
                 from /usr/include/x86_64-linux-gnu/unicode/strenum.h:14,
                 from /usr/include/x86_64-linux-gnu/unicode/uenum.h:24,
                 from /usr/include/x86_64-linux-gnu/unicode/ucnv.h:51,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from otpch.h:28,
                 from talkaction.cpp:19:
/usr/include/c++/5/bits/basic_string.h:5172:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator<<(basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/basic_string.h:5172:5: note:   template argument deduction/substitution failed:
talkaction.cpp:247:15: note:   ‘std::stringstream {aka std::__cxx11::basic_stringstream<char>}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
         ss << sl << "...";
               ^
Makefile:546: recipe for target 'talkaction.o' failed
make[1]: *** [talkaction.o] Error 1
make[1]: *** Waiting for unfinished jobs....


Code:
else if(words.substr(1, 4) == "list")
                                {
                                        PlayerCast pc = p->getCast();

                                        std::stringstream ss, sl;
                                        ss << Player::cSpectators.size() << " spectators: ";
                                        bool first = true;
                                        for(AutoList<ProtocolGame>::iterator it = Player::cSpectators.begin(); it != Player::cSpectators.end(); ++it)
                                        {
                                                if(it->second->getPlayer() == p)
                                                {
                                                        sl.clear();
                                                        sl << ss;
                                                        if(first)
                                                                first = false;
                                                        else
                                                                ss << ", ";

                                                        ss << it->second->getViewerName();
                                                        if(ss.str().length() > 250)
                                                        {
                                                                ss.clear();
                                                                ss << sl << "..."; // THIS PART 
                                                                break;
                                                        }
                                                }
                                        }

                                        std::string out = ss.str();
                                        pg->publicSendMessage(p, SPEAK_PRIVATE, out);
                                }
 
@Static_ Thanks for that too, I hope this is the last error:
I've looked up on similar posts all they say is that some libs are missing, I've installed all of the required libs for 0.4.
( not sure if these are r3777 or r3888 )
Code:
actions.o: In function `Action::executeUse(Player*, Item*, PositionEx const&, PositionEx const&, bool, unsigned int)':
actions.cpp:(.text+0x1a22): undefined reference to `lua_pushnumber'
combat.o: In function `ValueCallback::getMinMaxValues(Player*, long&, long&, bool) const':
combat.cpp:(.text+0x1a4a): undefined reference to `lua_pushnumber'
combat.cpp:(.text+0x1a78): undefined reference to `lua_pushnumber'
combat.cpp:(.text+0x1ab0): undefined reference to `lua_pushnumber'
combat.cpp:(.text+0x1b73): undefined reference to `lua_pushnumber'
combat.o:combat.cpp:(.text+0x1b8c): more undefined references to `lua_pushnumber' follow
combat.o: In function `ValueCallback::getMinMaxValues(Player*, long&, long&, bool) const':
combat.cpp:(.text+0x1b9c): undefined reference to `lua_gettop'
combat.cpp:(.text+0x1bb3): undefined reference to `lua_pcall'
combat.cpp:(.text+0x1bfa): undefined reference to `lua_gettop'
combat.cpp:(.text+0x1d25): undefined reference to `lua_pushnumber'
combat.cpp:(.text+0x1d45): undefined reference to `lua_pushnumber'
combat.cpp:(.text+0x1e88): undefined reference to `lua_pushnumber'
combat.cpp:(.text+0x1ea7): undefined reference to `lua_pushnumber'
combat.o: In function `TileCallback::onTileCombat(Creature*, Tile*) const':
combat.cpp:(.text+0x24ef): undefined reference to `lua_pushnumber'
combat.o:combat.cpp:(.text+0x2ae0): more undefined references to `lua_pushnumber' follow
combat.o: In function `TargetCallback::onTargetCombat(Creature*, Creature*) const':
combat.cpp:(.text+0x2b17): undefined reference to `lua_gettop'
combat.cpp:(.text+0x2b2b): undefined reference to `lua_pcall'
combat.cpp:(.text+0x2b61): undefined reference to `lua_gettop'
configmanager.o: In function `ConfigManager::load()':
configmanager.cpp:(.text+0x329): undefined reference to `lua_close'
configmanager.cpp:(.text+0x32e): undefined reference to `luaL_newstate'
configmanager.cpp:(.text+0x343): undefined reference to `luaL_openlibs'
configmanager.cpp:(.text+0x350): undefined reference to `luaL_loadfile'
configmanager.cpp:(.text+0x35d): undefined reference to `lua_close'
configmanager.cpp:(.text+0x39e): undefined reference to `lua_pcall'
creatureevent.o: In function `CreatureEvent::executeLogin(Player*)':
creatureevent.cpp:(.text+0xe38): undefined reference to `lua_pushnumber'
creatureevent.o: In function `CreatureEvent::executeMove(Creature*, Position const&, Position const&)':
creatureevent.cpp:(.text+0x129d): undefined reference to `lua_pushnumber'
creatureevent.o: In function `CreatureEvent::executeLogout(Player*, bool)':
creatureevent.cpp:(.text+0x175d): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x1769): undefined reference to `lua_pushboolean'
creatureevent.o: In function `CreatureEvent::executeChannelJoin(Player*, unsigned short, std::map<unsigned int, Player*, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, Player*> > >)':
creatureevent.cpp:(.text+0x1c64): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x1c7b): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x1c8b): undefined reference to `lua_createtable'
creatureevent.cpp:(.text+0x1cc2): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x1ccf): undefined reference to `lua_settable'
creatureevent.cpp:(.text+0x1cf0): undefined reference to `lua_pushnumber'
creatureevent.o: In function `CreatureEvent::executeChannelLeave(Player*, unsigned short, std::map<unsigned int, Player*, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, Player*> > >)':
creatureevent.cpp:(.text+0x2244): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x225b): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x226b): undefined reference to `lua_createtable'
creatureevent.cpp:(.text+0x22a2): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x22af): undefined reference to `lua_settable'
creatureevent.cpp:(.text+0x22d0): undefined reference to `lua_pushnumber'
creatureevent.o: In function `CreatureEvent::executeAdvance(Player*, skills_t, unsigned int, unsigned int)':
creatureevent.cpp:(.text+0x2819): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x282a): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x2840): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x2851): undefined reference to `lua_pushnumber'
creatureevent.o:creatureevent.cpp:(.text+0x2caa): more undefined references to `lua_pushnumber' follow
creatureevent.o: In function `CreatureEvent::executeMailSend(Player*, Player*, Item*, bool)':
creatureevent.cpp:(.text+0x2d17): undefined reference to `lua_pushboolean'
creatureevent.o: In function `CreatureEvent::executeMailReceive(Player*, Player*, Item*, bool)':
creatureevent.cpp:(.text+0x323a): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x3269): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x32a7): undefined reference to `lua_pushboolean'
creatureevent.o: In function `CreatureEvent::executeTradeRequest(Player*, Player*, Item*)':
creatureevent.cpp:(.text+0x37ca): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x37f9): undefined reference to `lua_pushnumber'
creatureevent.o: In function `CreatureEvent::executeTradeAccept(Player*, Player*, Item*, Item*)':
creatureevent.cpp:(.text+0x3cf5): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x3d24): undefined reference to `lua_pushnumber'
creatureevent.o: In function `CreatureEvent::executeLook(Player*, Thing*, Position const&, short, int)':
creatureevent.cpp:(.text+0x427f): undefined reference to `lua_pushnumber'
creatureevent.o:creatureevent.cpp:(.text+0x42b9): more undefined references to `lua_pushnumber' follow
creatureevent.o: In function `CreatureEvent::executeCombatArea(Creature*, Tile*, bool)':
creatureevent.cpp:(.text+0x5882): undefined reference to `lua_pushboolean'
creatureevent.o: In function `CreatureEvent::executeCombat(Creature*, Creature*)':
creatureevent.cpp:(.text+0x5dc2): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x5df1): undefined reference to `lua_pushnumber'
creatureevent.o: In function `CreatureEvent::executeAttack(Creature*, Creature*)':
creatureevent.cpp:(.text+0x61e2): undefined reference to `lua_pushnumber'
creatureevent.cpp:(.text+0x6211): undefined reference to `lua_pushnumber'
creatureevent.o: In function `CreatureEvent::executeCast(Creature*, Creature*)':
creatureevent.cpp:(.text+0x65fa): undefined reference to `lua_pushnumber'
creatureevent.o:creatureevent.cpp:(.text+0x6625): more undefined references to `lua_pushnumber' follow
creatureevent.o: In function `CreatureEvent::executeTextEdit(Player*, Item*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
creatureevent.cpp:(.text+0x79a7): undefined reference to `lua_pushstring'
creatureevent.o: In function `CreatureEvent::executeReportBug(Player*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
creatureevent.cpp:(.text+0x7ebd): undefined reference to `lua_pushnumber'
luascript.cpp:(.text+0x28e2): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x28f2): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x2905): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x2915): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x2928): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x2938): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x294b): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x295b): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x296e): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x297e): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x2991): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x29a1): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x29b4): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x29c4): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x29d7): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x29e7): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x29fa): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x2a0a): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x2a1d): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x2a2d): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x2a40): undefined reference to `lua_setfield'
luascript.cpp:(.text+0x2a50): undefined reference to `lua_pushcclosure'
luascript.cpp:(.text+0x2a63): undefined reference to `lua_setfield'
 
those are all from the lua C api
you're missing lua 5.1 lib
@Static_ I've already installed that.
AzmocNw.png
 
Back
Top