Ir para conteúdo

Compilando e Rodando OTserv em Linux Ubuntu 12.04


Beeki

Posts Recomendados

Alguém pode me ajudar, eu fiz tudo corretamente. Porém acontece este erro quando eu coloco "./build.sh".

 

 

root@rinkashi:/home/otserv/theforgottenserver/source# ./build.sh

TheForgottenServer build script- seems to speed things up ALOT.
CCache: OK
CCache binaries located in /usr/lib/ccache
Building on 3 cores, using 4 processes
make all-am
make[1]: Entering directory `/home/otserv/theforgottenserver/source'
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT game.o -MD -MP -MF .deps/game.Tpo -c -o game.o game.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT luascript.o -MD -MP -MF .deps/luascript.Tpo -c -o luascript.o luascript.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT monster.o -MD -MP -MF .deps/monster.Tpo -c -o monster.o monster.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT monsters.o -MD -MP -MF .deps/monsters.Tpo -c -o monsters.o monsters.cpp
monster.cpp: In member function 'virtual void Monster::doAttacking(uint32_t)':
monster.cpp:626:26: error: variable 'outOfRange' set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
make[1]: *** [monster.o] Error 1
make[1]: *** Waiting for unfinished jobs....
luascript.cpp: In member function 'bool LuaInterface::loadDirectory(const string&, Npc*, bool)':
luascript.cpp:741:23: error: 'class boost::filesystem3::directory_entry' has no member named 'leaf'
luascript.cpp:744:61: error: no match for 'operator+' in 'boost::filesystem3::path::filename() const() + "/"'
make[1]: *** [luascript.o] Error 1
mv -f .deps/monsters.Tpo .deps/monsters.Po
game.cpp: In constructor 'Game::Game()':
game.cpp:80:22: error: array subscript is above array bounds [-Werror=array-bounds]
game.h: In member function 'void Game::globalSave()':
game.h:623:76: error: array subscript is above array bounds [-Werror=array-bounds]
game.cpp: In member function 'void Game::prepareGlobalSave()':
game.cpp:6256:30: error: array subscript is above array bounds [-Werror=array-bounds]
game.cpp:6258:22: error: array subscript is above array bounds [-Werror=array-bounds]
cc1plus: all warnings being treated as errors
make[1]: *** [game.o] Error 1
make[1]: Leaving directory `/home/otserv/theforgottenserver/source'
make: *** [all] Error 2

 

Aparece este erro no final, não estou conseguindo arrumar ele. Será que alguém poderia me ajudar?

Link para o comentário
Compartilhar em outros sites

Sim, to usando sim. Testei outras sources também e consegui concertar alguns erros. Ai aparece agora um outro :

 

make

make all-am
make[1]: Entering directory `/home/marcos'
g++ -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__USE_MYSQL__ -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1 -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-mt -lboost_date_time-mt -lboost_system-mt -lboost_regex-mt -lboost_thread-mt -lgmp -L/usr/lib/i386-linux-gnu -lxml2
luascript.o: In function `directory_iterator':
/usr/local/include/boost/filesystem/operations.hpp:682: undefined reference to `boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)'
luascript.o: In function `LuaScriptInterface::loadDirectory(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Npc*)':
/home/marcos/luascript.cpp:719: undefined reference to `boost::filesystem::path::filename() const'
luascript.o: In function `boost::filesystem::directory_entry::status() const':
/usr/local/include/boost/filesystem/operations.hpp:591: undefined reference to `boost::filesystem::directory_entry::m_get_status(boost::system::error_code*) const'
luascript.o: In function `boost::filesystem::directory_iterator::increment()':
/usr/local/include/boost/filesystem/operations.hpp:718: undefined reference to `boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
luascript.o: In function `~dir_itr_imp':
/usr/local/include/boost/filesystem/operations.hpp:651: undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
/usr/local/include/boost/filesystem/operations.hpp:651: undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
scheduler.o: In function `boost::thread::start_thread()':
/usr/local/include/boost/thread/detail/thread.hpp:180: undefined reference to `boost::thread::start_thread_noexcept()'
scriptmanager.o: In function `exists':
/usr/local/include/boost/filesystem/operations.hpp:289: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
scriptmanager.o: In function `ScriptingManager::loadMods()':
/home/marcos/scriptmanager.cpp:122: undefined reference to `boost::filesystem::path::filename() const'
scriptmanager.o: In function `boost::filesystem::directory_entry::status() const':
/usr/local/include/boost/filesystem/operations.hpp:591: undefined reference to `boost::filesystem::directory_entry::m_get_status(boost::system::error_code*) const'
scriptmanager.o: In function `boost::filesystem::directory_iterator::increment()':
/usr/local/include/boost/filesystem/operations.hpp:718: undefined reference to `boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
scriptmanager.o: In function `directory_iterator':
/usr/local/include/boost/filesystem/operations.hpp:682: undefined reference to `boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)'
tasks.o: In function `boost::thread::start_thread()':
/usr/local/include/boost/thread/detail/thread.hpp:180: undefined reference to `boost::thread::start_thread_noexcept()'
collect2: ld returned 1 exit status
make[1]: *** [theforgottenserver] Error 1
make[1]: Leaving directory `/home/marcos'
make: *** [all] Error 2

 

Este ai não consegui resolver, sabe como arrumar? Obrigado!

Link para o comentário
Compartilhar em outros sites

Sim, to usando sim. Testei outras sources também e consegui concertar alguns erros. Ai aparece agora um outro :

 

 

 

make

make all-am
make[1]: Entering directory `/home/marcos'
g++ -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__USE_MYSQL__ -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1 -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-mt -lboost_date_time-mt -lboost_system-mt -lboost_regex-mt -lboost_thread-mt -lgmp -L/usr/lib/i386-linux-gnu -lxml2
luascript.o: In function `directory_iterator':
/usr/local/include/boost/filesystem/operations.hpp:682: undefined reference to `boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)'
luascript.o: In function `LuaScriptInterface::loadDirectory(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Npc*)':
/home/marcos/luascript.cpp:719: undefined reference to `boost::filesystem::path::filename() const'
luascript.o: In function `boost::filesystem::directory_entry::status() const':
/usr/local/include/boost/filesystem/operations.hpp:591: undefined reference to `boost::filesystem::directory_entry::m_get_status(boost::system::error_code*) const'
luascript.o: In function `boost::filesystem::directory_iterator::increment()':
/usr/local/include/boost/filesystem/operations.hpp:718: undefined reference to `boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
luascript.o: In function `~dir_itr_imp':
/usr/local/include/boost/filesystem/operations.hpp:651: undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
/usr/local/include/boost/filesystem/operations.hpp:651: undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
scheduler.o: In function `boost::thread::start_thread()':
/usr/local/include/boost/thread/detail/thread.hpp:180: undefined reference to `boost::thread::start_thread_noexcept()'
scriptmanager.o: In function `exists':
/usr/local/include/boost/filesystem/operations.hpp:289: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
scriptmanager.o: In function `ScriptingManager::loadMods()':
/home/marcos/scriptmanager.cpp:122: undefined reference to `boost::filesystem::path::filename() const'
scriptmanager.o: In function `boost::filesystem::directory_entry::status() const':
/usr/local/include/boost/filesystem/operations.hpp:591: undefined reference to `boost::filesystem::directory_entry::m_get_status(boost::system::error_code*) const'
scriptmanager.o: In function `boost::filesystem::directory_iterator::increment()':
/usr/local/include/boost/filesystem/operations.hpp:718: undefined reference to `boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
scriptmanager.o: In function `directory_iterator':
/usr/local/include/boost/filesystem/operations.hpp:682: undefined reference to `boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)'
tasks.o: In function `boost::thread::start_thread()':
/usr/local/include/boost/thread/detail/thread.hpp:180: undefined reference to `boost::thread::start_thread_noexcept()'
collect2: ld returned 1 exit status
make[1]: *** [theforgottenserver] Error 1
make[1]: Leaving directory `/home/marcos'
make: *** [all] Error 2

 

 

 

Este ai não consegui resolver, sabe como arrumar? Obrigado!

luascript.cpp (linha 719, talvez):

std::string s = BOOST_DIR_ITER_FILENAME(it);

ou

std::string s = it->path().filename();

algo parecido com isso ae, troca por isso aqe:

std::string s = it->leaf();

no arquivo scriptmanager.cpp (linha 122 eu acho) faz a mesma coisa...

e tu n ta usando a source que ele postou n

Editado por fireelement
Link para o comentário
Compartilhar em outros sites

Bom, descobri o problema. Eu acho que o error estava no ubuntu 12.04, consegui compilar esta source no debian 6 facilmente, funcionou perfeitamente. Obrigado ai cara pela sua ajuda, Agora vou aqui colocar o site e ver o resultado. Só uma dúvida, como faz pra adicionar um mapa por exemplo: baiak e tal.. ? Obrigado!

Link para o comentário
Compartilhar em outros sites

  • 1 month later...
  • 1 month later...
  • 4 years later...
  • 7 months later...

já está assim como tu pediu pra alterar e está dando e

luascript.cpp:741:23: error: ‘class boost::filesystem::directory_entry’ has no member named ‘leaf’
   std::string s = it->leaf();
                       ^
luascript.cpp:744:59: error: no match for ‘operator+’ (operand types are ‘boost::filesystem::path’ and ‘const char [2]’)
    if(recursively && !loadDirectory(it->path().filename() + "/" + s, npc, recursively))
                                                           ^
Makefile:540: recipe for target 'luascript.o' failed
make[1]: *** [luascript.o] Error 1
make[1]: ** Esperando que outros processos terminem.
mv -f .deps/items.Tpo .deps/items.Po
make[1]: Leaving directory '/home/dcp/z'
Makefile:396: recipe for target 'all' failed
make: *** [all] Error 2

rro.

 

 

Em 03/11/2013 em 20:30, netflat10 disse:

luascript.cpp (linha 719, talvez):


std::string s = BOOST_DIR_ITER_FILENAME(it);

ou


std::string s = it->path().filename();

algo parecido com isso ae, troca por isso aqe:


std::string s = it->leaf();

no arquivo scriptmanager.cpp (linha 122 eu acho) faz a mesma coisa...

e tu n ta usando a source que ele postou n

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...