opentibia / server

An open source server for the MMORPG Tibia.
GNU General Public License v2.0
414 stars 149 forks source link

Unable to compile #24

Closed fervi closed 10 years ago

fervi commented 10 years ago

New master version (I think later than December 2012) is unable to compile on Debian 8

Scanning dependencies of target otserv [ 1%] Building CXX object src/CMakeFiles/otserv.dir/thing.cpp.o /home/fervi/Intinte/MMORPG/server-master/src/thing.cpp:20:19: fatal error: otpch.h: Nie ma takiego pliku ani katalogu

include "otpch.h"

No such file - otpch.h

iryont commented 10 years ago

It should be now fixed, give it a try.

fervi commented 10 years ago

[ 5%] Building CXX object src/CMakeFiles/otserv.dir/player.cpp.o /home/fervi/Intinte/MMORPG/server-master/src/player.cpp: In member function ‘virtual void Player::postAddNotification(Creature, Thing, const Cylinder_, int32_t, cylinderlinkt)’: /home/fervi/Intinte/MMORPG/server-master/src/player.cpp:3160:7: error: variable ‘requireListUpdate’ set but not used [-Werror=unused-but-set-variable] bool requireListUpdate = true; ^ In file included from /home/fervi/Intinte/MMORPG/server-master/src/creature.h:29:0, from /home/fervi/Intinte/MMORPG/server-master/src/player.h:26, from /home/fervi/Intinte/MMORPG/server-master/src/player.cpp:22: /home/fervi/Intinte/MMORPG/server-master/src/const.h: At global scope: /home/fervi/Intinte/MMORPG/server-master/src/const.h:570:17: error: ‘reverseFluidMap’ defined but not used [-Werror=unused-variable] const FluidType reverseFluidMap[] = { ^ /home/fervi/Intinte/MMORPG/server-master/src/const.h:618:23: error: ‘fluidMap’ defined but not used [-Werror=unused-variable] const ClientFluidType fluidMap[] = { ^ cc1plus: all warnings being treated as errors make[2]: ** [src/CMakeFiles/otserv.dir/player.cpp.o] Błąd 1 make[1]: * [src/CMakeFiles/otserv.dir/all] Błąd 2 make: * [all] Błąd 2

iryont commented 10 years ago

These are warnings but since they are treated as an error they do stop the compilation.

Please give it a try now.

fervi commented 10 years ago

[ 7%] Building CXX object src/CMakeFiles/otserv.dir/ioplayer.cpp.o /home/fervi/Intinte/MMORPG/server-master/src/ioplayer.cpp: In member function ‘bool IOPlayer::playerExists(std::string)’: /home/fervi/Intinte/MMORPG/server-master/src/ioplayer.cpp:982:29: error: cannot convert ‘DBResult_ptr {aka boost::shared_ptr}’ to ‘bool’ in return return db->storeQuery(query); ^ make[2]: * [src/CMakeFiles/otserv.dir/ioplayer.cpp.o] Błąd 1 make[1]: * [src/CMakeFiles/otserv.dir/all] Błąd 2 make: *\ [all] Błąd 2

Sorry dude ^.^

iryont commented 10 years ago

That's fine, I will be fixing such issues until we reach some results.

Please go ahead, try now.

iryont commented 10 years ago

https://travis-ci.org/opentibia/server/jobs/11992673

It was compiled just fine in there.

fervi commented 10 years ago

Sorry, I still have problems (I using Debian Jessie, maybe on older version compilation works propertly)

[ 22%] Building CXX object src/CMakeFiles/otserv.dir/lua_manager.cpp.o In file included from /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.cpp:28:0: /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.h: In member function ‘void LuaState::setGlobal(const string&)’: /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.h:109:53: error: ‘LUA_GLOBALSINDEX’ was not declared in this scope void setGlobal(const std::string& gname) {setField(LUA_GLOBALSINDEX, gname);} ^ /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.h: In member function ‘void LuaState::getGlobal(const string&)’: /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.h:113:53: error: ‘LUA_GLOBALSINDEX’ was not declared in this scope void getGlobal(const std::string& gname) {getField(LUA_GLOBALSINDEX, gname);} ^ /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.cpp: In member function ‘void LuaStateManager::setupLuaStandardLibrary()’: /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.cpp:835:22: error: ‘LUA_GLOBALSINDEX’ was not declared in this scope lua_getfield(state, LUA_GLOBALSINDEX, "package"); ^ /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.cpp: In member function ‘int32_t LuaThread::run(int32_t)’: /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.cpp:1083:38: error: invalid conversion from ‘int32_t {aka int}’ to ‘luaState’ [-fpermissive] int32_t ret = lua_resume(state, args); ^ /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.cpp:1083:38: error: too few arguments to function ‘int lua_resume(luaState, luaState, int)’ In file included from /home/fervi/Intinte/MMORPG/server-master/src/lua.hpp:26:0, from /home/fervi/Intinte/MMORPG/server-master/src/otpch.h:47, from /home/fervi/Intinte/MMORPG/server-master/src/lua_manager.cpp:18: /usr/include/lua5.2/lua.h:274:15: note: declared here LUA_API int (lua_resume) (lua_State L, lua_State from, int narg); ^ make[2]: _\ [src/CMakeFiles/otserv.dir/lua_manager.cpp.o] Błąd 1 make[1]: * [src/CMakeFiles/otserv.dir/all] Błąd 2 make: * [all] Błąd 2

iryont commented 10 years ago

You are using Lua 5.2 while the code is for 5.1 - please re-install it.

I have also added code to cmake files to look for Lua 5.1 only.

fervi commented 10 years ago

Old code (from December) works :(

nvm, but I hope you will rewrite for newest lua versions

fervi commented 10 years ago

A możesz wymusić kompilację za pomocą lua5.1? Bo mam 5.1 też (w Debianie jest 5.0, 5.1 i 5.2) i się kompiluje tylko przez 5.2

iryont commented 10 years ago

Powinno tak robić, spróbuj teraz.

fervi commented 10 years ago

[ 44%] Building CXX object src/CMakeFiles/otserv.dir/scheduler.cpp.o /home/fervi/server-master/src/scheduler.cpp: In member function ‘void Scheduler::start()’: /home/fervi/server-master/src/scheduler.cpp:44:82: error: ‘class boost::thread’ has no member named ‘move’ mthread = boost::thread(boost::bind(&Scheduler::schedulerThread, (void)this)).move(); ^ make[2]: _\ [src/CMakeFiles/otserv.dir/scheduler.cpp.o] Błąd 1 make[1]: * [src/CMakeFiles/otserv.dir/all] Błąd 2 make: * [all] Błąd 2

Libboost 1.54, czy jakiś cudaczny trzeba? (oby nie ...) ;)

iryont commented 10 years ago

Akurat nie powinno to być wymagane w naszym wypadku, możesz teraz spróbować.

fervi commented 10 years ago

[ 91%] Building CXX object src/CMakeFiles/otserv.dir/tasks.cpp.o /home/fervi/server-master/src/tasks.cpp: In member function ‘void Dispatcher::start()’: /home/fervi/server-master/src/tasks.cpp:49:85: error: ‘class boost::thread’ has no member named ‘move’ mthread = boost::thread(boost::bind(&Dispatcher::dispatcherThread, (void)this)).move(); ^ make[2]: _\ [src/CMakeFiles/otserv.dir/tasks.cpp.o] Błąd 1 make[1]: * [src/CMakeFiles/otserv.dir/all] Błąd 2 make: * [all] Błąd 2

91% - Prawie dobrze :P

iryont commented 10 years ago

Ten sam błąd, polecam teraz sklonować i spróbować.

fervi commented 10 years ago

Działa :P Dzięki

Przy okazji https://github.com/opentibia/server/issues/14

Umiałbyś to naprawić? Bug uciążliwy, a autor kodu nie odpisuje na maile ...

Jak coś niebawem zamknę temat

iryont commented 10 years ago

To już nie dziś, będę na to patrzył wkrótce.

fervi commented 10 years ago

Dobra, to zamykam (jak się nie uda, to przenieś do closed)