BE
suporte programação

[Resolvido] Compilar PokeTibia (Source DXP) em Linux

Por bepokemon, 14 de jul. de 2017 em Resolvidos

25
9.9k
DarkWoreD
15 de julho de 2017 às 20:06
Agora, bepokemon disse:

Algumas coisas compilaram certinho (te amo muito!)

Porém tive esses erros em luascript.ccp:

  Mostrar conteúdo oculto
luascript.cpp: In static member function 'static int32_t LuaScriptInterface::luaDoPlayerAddItem(lua_State*)':luascript.cpp:4063:7: warning: variable 'canDropOnMap' set but not used [-Wunused-but-set-variable]  bool canDropOnMap = true;       ^luascript.cpp: In static member function 'static int32_t LuaScriptInterface::luaDoPlayerAddItemEx(lua_State*)':luascript.cpp:4145:7: warning: variable 'canDropOnMap' set but not used [-Wunused-but-set-variable]  bool canDropOnMap = false;       ^luascript.cpp: In static member function 'static int32_t LuaScriptInterface::luaGetTownTemplePosition(lua_State*)':luascript.cpp:9340:7: warning: variable 'displayError' set but not used [-Wunused-but-set-variable]  bool displayError = true;       ^

 

E um erro que parou a compilação pouco depois:

  Ocultar conteúdo
/usr/bin/ld: connection.o: undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command linecollect2: error: ld returned 1 exit statusmake[1]: *** [theforgottenserver] Error 1make[1]: Leaving directory `/home/otserv/alaskaotp'make: *** [all] Error 2

 

 

 

Me perdoa por ser tão leigo no assunto e ocupar tanto sua paciência e tempo :s

Na Realidade eu fico feliz de você pedir ajuda e de qualquer forma você não esta ocupando meu tempo e muito menos tirando minha paciência.

 

Bom Vamos la

 

no seu makefile.am adicione a flag:

 

-Wno-unused-variable

Caso você não saiba adicionar á flag só ir no arquivo e colar isso:

 

CXXFLAGS = -g -O1 -Wno-unused-variable

Logo abaixo de:

 

noinst_PROGRAMS = theforgottenserver

Tente Novamente :)

bepokemonB
15 de julho de 2017 às 20:13
Agora, DarkWore disse:

Na Realidade eu fico feliz de você pedir ajuda e de qualquer forma você não esta ocupando meu tempo e muito menos tirando minha paciência.

 

Bom Vamos la

 

no seu makefile.am adicione a flag:

 

-Wno-unused-variable

Caso você não saiba adicionar á flag só ir no arquivo e colar isso:

 

CXXFLAGS = -g -O1 -Wno-unused-variable

Logo abaixo de:

 

noinst_PROGRAMS = theforgottenserver

Tente Novamente :)

 

Fiz isso e retornou o mesmo erro, acho:

Spoiler
Configure complete, now you may type 'make'.root@alaskaotp:/home/otserv/alaskaotp# makemake  all-ammake[1]: Entering directory `/home/otserv/alaskaotp'g++ -I/usr/include/libxml2  -I/usr/include/lua5.1    -D__USE_MYSQL__     -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1 -Wno-unused-variable   -o theforgottenserver actions.o  allocator.o baseevents.o beds.o chat.o combat.o condition.o configmanager.o connection.o container.o creature.o creatureevent.o cylinder.o database.o databasemanager.o databasemysql.o    depot.o exception.o fileloader.o game.o  globalevent.o group.o gui.o house.o housetile.o inputbox.o ioban.o ioguild.o iologindata.o iomap.o iomapserialize.o item.o itemattributes.o items.o luascript.o mailbox.o map.o md5.o monster.o monsters.o movement.o networkmessage.o npc.o otserv.o outfit.o outputmessage.o party.o playerbox.o player.o position.o protocol.o protocolgame.o protocollogin.o protocolold.o quests.o raids.o rsa.o scheduler.o scriptmanager.o server.o sha1.o spawn.o spells.o status.o talkaction.o tasks.o teleport.o textlogger.o thing.o tile.o tools.o trashholder.o waitlist.o weapons.o vocation.o -llua5.1   -lmysqlclient -lboost_filesystem -lboost_date_time -lboost_system -lboost_regex -lboost_thread -lgmp  -lxml2/usr/bin/ld: connection.o: undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command linecollect2: error: ld returned 1 exit statusmake[1]: *** [theforgottenserver] Error 1make[1]: Leaving directory `/home/otserv/alaskaotp'make: *** [all] Error 2

 

 

Muito, muito obrigado messsmo!!

 

PS: A sequência de comandos pra compilar são:

cd /home/otserv/pastachmod +x ./autogen.sh./autogen.sh./configure -enable-mysql -enable-server-diag -enable-root-permissionmake

?

Editado Julho 15 por bepokemon

DarkWoreD
15 de julho de 2017 às 20:15
Agora, bepokemon disse:

 

Fiz isso e retornou o mesmo erro, acho:

  Ocultar conteúdo
Configure complete, now you may type 'make'.root@alaskaotp:/home/otserv/alaskaotp# makemake  all-ammake[1]: Entering directory `/home/otserv/alaskaotp'g++ -I/usr/include/libxml2  -I/usr/include/lua5.1    -D__USE_MYSQL__     -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1 -Wno-unused-variable   -o theforgottenserver actions.o  allocator.o baseevents.o beds.o chat.o combat.o condition.o configmanager.o connection.o container.o creature.o creatureevent.o cylinder.o database.o databasemanager.o databasemysql.o    depot.o exception.o fileloader.o game.o  globalevent.o group.o gui.o house.o housetile.o inputbox.o ioban.o ioguild.o iologindata.o iomap.o iomapserialize.o item.o itemattributes.o items.o luascript.o mailbox.o map.o md5.o monster.o monsters.o movement.o networkmessage.o npc.o otserv.o outfit.o outputmessage.o party.o playerbox.o player.o position.o protocol.o protocolgame.o protocollogin.o protocolold.o quests.o raids.o rsa.o scheduler.o scriptmanager.o server.o sha1.o spawn.o spells.o status.o talkaction.o tasks.o teleport.o textlogger.o thing.o tile.o tools.o trashholder.o waitlist.o weapons.o vocation.o -llua5.1   -lmysqlclient -lboost_filesystem -lboost_date_time -lboost_system -lboost_regex -lboost_thread -lgmp  -lxml2/usr/bin/ld: connection.o: undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command linecollect2: error: ld returned 1 exit statusmake[1]: *** [theforgottenserver] Error 1make[1]: Leaving directory `/home/otserv/alaskaotp'make: *** [all] Error 2

 

 

Muito, muito obrigado messsmo!!

Na Realidade oque eu mandei não era pra consertar o erro e sim tirar as warnings, nunca vi esse erro e não sei como resolver ele :/ fico te devendo.

bepokemonB
15 de julho de 2017 às 22:46
2 horas atrás, DarkWore disse:

Na Realidade oque eu mandei não era pra consertar o erro e sim tirar as warnings, nunca vi esse erro e não sei como resolver ele :/ fico te devendo.

 

Citar

>> DarkXPoke server Online! 

 

ACHO que eu consegui resolver. Porém eu não sei compilar o OTClient ainda. heheh

Algum dica? :o

DarkWoreD
16 de julho de 2017 às 12:58
14 horas atrás, bepokemon disse:

 

 

ACHO que eu consegui resolver. Porém eu não sei compilar o OTClient ainda. heheh

Algum dica? :o

Compilar OTClient é mil vezes mais chato, dica tenha muita paciência.

bepokemonB
16 de julho de 2017 às 17:15
4 horas atrás, DarkWore disse:

Compilar OTClient é mil vezes mais chato, dica tenha muita paciência.

 

Você pode me ajudar com alguns erros na hora da compilação? Percebi que isso fez com que o servidor tivesse alguns bugs gritantes (chats que não abrem, pokémons wilds lagando o servidor visualmente, etc) e acho que são por esses erros que deu na hora de compilar (imagino que eu tenha que editar os cpp). Tô recompilando aqui pra pegar os erros.

DarkWoreD
16 de julho de 2017 às 17:50
22 minutos atrás, bepokemon disse:

 

Você pode me ajudar com alguns erros na hora da compilação? Percebi que isso fez com que o servidor tivesse alguns bugs gritantes (chats que não abrem, pokémons wilds lagando o servidor visualmente, etc) e acho que são por esses erros que deu na hora de compilar (imagino que eu tenha que editar os cpp). Tô recompilando aqui pra pegar os erros.

As Alterações que te mandei não causam problema algum no servidor por serem alterações da leitura dos sistemas operacionais para o linux ler foi necessário alterar alguns códigos que te mandei, simplesmente isso.

bepokemonB
16 de julho de 2017 às 17:51
Agora, DarkWore disse:

As Alterações que te mandei não causam problema algum no servidor por serem alterações da leitura dos sistemas operacionais para o linux ler foi necessário alterar alguns códigos que te mandei, simplesmente isso.

 

Sim sim, mas, não pelas modificações, tive alguns erros na compilação, e queria saber se você sabe como resolver algum deles, separei os erros:

 

 

Spoiler
chat.cpp: In member function 'ChatChannel* Chat::createChannel(Player*, uint16_t)':chat.cpp:381:14: warning: variable 'flags' set but not used [-Wunused-but-set-variable]     uint16_t flags = 0;              ^chat.cpp: In member function 'ChatChannel* Chat::getChannel(Player*, uint16_t)':chat.cpp:1121:10: warning: converting 'false' to pointer type 'ChatChannel*' [-Wconversion-null]   return false;          ^creature.cpp: In member function 'int32_t Creature::getStepDuration(Direction) const':creature.cpp:1509:1: warning: control reaches end of non-void function [-Wreturn-type] } ^game.cpp: In member function 'Item* Game::findItemOfType(Cylinder*, uint16_t, bool, int32_t)':game.cpp:1704:10: warning: converting 'false' to pointer type 'Item*' [-Wconversion-null]   return false;          ^luascript.cpp:4063:7: warning: variable 'canDropOnMap' set but not used [-Wunused-but-set-variable]  bool canDropOnMap = true;       ^luascript.cpp: In static member function 'static int32_t LuaScriptInterface::luaDoPlayerAddItemEx(lua_State*)':luascript.cpp:4145:7: warning: variable 'canDropOnMap' set but not used [-Wunused-but-set-variable]  bool canDropOnMap = false;       ^luascript.cpp: In static member function 'static int32_t LuaScriptInterface::luaGetTownTemplePosition(lua_State*)':luascript.cpp:9340:7: warning: variable 'displayError' set but not used [-Wunused-but-set-variable]  bool displayError = true;       ^monster.cpp: In member function 'virtual void Monster::doAttacking(uint32_t)':monster.cpp:726:26: warning: variable 'outOfRange' set but not used [-Wunused-but-set-variable]  bool updateLook = true, outOfRange = true;                          ^monster.cpp: In member function 'void Monster::onThinkTarget(uint32_t)':monster.cpp:856:32: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]  if(mType->targetDistance <= 1 && value == -1)                                ^otserv.cpp: In function 'void allocationHandler()':otserv.cpp:231:28: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result]  fgets(buffer, 1024, stdin);                            ^

 

 

Já viu algum desses erros ou sabe o que fazer? :o

acho que exceto pelas -Wunused-but-set-variable o resto pode estar causando os erros que encontrei.

(A de monster.cpp, creature.cpp e chat.cpp)

DarkWoreD
16 de julho de 2017 às 17:56
Agora, bepokemon disse:

 

Sim sim, mas, não pelas modificações, tive alguns erros na compilação, e queria saber se você sabe como resolver algum deles, separei os erros:

 

 

  Mostrar conteúdo oculto
chat.cpp: In member function 'ChatChannel* Chat::createChannel(Player*, uint16_t)':chat.cpp:381:14: warning: variable 'flags' set but not used [-Wunused-but-set-variable]     uint16_t flags = 0;              ^chat.cpp: In member function 'ChatChannel* Chat::getChannel(Player*, uint16_t)':chat.cpp:1121:10: warning: converting 'false' to pointer type 'ChatChannel*' [-Wconversion-null]   return false;          ^creature.cpp: In member function 'int32_t Creature::getStepDuration(Direction) const':creature.cpp:1509:1: warning: control reaches end of non-void function [-Wreturn-type] } ^game.cpp: In member function 'Item* Game::findItemOfType(Cylinder*, uint16_t, bool, int32_t)':game.cpp:1704:10: warning: converting 'false' to pointer type 'Item*' [-Wconversion-null]   return false;          ^luascript.cpp:4063:7: warning: variable 'canDropOnMap' set but not used [-Wunused-but-set-variable]  bool canDropOnMap = true;       ^luascript.cpp: In static member function 'static int32_t LuaScriptInterface::luaDoPlayerAddItemEx(lua_State*)':luascript.cpp:4145:7: warning: variable 'canDropOnMap' set but not used [-Wunused-but-set-variable]  bool canDropOnMap = false;       ^luascript.cpp: In static member function 'static int32_t LuaScriptInterface::luaGetTownTemplePosition(lua_State*)':luascript.cpp:9340:7: warning: variable 'displayError' set but not used [-Wunused-but-set-variable]  bool displayError = true;       ^monster.cpp: In member function 'virtual void Monster::doAttacking(uint32_t)':monster.cpp:726:26: warning: variable 'outOfRange' set but not used [-Wunused-but-set-variable]  bool updateLook = true, outOfRange = true;                          ^monster.cpp: In member function 'void Monster::onThinkTarget(uint32_t)':monster.cpp:856:32: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]  if(mType->targetDistance <= 1 && value == -1)                                ^otserv.cpp: In function 'void allocationHandler()':otserv.cpp:231:28: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result]  fgets(buffer, 1024, stdin);                            ^

 

 

Já viu algum desses erros ou sabe o que fazer? :o

acho que exceto pelas -Wunused-but-set-variable o resto pode estar causando os erros que encontrei.

(A de monster.cpp, creature.cpp e chat.cpp)

Me Envia seu Makefile.am e os arquivos creature.cpp, monster.cpp e chat.cpp.

1 mês depois...
DarkWoreD
31 de agosto de 2017 às 21:45

A questão neste tópico de suporte foi respondida e/ou o autor do tópico resolveu o problema. Este tópico está fechado e foi movido para Suporte - Resolvidos. Se você tiver outras dúvidas, crie um novo tópico.