Closed darkpoetry closed 2 years ago
See also: Issue 2330 for existing replication.
@ulfgebhardt: Which database server do you have installed? Did you read this note in the installation guide?
"Any MySQL server such as MySQL server community edition or XAMPP. (Note 2018-05-02: Do not use MySQL version 8.0 for now since build will fail on some queries. Use 5.7 until resolved)"
If that is not the problem, I will replicate this.
I dont have this issue @christiansiewert i just linked the issue properly
I'm using whatever is stock for debian 10.
@darkpoetry You better have a look, because as I said before, with MySQL 8 installed the build will fail, no matter what operating system you use and as far as I know, MySQL 8 is now installed by default.
@christiansiewert I've gone and checked, you are correct. It is 8 by default. Yikes. Will close this out then.
FWIW, up to now (well, a few weeks ago) it has actually compiled.
You maybe updated it via apt or something else.
No, debian has had the same libs throughout. Just wanted to drop this here because mangos previously compiled on mariadb 8 fine as of this build (using the install application set provided in the installation guide), and had compiled fine with it for months prior.
Built on Nov 27 2020 at 18:34:13 Built for Linux_x64 (little-endian) Using commit hash(6e10f6f5ec2e31597873623ea8b74275e9e5d970) committed on 2020-11-27T14:07:19+01:00
After wasting hours trying to get mysql 5.7 libs installed I gave up and reverted. Seems like a failure to define something should be an easy fix, but I haven't dug into it yet.
I will have a look at this, @darkpoetry.
I replicated the bug, @darkpoetry. You are right.
[ 77%] Building CXX object src/game/CMakeFiles/game.dir/Entities/GossipDef.cpp.o
In file included from /home/mangos/server/wotlk-mangos/src/game/Entities/GossipDef.h:23,
from /home/mangos/server/wotlk-mangos/src/game/Entities/GossipDef.cpp:19:
/home/mangos/server/wotlk-mangos/src/game/Quests/QuestDef.h:280:28: error: âDifficultyâ has not been declared
bool IsRaidQuest(Difficulty difficulty) const;
^~~~~~~~~~
make[2]: *** [src/game/CMakeFiles/game.dir/build.make:7239: src/game/CMakeFiles/game.dir/Entities/GossipDef.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:628: src/game/CMakeFiles/game.dir/all] Fehler 2
make: *** [Makefile:130: all] Fehler 2
As the error says, in https://github.com/cmangos/mangos-wotlk/blob/master/src/game/Quests/QuestDef.h#L280 is a function declared, which you can pass an difficulty
argument of type Difficulty
to.
bool IsRaidQuest(Difficulty difficulty) const;
// error: âDifficultyâ has not been declared
Someone should check what is going on here.
``` mangos@mangos:~/server/build$ cmake ../wotlk-mangos/ -DCMAKE_INSTALL_PREFIX=\../wotlk-mangos/run -DBUILD_EXTRACTORS=ON -DPCH=1 -DDEBUG=0 -DBUILD_PLAYERBOT=ON -- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- This script builds the MaNGOS server. Options that can be used in order to configure the process: CMAKE_INSTALL_PREFIX Path where the server should be installed to PCH Use precompiled headers DEBUG Include additional debug-code in core WARNINGS Show all warnings during compile POSTGRESQL Use PostgreSQL instead of mysql BUILD_GAME_SERVER Build game server (core server) BUILD_LOGIN_SERVER Build login server (auth server) BUILD_EXTRACTORS Build map/dbc/vmap/mmap extractor BUILD_SCRIPTDEV Build scriptdev. (Disable it to speedup build in dev mode by not including scripts) BUILD_PLAYERBOT Build Playerbot mod BUILD_AHBOT Build Auction House Bot mod BUILD_RECASTDEMOMOD Build map/vmap/mmap viewer BUILD_GIT_ID Build git_id BUILD_DOCS Build documentation with doxygen To set an option simply type -D
I have the same problem
Ubuntu 18.04 Server LTS mysql Ver 14.14 Distrib 5.7.32, for Linux (x86_64) using EditLine wrapper
"3.3.5a" (WOTLK)
-- CMaNGOS-Core revision : 455b25ced8288d39e345a7fb7513b268d535e5e2 -- Revision time stamp : "2020-12-12T13:56:32+01:00"
[ 82%] Building CXX object src/game/CMakeFiles/game.dir/Entities/GossipDef.cpp.o In file included from /home/mangos/cmangos/wotlk/src/game/Entities/GossipDef.h:23:0, from /home/mangos/cmangos/wotlk/src/game/Entities/GossipDef.cpp:19: /home/mangos/cmangos/wotlk/src/game/Quests/QuestDef.h:280:28: error: âDifficultyâ has not been declared bool IsRaidQuest(Difficulty difficulty) const; ^~~~~~ [ 82%] Building CXX object src/game/CMakeFiles/game.dir/Entities/Item.cpp.o [ 82%] Building CXX object src/game/CMakeFiles/game.dir/Entities/ItemEnchantmentMgr.cpp.o [ 82%] Building CXX object src/game/CMakeFiles/game.dir/Entities/ItemHandler.cpp.o [ 82%] Building CXX object src/game/CMakeFiles/game.dir/Entities/MiscHandler.cpp.o /home/mangos/cmangos/wotlk/src/game/Entities/GameObject.cpp: In member function âvirtual bool GameObject::isVisibleForInState(const Player, const WorldObject, bool) constâ: /home/mangos/cmangos/wotlk/src/game/Entities/GameObject.cpp:1079:18: warning: zero-length gnu_printf format string [-Wformat-zero-length] printf(""); ^ [ 82%] Building CXX object src/game/CMakeFiles/game.dir/Entities/NPCHandler.cpp.o [ 82%] Building CXX object src/game/CMakeFiles/game.dir/Entities/Object.cpp.o [ 83%] Building CXX object src/game/CMakeFiles/game.dir/Entities/ObjectGuid.cpp.o [ 83%] Building CXX object src/game/CMakeFiles/game.dir/Entities/ObjectVisibility.cpp.o [ 83%] Building CXX object src/game/CMakeFiles/game.dir/Entities/Pet.cpp.o src/game/CMakeFiles/game.dir/build.make:13310: recipe for target 'src/game/CMakeFiles/game.dir/Entities/GossipDef.cpp.o' failed make[2]: [src/game/CMakeFiles/game.dir/Entities/GossipDef.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:800: recipe for target 'src/game/CMakeFiles/game.dir/all' failed make[1]: [src/game/CMakeFiles/game.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: [all] Error 2
Is the problem still up to date, @adellaci? I also commented https://github.com/cmangos/issues/issues/2340 and the compilation error seems to be fixed.
Visit https://github.com/cmangos/issues/issues/2340#issuecomment-743927511 please.
It was not fixed when i compiled this morning.
Operating System: Ubuntu 18.04.5 Server LTS Database: mysql Ver 14.14 Distrib 5.7.32, for Linux (x86_64) using EditLine wrapper Tools : gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 GNU Make 4.1 Built for x86_64-pc-linux-gnu GNU patch 2.7.6 cmake version 3.10.2 autoconf (GNU Autoconf) 2.69 g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMangos Version: -- CMaNGOS-Core revision : 39230ce2ea7259b7f7fa2150a1f52927cad4400e -- Revision time stamp : "2020-12-13T11:36:53+03:00"
Compile Command:
cd ~/build/wotlk rm -rf * cmake ~/cmangos/wotlk -DCMAKE_INSTALL_PREFIX=~/wow-servers/wotlk -DBUILD_EXTRACTORS=ON -DBUILD_AHBOT=ON -DBUILD_PLAYERBOT=ON -DPCH=1 -DDEBUG=0 -DBUILD_RECASTDEMOMOD=ON ; make -j12 cd ~
Results: `[ 77%] Building CXX object src/game/CMakeFiles/game.dir/BattleGround/BattleGroundRL.cpp.o /home/mangos/cmangos/wotlk/src/game/BattleGround/BattleGround.cpp: In member function âvirtual void BattleGround::RemovePlayerAtLeave(ObjectGuid, bool, bool)â: /home/mangos/cmangos/wotlk/src/game/BattleGround/BattleGround.cpp:1305:49: warning: enumeral mismatch in conditional expression: âArenaSpellsâ vs âBattleGroundSpellsâ [-Wenum-compare] player->RemoveAurasDueToSpell(IsArena() ? SPELL_ARENA_DAMPENING : SPELL_BATTLEGROUND_DAMPENING);
`
`[ 82%] Building CXX object src/game/CMakeFiles/game.dir/Entities/Item.cpp.o
In file included from /home/mangos/cmangos/wotlk/src/game/Entities/GossipDef.h:23:0,
from /home/mangos/cmangos/wotlk/src/game/Entities/GossipDef.cpp:19:
/home/mangos/cmangos/wotlk/src/game/Quests/QuestDef.h:280:28: error: âDifficultyâ has not been declared
bool IsRaidQuest(Difficulty difficulty) const;
^~~~~~~~~~
`
`[ 83%] Building CXX object src/game/CMakeFiles/game.dir/Entities/ObjectVisibility.cpp.o
/home/mangos/cmangos/wotlk/src/game/Entities/GameObject.cpp: In member function âvirtual bool GameObject::isVisibleForInState(const Player*, const WorldObject*, bool) constâ:
/home/mangos/cmangos/wotlk/src/game/Entities/GameObject.cpp:1079:18: warning: zero-length gnu_printf format string [-Wformat-zero-length]
printf("");
`
`[ 83%] Building CXX object src/game/CMakeFiles/game.dir/Entities/Pet.cpp.o
src/game/CMakeFiles/game.dir/build.make:13310: recipe for target 'src/game/CMakeFiles/game.dir/Entities/GossipDef.cpp.o' failed
make[2]: *** [src/game/CMakeFiles/game.dir/Entities/GossipDef.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:800: recipe for target 'src/game/CMakeFiles/game.dir/all' failed
make[1]: *** [src/game/CMakeFiles/game.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2`
@adellaci, as I said in https://github.com/cmangos/issues/issues/2340#issuecomment-743927511, I cannot reproduce this anymore, sorry. I just pulled the WOTLK sources again.
gitpod /workspace/rooster $ mkdir src && mkdir build && cd src/
gitpod /workspace/rooster/src $ git clone https://github.com/cmangos/mangos-wotlk .
cd ../build/
cmake ../src/ -DCMAKE_INSTALL_PREFIX=\../src/run -DBUILD_EXTRACTORS=ON -DPCH=1 -DDEBUG=0 -DBUILD_PLAYERBOT=ON
make -j16
It finished with [100%] Built target mangosd
System:
gitpod /workspace/rooster/build $ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
...
gitpod /workspace/rooster/src $ git log -1 --format=%H
39230ce2ea7259b7f7fa2150a1f52927cad4400e # WOTLK sources
...
gitpod /workspace/rooster $ mariadb --version
mariadb Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
I had to change my_bool
to bool
in https://github.com/cmangos/mangos-wotlk/blob/master/src/shared/Database/DatabaseMysql.cpp#L419 and https://github.com/cmangos/mangos-wotlk/blob/master/src/shared/Database/DatabaseMysql.h#L50 because this MariaDB version relies on MySQL 8.
Maybe someone can check this out, but the build works for me now.
I am giving try from the latest update. If this doesn't work, i am going to upgrade OS to 20.04 and try there.
Okay i ran it under 18.04 with todays update. It still failed compiling with the same issues. I will upgrade server and see if it a OS version issue or a SQL server issue
With the up grade i end up with this:
[ 8%] Building CXX object dep/g3dlite/CMakeFiles/g3dlite.dir/Random.cpp.o In file included from /home/mangos/cmangos/wotlk/src/shared/Database/DatabaseEnv.h:41, from /home/mangos/cmangos/wotlk/src/shared/pchdef.h:34, from /home/mangos/build/wotlk/src/shared/CMakeFiles/shared.dir/cmake_pch.hxx:5, from <command-line>: /home/mangos/cmangos/wotlk/src/shared/Database/DatabaseMysql.h:50:75: error: âmy_boolâ has not been declared 50 | static enum_field_types ToMySQLType(const SqlStmtFieldData& data, my_bool& bUnsigned); | ^~~~~~~ /home/mangos/cmangos/wotlk/contrib/vmap_extractor/vmapextract/vmapexport.cpp: In function âbool ExtractSingleWmo(std::string&)â: /home/mangos/cmangos/wotlk/contrib/vmap_extractor/vmapextract/vmapexport.cpp:203:40: warning: â%03dâ directive writing between 3 and 11 bytes into a region of size between 0 and 1023 [-Wformat-overflow=] 203 | sprintf(groupFileName, "%s_%03d.wmo", temp, i); | ^~~~ /home/mangos/cmangos/wotlk/contrib/vmap_extractor/vmapextract/vmapexport.cpp:203:36: note: using the range [-2147483648, 2147483647] for directive argument 203 | sprintf(groupFileName, "%s_%03d.wmo", temp, i); | ^~~~~~~~~~~~~ In file included from /usr/include/stdio.h:867, from /usr/include/c++/9/cstdio:42, from /home/mangos/cmangos/wotlk/contrib/vmap_extractor/vmapextract/vmapexport.cpp:20: /usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: â__builtin___sprintf_chkâ output between 9 and 1040 bytes into a destination of size 1024 36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | __bos (__s), __fmt, __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 8%] Building CXX object dep/g3dlite/CMakeFiles/g3dlite.dir/Ray.cpp.o /home/mangos/cmangos/wotlk/contrib/vmap_extractor/vmapextract/vmapexport.cpp: In function âbool fillArchiveNameVector(std::vector<std::__cxx11::basic_string<char> >&)â: /home/mangos/cmangos/wotlk/contrib/vmap_extractor/vmapextract/vmapexport.cpp:360:20: warning: â%sâ directive writing up to 1023 bytes into a region of size 512 [-Wformat-overflow=] 360 | sprintf(path, "%spatch", input_path); | ^~ ~~~~~~~~~~ In file included from /usr/include/stdio.h:867, from /usr/include/c++/9/cstdio:42, from /home/mangos/cmangos/wotlk/contrib/vmap_extractor/vmapextract/vmapexport.cpp:20: /usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: â__builtin___sprintf_chkâ output between 6 and 1029 bytes into a destination of size 512 36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | __bos (__s), __fmt, __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/mangos/cmangos/wotlk/contrib/vmap_extractor/vmapextract/vmapexport.cpp:370:24: warning: â%sâ directive writing up to 1023 bytes into a region of size 512 [-Wformat-overflow=] 370 | sprintf(path, "%s%s/patch-%s", input_path, i->c_str(), i->c_str()); | ^~ ~~~~~~~~~~ In file included from /usr/include/stdio.h:867, from /usr/include/c++/9/cstdio:42, from /home/mangos/cmangos/wotlk/contrib/vmap_extractor/vmapextract/vmapexport.cpp:20: /usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: â__builtin___sprintf_chkâ output 8 or more bytes (assuming 1031) into a destination of size 512 36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | __bos (__s), __fmt, __va_arg_pack ()); .......... [ 11%] Building CXX object contrib/mmap/CMakeFiles/vmaplib.dir/__/__/src/game/Vmap/BIH.cpp.o make[2]: *** [src/shared/CMakeFiles/shared.dir/build.make:64: src/shared/CMakeFiles/shared.dir/cmake_pch.hxx.gch] Error 1 make[1]: *** [CMakeFiles/Makefile2:820: src/shared/CMakeFiles/shared.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 12%] Linking CXX static library libvmaplib.a [ 12%] Built target vmaplib make: *** [Makefile:130: all] Error 2
@adellaci As I already said, when you are using MySQL 8 you will have to change my_bool
datatype to bool
because Oracle replaced it.
Visit https://github.com/cmangos/issues/issues/2336#issuecomment-740709621 and https://github.com/cmangos/issues/issues/2336#issuecomment-744015333 please.
The rest of the build output consists of warnings that you can ignore for now.
Sorry @christiansiewert forgot that part i will make the changes and try again.
@christiansiewert I made the change from "my_bool" to "bool" and compiling completes with several warnings involving the following file:
/home/mangos/cmangos/wotlk-build/src/shared/Log.cpp: In static member function âstatic std::string Log::GetTimestampStr()â: /home/mangos/cmangos/wotlk-build/src/shared/Log.cpp: In member function âvoid Log::Initialize()â: /home/mangos/cmangos/wotlk-build/src/shared/Util.cpp: In function âstd::string TimeToTimestampStr(time_t)â: /home/mangos/cmangos/wotlk-build/src/game/BattleGround/BattleGround.cpp: In member function âvirtual void BattleGround::RemovePlayerAtLeave(ObjectGuid, bool, bool)â:
/home/mangos/cmangos/wotlk-build/src/game/Entities/GameObject.cpp: In member function âvirtual bool GameObject::isVisibleForInState(const Player, const WorldObject, bool) constâ:
/home/mangos/cmangos/wotlk-build/src/game/Entities/Player.cpp: In member function âvoid Player::KilledPlayerCredit(uint16)â: /home/mangos/cmangos/wotlk-build/src/mangosd/CliRunnable.cpp: In member function âbool ChatHandler::GetDeletedCharacterInfoList(ChatHandler::DeletedInfoList&, std::string)â:
Are these expected or should i open another issue?
Are these expected or should i open another issue?
You better ask this to some member of the core team because I am not directly involved in the development process of cmangos and also do not have a current overview of the code at the moment.
đ Bugreport
Clean pull of wotlk fails to compile
Expected behavior
Clean compilation
Version & Environment
Client Version: 3.3.5a
CMaNGOS Repo & Commit Hash: mangos-wotlk 395034b
Database Repo & Commit Hash: wotlk-db ddb66d981764e4d8d1b3adb4bb36136f944a58de
Operating System: Debian Linux 10.6 amd64
Steps to reproduce
Crashlog
~~~~~