Bug found in classic version cmangos.
If cmangos built with cmake options -DBUILD_AHBOT=ON -DBUILD_PLAYERBOTS=ON -DPCH=OFF, making playerbots library fails with error:
#21 9.695 [ 18%] Building CXX object src/modules/PlayerBots/CMakeFiles/playerbots.dir/playerbot/ChatHelper.cpp.o
#21 12.20 /root/cmangos/mangos/src/modules/PlayerBots/playerbot/ChatFilter.cpp: In member function 'virtual std::string GuildChatFilter::Filter(std::string)':
#21 12.20 /root/cmangos/mangos/src/modules/PlayerBots/playerbot/ChatFilter.cpp:675:32: error: 'sGuildMgr' was not declared in this scope
#21 12.20 675 | Guild* guild = sGuildMgr.GetGuildById(bot->GetGuildId());
#21 12.20 | ^~~~~~~~~
#21 12.22 /root/cmangos/mangos/src/modules/PlayerBots/playerbot/ChatFilter.cpp:693:32: error: 'sGuildMgr' was not declared in this scope
#21 12.22 693 | Guild* guild = sGuildMgr.GetGuildById(bot->GetGuildId());
#21 12.22 | ^~~~~~~~~
#21 12.24 /root/cmangos/mangos/src/modules/PlayerBots/playerbot/ChatFilter.cpp:714:28: error: 'sGuildMgr' was not declared in this scope
#21 12.24 714 | Guild* guild = sGuildMgr.GetGuildById(bot->GetGuildId());
#21 12.24 | ^~~~~~~~~
#21 12.25 /root/cmangos/mangos/src/modules/PlayerBots/playerbot/ChatFilter.cpp:729:32: error: 'sGuildMgr' was not declared in this scope
#21 12.25 729 | Guild* guild = sGuildMgr.GetGuildById(bot->GetGuildId());
#21 12.25 | ^~~~~~~~~
#21 14.76 make[3]: *** [src/modules/PlayerBots/CMakeFiles/playerbots.dir/build.make:104: src/modules/PlayerBots/CMakeFiles/playerbots.dir/playerbot/ChatFilter.cpp.o] Error 1
#21 14.76 make[3]: *** Waiting for unfinished jobs....
#21 19.64 make[2]: *** [CMakeFiles/Makefile2:746: src/modules/PlayerBots/CMakeFiles/playerbots.dir/all] Error 2
#21 19.64 make[1]: *** [CMakeFiles/Makefile2:753: src/modules/PlayerBots/CMakeFiles/playerbots.dir/rule] Error 2
#21 19.64 make: *** [Makefile:299: playerbots] Error 2
#21 ERROR: process "/bin/bash -c make -j${JOBS} -l${LOAD_AVERAGE} playerbots" did not complete successfully: exit code: 2
------
> [base 17/27] RUN make -j2 -l2 playerbots:
12.24 714 | Guild* guild = sGuildMgr.GetGuildById(bot->GetGuildId());
12.24 | ^~~~~~~~~
12.25 /root/cmangos/mangos/src/modules/PlayerBots/playerbot/ChatFilter.cpp:729:32: error: 'sGuildMgr' was not declared in this scope
12.25 729 | Guild* guild = sGuildMgr.GetGuildById(bot->GetGuildId());
12.25 | ^~~~~~~~~
14.76 make[3]: *** [src/modules/PlayerBots/CMakeFiles/playerbots.dir/build.make:104: src/modules/PlayerBots/CMakeFiles/playerbots.dir/playerbot/ChatFilter.cpp.o] Error 1
14.76 make[3]: *** Waiting for unfinished jobs....
19.64 make[2]: *** [CMakeFiles/Makefile2:746: src/modules/PlayerBots/CMakeFiles/playerbots.dir/all] Error 2
19.64 make[1]: *** [CMakeFiles/Makefile2:753: src/modules/PlayerBots/CMakeFiles/playerbots.dir/rule] Error 2
19.64 make: *** [Makefile:299: playerbots] Error 2
Steps to Reproduce
CMake cmangos-classic project with options -DBUILD_AHBOT=ON -DBUILD_PLAYERBOTS=ON -DPCH=OFF
Build playerbots library (make playerbots)
Wait for compilation error
Expected behavior
No compilation error must be occured while compiling project with PCH option off and with playerbots module.
Bug Details
Bug found in classic version cmangos. If cmangos built with cmake options
-DBUILD_AHBOT=ON -DBUILD_PLAYERBOTS=ON -DPCH=OFF
, making playerbots library fails with error:Steps to Reproduce
-DBUILD_AHBOT=ON -DBUILD_PLAYERBOTS=ON -DPCH=OFF
make playerbots
)Expected behavior
No compilation error must be occured while compiling project with PCH option off and with playerbots module.
Suggested Workaround
No response
Crash Log
No response
Core SHA1 Commit Hash
4a3e2845458935721a8f16103d9592da15370b64
Database SHA1 Commit Hash
652013132d8c60b4f9bcf07f6f88941818a1d94e
Operating System
Ubuntu 22.04
Client Version
1.12.1 (Classic)