ElunaLuaEngine / Eluna

Eluna Lua Engine © for WoW Emulators
https://elunaluaengine.github.io
GNU General Public License v3.0
372 stars 356 forks source link

Build failed with Mangos Two #283

Closed fly-man- closed 5 years ago

fly-man- commented 5 years ago

In file included from /home/mangos/two/src/server/src/modules/Eluna/HookHelpers.h:10:0, from /home/mangos/two/src/server/src/modules/Eluna/InstanceHooks.cpp:8: /home/mangos/two/src/server/src/modules/Eluna/LuaEngine.h:445:53: error: ‘DuelCompleteType’ has not been declared void OnDuelEnd(Player pWinner, Player pLoser, DuelCompleteType type); ^ In file included from /home/mangos/two/src/server/src/modules/Eluna/HookHelpers.h:10:0, from /home/mangos/two/src/server/src/modules/Eluna/ServerHooks.cpp:8: /home/mangos/two/src/server/src/modules/Eluna/LuaEngine.h:445:53: error: ‘DuelCompleteType’ has not been declared void OnDuelEnd(Player pWinner, Player pLoser, DuelCompleteType type); ^ In file included from /home/mangos/two/src/server/src/modules/Eluna/HookHelpers.h:10:0, from /home/mangos/two/src/server/src/modules/Eluna/GameObjectHooks.cpp:8: /home/mangos/two/src/server/src/modules/Eluna/LuaEngine.h:445:53: error: ‘DuelCompleteType’ has not been declared void OnDuelEnd(Player pWinner, Player pLoser, DuelCompleteType type); ^ /home/mangos/two/src/server/src/modules/Eluna/ServerHooks.cpp: In member function ‘void Eluna::OnAdd(AuctionHouseObject, AuctionEntry)’: /home/mangos/two/src/server/src/modules/Eluna/ServerHooks.cpp:140:95: error: ‘MAKE_NEW_GUID’ was not declared in this scope Player owner = eObjectAccessor()FindPlayer(MAKE_NEW_GUID(entry->owner, 0, HIGHGUID_PLAYER)); ^ /home/mangos/two/src/server/src/modules/Eluna/ServerHooks.cpp: In member function ‘void Eluna::OnRemove(AuctionHouseObject, AuctionEntry)’: /home/mangos/two/src/server/src/modules/Eluna/ServerHooks.cpp:170:95: error: ‘MAKE_NEW_GUID’ was not declared in this scope Player owner = eObjectAccessor()FindPlayer(MAKE_NEW_GUID(entry->owner, 0, HIGHGUID_PLAYER)); ^ /home/mangos/two/src/server/src/modules/Eluna/ServerHooks.cpp: In member function ‘void Eluna::OnSuccessful(AuctionHouseObject, AuctionEntry)’: /home/mangos/two/src/server/src/modules/Eluna/ServerHooks.cpp:200:95: error: ‘MAKE_NEW_GUID’ was not declared in this scope Player owner = eObjectAccessor()FindPlayer(MAKE_NEW_GUID(entry->owner, 0, HIGHGUID_PLAYER)); ^ /home/mangos/two/src/server/src/modules/Eluna/ServerHooks.cpp: In member function ‘void Eluna::OnExpire(AuctionHouseObject, AuctionEntry)’: /home/mangos/two/src/server/src/modules/Eluna/ServerHooks.cpp:230:95: error: ‘MAKE_NEW_GUID’ was not declared in this scope Player owner = eObjectAccessor()FindPlayer(MAKE_NEW_GUID(entry->owner, 0, HIGHGUID_PLAYER)); ^ In file included from /home/mangos/two/src/server/src/modules/Eluna/HookHelpers.h:10:0, from /home/mangos/two/src/server/src/modules/Eluna/VehicleHooks.cpp:8: /home/mangos/two/src/server/src/modules/Eluna/LuaEngine.h:445:53: error: ‘DuelCompleteType’ has not been declared void OnDuelEnd(Player pWinner, Player pLoser, DuelCompleteType type); ^ In file included from /home/mangos/two/src/server/src/modules/Eluna/LuaEngine.h:22:0, from /home/mangos/two/src/server/src/modules/Eluna/HookHelpers.h:10, from /home/mangos/two/src/server/src/modules/Eluna/VehicleHooks.cpp:8: /home/mangos/two/src/server/src/modules/Eluna/ElunaTemplate.h: In static member function ‘static int ElunaGlobal::thunk(lua_State*)’: /home/mangos/two/src/server/src/modules/Eluna/ElunaUtility.h:57:33: error: ‘sLog’ was not declared in this scope

define ELUNA_LOG_ERROR(...) sLog.outErrorEluna(__VA_ARGS__);

                             ^

/home/mangos/two/src/server/src/modules/Eluna/ElunaTemplate.h:31:13: note: in expansion of macro ‘ELUNA_LOG_ERROR’ ELUNA_LOG_ERROR("[Eluna]: %s returned unexpected amount of arguments %i out of %i. Report to devs", l->name, args, expected); ^ /home/mangos/two/src/server/src/modules/Eluna/ElunaTemplate.h: In static member function ‘static int ElunaTemplate::Push(lua_State, const T)’: /home/mangos/two/src/server/src/modules/Eluna/ElunaUtility.h:57:33: error: ‘sLog’ was not declared in this scope

define ELUNA_LOG_ERROR(...) sLog.outErrorEluna(__VA_ARGS__);

                             ^

/home/mangos/two/src/server/src/modules/Eluna/ElunaTemplate.h:266:13: note: in expansion of macro ‘ELUNA_LOG_ERROR’ ELUNA_LOG_ERROR("%s could not create new userdata", tname); ^ /home/mangos/two/src/server/src/modules/Eluna/ElunaUtility.h:57:33: error: ‘sLog’ was not declared in this scope

define ELUNA_LOG_ERROR(...) sLog.outErrorEluna(__VA_ARGS__);

                             ^

/home/mangos/two/src/server/src/modules/Eluna/ElunaTemplate.h:277:13: note: in expansion of macro ‘ELUNA_LOG_ERROR’ ELUNA_LOG_ERROR("%s missing metatable", tname); ^ /home/mangos/two/src/server/src/modules/Eluna/ElunaTemplate.h: In static member function ‘static T ElunaTemplate::Check(lua_State, int, bool)’: /home/mangos/two/src/server/src/modules/Eluna/ElunaUtility.h:57:33: error: ‘sLog’ was not declared in this scope

define ELUNA_LOG_ERROR(...) sLog.outErrorEluna(__VA_ARGS__);

                             ^

/home/mangos/two/src/server/src/modules/Eluna/ElunaTemplate.h:302:17: note: in expansion of macro ‘ELUNA_LOG_ERROR’ ELUNA_LOG_ERROR("%s", buff); ^ /home/mangos/two/src/server/src/modules/Eluna/ElunaTemplate.h: In static member function ‘static int ElunaTemplate::CallMethod(lua_State*)’: /home/mangos/two/src/server/src/modules/Eluna/ElunaUtility.h:57:33: error: ‘sLog’ was not declared in this scope

define ELUNA_LOG_ERROR(...) sLog.outErrorEluna(__VA_ARGS__);

                             ^

/home/mangos/two/src/server/src/modules/Eluna/ElunaTemplate.h:335:13: note: in expansion of macro ‘ELUNA_LOG_ERROR’ ELUNA_LOG_ERROR("[Eluna]: %s returned unexpected amount of arguments %i out of %i. Report to devs", l->name, args, expected); ^ make[2]: [src/modules/Eluna/CMakeFiles/LuaEngine.dir/VehicleHooks.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: [src/modules/Eluna/CMakeFiles/LuaEngine.dir/InstanceHooks.cpp.o] Error 1 make[2]: [src/modules/Eluna/CMakeFiles/LuaEngine.dir/GameObjectHooks.cpp.o] Error 1 make[2]: [src/modules/Eluna/CMakeFiles/LuaEngine.dir/ServerHooks.cpp.o] Error 1 make[1]: [src/modules/Eluna/CMakeFiles/LuaEngine.dir/all] Error 2 make: *** [all] Error 2

Rochet2 commented 5 years ago

It seems you are using latest Eluna with latest mangos two. That is not how it is intended. What guide did you follow?

Eluna is usually provided as a submodule, which means that the source points to a specific commit, which may not be the latest one. You should use git submodule command: git submodule update --init to get the proper submodule versions for your source instead of downloading the latest code (unless you fix the errors yourself).

Some of the errors you posted were in the current version too, however. I have now fixed all of the errors in the latest Eluna on mangos two. However some errors require core changes and a PR has been created here: https://github.com/mangostwo/server/pull/163

fly-man- commented 5 years ago

I used the Auto Builder script that came with the download called getmangos.sh

MaNGOS Build Automation Script Written By: Ryan Ashley Updated By: Cedric Servais Copyright (c) 2014-2018 MaNGOS Project https://getmangos.eu/

[Link: https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-mangos-on-ubuntu-1604-lts-r20078/ ]

It pulls the latest codebase and submodules, that's why I was a little confused that it didn't compile properly.

Will wait for @MadMaxMangos or @billy1arm to pick up on the PR to see how this can be fixed for the near future.

Rochet2 commented 5 years ago

The fixes have now been applied, so even the latest versions should build. So you can now retry if you want to. However it will probably take a bit more time to resolve the issue of downloading latest version.

fly-man- commented 5 years ago

/home/mangos/two/src/server/src/game/WorldHandlers/ScriptMgr.cpp: In member function ‘uint32 ScriptMgr::GetDialogStatus(Player, Creature)’: /home/mangos/two/src/server/src/game/WorldHandlers/ScriptMgr.cpp:2290:69: error: void value not ignored as it ought to be if (uint32 dialogId = sEluna->GetDialogStatus(pPlayer, pCreature)) ^ /home/mangos/two/src/server/src/game/WorldHandlers/ScriptMgr.cpp: In member function ‘uint32 ScriptMgr::GetDialogStatus(Player, GameObject)’: /home/mangos/two/src/server/src/game/WorldHandlers/ScriptMgr.cpp:2305:71: error: void value not ignored as it ought to be if (uint32 dialogId = sEluna->GetDialogStatus(pPlayer, pGameObject)) ^ src/game/CMakeFiles/game.dir/build.make:4238: recipe for target 'src/game/CMakeFiles/game.dir/WorldHandlers/ScriptMgr.cpp.o' failed make[2]: [src/game/CMakeFiles/game.dir/WorldHandlers/ScriptMgr.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:1047: recipe for target 'src/game/CMakeFiles/game.dir/all' failed make[1]: [src/game/CMakeFiles/game.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: [all] Error 2

Other then that, the Eluna master gives no errors

Rochet2 commented 5 years ago

You do not have the latest mangos two.

fly-man- commented 5 years ago

Fixed, latest version of Mangos Two has all the fixes now.

Thank you for the help in this.