Unable to compile
fervi opened this issue · 18 comments
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
It should be now fixed, give it a try.
[ 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, cylinderlink_t)’:
/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
These are warnings but since they are treated as an error they do stop the compilation.
Please give it a try now.
[ 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 ^.^
That's fine, I will be fixing such issues until we reach some results.
Please go ahead, try now.
https://travis-ci.org/opentibia/server/jobs/11992673
It was compiled just fine in there.
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 ‘lua_State_’ [-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(lua_State_, lua_State_, 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
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.
Old code (from December) works :(
nvm, but I hope you will rewrite for newest lua versions
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
Powinno tak robić, spróbuj teraz.
[ 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’
m_thread = 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 ...) ;)
Akurat nie powinno to być wymagane w naszym wypadku, możesz teraz spróbować.
[ 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’
m_thread = 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
Ten sam błąd, polecam teraz sklonować i spróbować.
Działa :P Dzięki
Przy okazji
#14
Umiałbyś to naprawić? Bug uciążliwy, a autor kodu nie odpisuje na maile ...
Jak coś niebawem zamknę temat
To już nie dziś, będę na to patrzył wkrótce.
Dobra, to zamykam (jak się nie uda, to przenieś do closed)