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

TFS 0.4 Compiling Ubuntu

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hello, I'm trying compiling TFS 0.4 in ubuntu and getting some erros..

Using

./configure --enable-mysql
./build.sh

VGtpxpZGO.png
 
Search the forum and google. People have asked about this 10000 times already.

You need to fix errors in the source code.
 
type this command at putty?
No in the makefile, search for what I told you to remove and delete it. Save, and then compile again.

You need to fix errors in the source code.
The problem is that it compiles just fine on windows but has some issues on linux when compiling with -Wall -Wextra -Werror
 
@Xagul
Ooh thanks, but I keep with this error at luascript.cpp
Check it out.
ruwDtT9h.png


Fixed using if(recursively && !loadDirectory((it->path() / s).native(), npc, recursively))
 
Trying to search at google before post something here to avoid people like @dominique120
But I can't find a anwser to this
-SCwSO8Ug.png


Fixed using path().filename().string()


Now getting problem with this
zghU3kRqM.png
 
Last edited:
open file Makefile, find line statring with "LIBS =" and add at the end of this line " -lpthread" without these quotes
 
@LuckyM

I tryed add at line 6 and didn't work.. Where you mean "LIBS =" in line 8? xd

Code:
noinst_PROGRAMS = theforgottenserver

CXXFLAGS = -pipe
AM_CXXFLAGS = $(XML_CPPFLAGS) $(OTSERV_FLAGS) $(LUA_CFLAGS) $(DEBUG_FLAGS)\
$(MYSQL_FLAGS) $(SQLITE_FLAGS) $(PGSQL_FLAGS) $(PROFILER_FLAGS)\
$(OPTIONAL_FLAGS) -D_THREAD_SAFE -D_REENTRANT -Wno-strict-aliasing -Wno-unused-parameter

theforgottenserver_LDADD = $(LUA_LIBS)

if USE_MYSQL
MAYBE_MYSQL = databasemysql.cpp databasemysql.h
endif
if USE_SQLITE
MAYBE_SQLITE = databasesqlite.cpp databasesqlite.h
endif
if USE_PGSQL
MAYBE_PGSQL = databasepgsql.cpp databasepgsql.h
endif
if LOGIN_SERVER
MAYBE_LOGIN = gameservers.cpp gameservers.h
endif
if OT_ADMIN
MAYBE_OTADMIN = admin.cpp admin.h
endif

theforgottenserver_SOURCES = account.h actions.cpp actions.h $(MAYBE_OTADMIN) \
   allocator.cpp allocator.h baseevents.cpp baseevents.h beds.cpp \
   beds.h chat.cpp chat.h combat.cpp combat.h condition.cpp condition.h \
   config.h configmanager.cpp configmanager.h connection.cpp connection.h \
   const.h container.cpp container.h creature.cpp creature.h \
   creatureevent.cpp creatureevent.h cylinder.cpp cylinder.h database.cpp \
   database.h databasemanager.cpp databasemanager.h $(MAYBE_MYSQL) \
   $(MAYBE_SQLITE) $(MAYBE_PGSQL) depot.cpp depot.h dispatcher.cpp \
   dispatcher.h exception.cpp exception.h fileloader.cpp fileloader.h \
   game.cpp game.h $(MAYBE_LOGIN) globalevent.cpp globalevent.h group.cpp \
   group.h house.cpp house.h housetile.cpp housetile.h ioban.cpp ioban.h \
   ioguild.cpp ioguild.h iologindata.cpp iologindata.h iomap.cpp iomap.h \
   iomapserialize.cpp iomapserialize.h item.cpp item.h itemattributes.cpp \
   itemattributes.h items.cpp items.h luascript.cpp luascript.h \
   mailbox.cpp mailbox.h manager.cpp manager.h map.cpp map.h monster.cpp \
   monster.h monsters.cpp monsters.h movement.cpp movement.h \
   networkmessage.cpp networkmessage.h npc.cpp npc.h otpch.h otserv.cpp \
   otsystem.h outfit.cpp outfit.h outputmessage.cpp outputmessage.h \
   party.cpp party.h player.cpp player.h position.cpp position.h \
   protocol.cpp protocol.h protocolgame.cpp protocolgame.h \
   protocolhttp.cpp protocolhttp.h protocollogin.cpp protocollogin.h \
   protocolold.cpp protocolold.h quests.cpp quests.h raids.cpp raids.h \
   scheduler.cpp scheduler.h scriptmanager.cpp \
   scriptmanager.h server.cpp server.h spawn.cpp spawn.h spells.cpp \
   spells.h status.cpp status.h talkaction.cpp talkaction.h teleport.cpp \
   teleport.h templates.h textlogger.cpp textlogger.h thing.cpp thing.h \
   tile.cpp tile.h tools.cpp tools.h town.h trashholder.cpp trashholder.h \
   waitlist.cpp waitlist.h waypoints.h weapons.cpp weapons.h vocation.cpp \
   vocation.h
 
@LuckyM

I tryed add at line 6 and didn't work.. Where you mean "LIBS =" in line 8? xd

Code:
noinst_PROGRAMS = theforgottenserver

CXXFLAGS = -pipe
AM_CXXFLAGS = $(XML_CPPFLAGS) $(OTSERV_FLAGS) $(LUA_CFLAGS) $(DEBUG_FLAGS)\
$(MYSQL_FLAGS) $(SQLITE_FLAGS) $(PGSQL_FLAGS) $(PROFILER_FLAGS)\
$(OPTIONAL_FLAGS) -D_THREAD_SAFE -D_REENTRANT -Wno-strict-aliasing -Wno-unused-parameter

theforgottenserver_LDADD = $(LUA_LIBS)

if USE_MYSQL
MAYBE_MYSQL = databasemysql.cpp databasemysql.h
endif
if USE_SQLITE
MAYBE_SQLITE = databasesqlite.cpp databasesqlite.h
endif
if USE_PGSQL
MAYBE_PGSQL = databasepgsql.cpp databasepgsql.h
endif
if LOGIN_SERVER
MAYBE_LOGIN = gameservers.cpp gameservers.h
endif
if OT_ADMIN
MAYBE_OTADMIN = admin.cpp admin.h
endif

theforgottenserver_SOURCES = account.h actions.cpp actions.h $(MAYBE_OTADMIN) \
   allocator.cpp allocator.h baseevents.cpp baseevents.h beds.cpp \
   beds.h chat.cpp chat.h combat.cpp combat.h condition.cpp condition.h \
   config.h configmanager.cpp configmanager.h connection.cpp connection.h \
   const.h container.cpp container.h creature.cpp creature.h \
   creatureevent.cpp creatureevent.h cylinder.cpp cylinder.h database.cpp \
   database.h databasemanager.cpp databasemanager.h $(MAYBE_MYSQL) \
   $(MAYBE_SQLITE) $(MAYBE_PGSQL) depot.cpp depot.h dispatcher.cpp \
   dispatcher.h exception.cpp exception.h fileloader.cpp fileloader.h \
   game.cpp game.h $(MAYBE_LOGIN) globalevent.cpp globalevent.h group.cpp \
   group.h house.cpp house.h housetile.cpp housetile.h ioban.cpp ioban.h \
   ioguild.cpp ioguild.h iologindata.cpp iologindata.h iomap.cpp iomap.h \
   iomapserialize.cpp iomapserialize.h item.cpp item.h itemattributes.cpp \
   itemattributes.h items.cpp items.h luascript.cpp luascript.h \
   mailbox.cpp mailbox.h manager.cpp manager.h map.cpp map.h monster.cpp \
   monster.h monsters.cpp monsters.h movement.cpp movement.h \
   networkmessage.cpp networkmessage.h npc.cpp npc.h otpch.h otserv.cpp \
   otsystem.h outfit.cpp outfit.h outputmessage.cpp outputmessage.h \
   party.cpp party.h player.cpp player.h position.cpp position.h \
   protocol.cpp protocol.h protocolgame.cpp protocolgame.h \
   protocolhttp.cpp protocolhttp.h protocollogin.cpp protocollogin.h \
   protocolold.cpp protocolold.h quests.cpp quests.h raids.cpp raids.h \
   scheduler.cpp scheduler.h scriptmanager.cpp \
   scriptmanager.h server.cpp server.h spawn.cpp spawn.h spells.cpp \
   spells.h status.cpp status.h talkaction.cpp talkaction.h teleport.cpp \
   teleport.h templates.h textlogger.cpp textlogger.h thing.cpp thing.h \
   tile.cpp tile.h tools.cpp tools.h town.h trashholder.cpp trashholder.h \
   waitlist.cpp waitlist.h waypoints.h weapons.cpp weapons.h vocation.cpp \
   vocation.h
You linked the file Makefile.am, you should add this to the file called just "Makefile"

Line where you should add it should look something like this:
Code:
LIBS = -lmysqlclient -lboost_filesystem-mt -lboost_date_time-mt -lboost_system-mt -lboost_regex-mt -lboost_thread-mt -lgmp  -L/usr/lib -lxml2
Then just add "-lpthread" at the end of the line without quotes.
 
@dominique120
Code:
/usr/bin/ld: //usr/local/lib/liblua.a(loadlib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:454: recipe for target 'theforgottenserver' failed
make[1]: *** [theforgottenserver] Error 1
make[1]: Leaving directory '/home/dcp/z'
Makefile:396: recipe for target 'all' failed
make: *** [all] Error 2
 
Back
Top