azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.56k stars 2.63k forks source link

Without PCH, compiling fails. #17610

Closed It0w closed 1 year ago

It0w commented 1 year ago

Current Behaviour

I tried compiling the AzerothCore with debug to create a crashdump and post it here.

Expected Blizzlike Behaviour

Would be nice if compiling would go through.

Source

N/A

Steps to reproduce the problem

./acore.sh compiler all

Extra Notes

Error ```[ 50%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp.o In file included from /mnt/raid0/wow_server/azerothcore/src/server/game/Movement/Waypoints/WaypointMgr.cpp:18: /mnt/raid0/wow_server/azerothcore/src/server/game/Movement/Waypoints/WaypointMgr.h:39:10: fatal error: no template named 'optional' in namespace 'std' std::optional orientation; ~~~~~^ 1 error generated. gmake[2]: *** [src/server/game/CMakeFiles/game.dir/build.make:2750: src/server/game/CMakeFiles/game.dir/Movement/Waypoints/WaypointMgr.cpp.o] Error 1 gmake[2]: *** Waiting for unfinished jobs.... [ 50%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp.o [ 50%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/ScarletEnclave/chapter1.cpp.o [ 50%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/ScarletEnclave/chapter2.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/ScarletEnclave/chapter3.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/ScarletEnclave/chapter5.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/Scholomance/boss_kormok.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/Scholomance/instance_scholomance.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp.o [ 51%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp.o [ 52%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/Stratholme/boss_jarien_and_sothos.cpp.o gmake[1]: *** [CMakeFiles/Makefile2:1050: src/server/game/CMakeFiles/game.dir/all] Error 2 gmake[1]: *** Waiting for unfinished jobs.... ```
Console Output ```==== ACORE COMPILER ==== Cleaning build files in /mnt/raid0/wow_server/azerothcore/var/build/obj Build path: /mnt/raid0/wow_server/azerothcore/var/build/obj DEBUG info: OFF Compilation type: Release CCache: true Platform: linux-gnu -- CMake version: 3.25.1 -- The CXX compiler identification is Clang 14.0.6 -- The C compiler identification is Clang 14.0.6 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done > Warning: module using deprecated add config file api -- POCKET PORTAL CONFIGURED -- -- Running cmake hook: AFTER_LOAD_CONF -- No hooks registered for AFTER_LOAD_CONF -- Enabled С++20 standard -- Detected 64-bit platform -- UNIX: Using jemalloc -- UNIX: Using default configuration directory -- UNIX: Using default library directory -- UNIX: Configuring uninstall target -- UNIX: Created uninstall target -- UNIX: Detected compiler: /usr/bin/clang -- Clang: Minimum version required is 10.0.0, found 14.0.6 - ok! -- Performing Test CLANG_HAVE_PROPER_CHARCONV -- Performing Test CLANG_HAVE_PROPER_CHARCONV - Success -- Clang: All warnings enabled -- Running cmake hook: AFTER_LOAD_CMAKE_MODULES -- No hooks registered for AFTER_LOAD_CMAKE_MODULES -- Using mysql-config: /usr/bin/mysql_config -- Found MySQL library: /usr/lib/x86_64-linux-gnu/libmariadb.so -- Found MySQL headers: /usr/include/mariadb -- Found MySQL executable: /usr/bin/mysql -- Found git binary : /usr/bin/git * AzerothCore revision : f757e93da5cd+ 2023-10-28 10:54:03 +0200 (master branch) * AzerothCore buildtype : Release * Install core to : /mnt/raid0/wow_server/azeroth-server * Install libraries to : /mnt/raid0/wow_server/azeroth-server/lib * Install configs to : /mnt/raid0/wow_server/azeroth-server/etc * Build applications : Yes (all) * Build tools : No * Build with scripts : Yes (static) * Build with modules : Yes (static) * Build unit tests : No (default) * Build core w/PCH : No * Build scripts w/PCH : No * Show all warnings : Yes * Use coreside debug : No (default) * Use unix gperftools : No (default) * Use GIT revision hash : Yes (default) * Enable vmap DisableMgr checks : Yes (default) * Show source tree : No (For UNIX default) -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.67") found components: system filesystem program_options iostreams regex -- Performing Test boost_filesystem_copy_links_without_NO_SCOPED_ENUM -- Performing Test boost_filesystem_copy_links_without_NO_SCOPED_ENUM - Success -- Looking for strtod_l -- Looking for strtod_l - not found -- Looking for MADV_FREE -- Looking for MADV_FREE - found -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.11") found components: Crypto SSL -- Found OpenSSL library: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so -- Found OpenSSL headers: /usr/include -- Looking for C++ include filesystem -- Looking for C++ include filesystem - found -- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED -- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.13") -- Found Readline library: /usr/lib/x86_64-linux-gnu/libreadline.so -- Include dir is: /usr/include -- Running cmake hook: BEFORE_SRC_LOAD -- No hooks registered for BEFORE_SRC_LOAD * Apps build list (all): | +- apps | +- authserver | +- worldserver | -- Running cmake hook: BEFORE_GAME_LIBRARY -- No hooks registered for BEFORE_GAME_LIBRARY -- Running cmake hook: AFTER_GAME_LIBRARY -- No hooks registered for AFTER_GAME_LIBRARY -- Running cmake hook: BEFORE_SCRIPTS_LIBRARY -- No hooks registered for BEFORE_SCRIPTS_LIBRARY * Script configuration (static): | +- worldserver | +- Commands | +- Custom | +- EasternKingdoms | +- Events | +- Kalimdor | +- Northrend | +- OutdoorPvP | +- Outland | +- Pet | +- Spells | +- World | * Modules configuration (static): | +- worldserver | +- DungeonRespawn | +- mod-ah-bot | +- mod-autobalance | +- mod-custom-login | +- mod-gain-honor-guard | +- mod-money-for-kills | +- mod-npc-enchanter | +- mod-pocket-portal | +- mod-random-enchants | +- mod-reagent-bank | +- mod-save-inventory | +- mod-transmog | > Module (mod-pocket-portal) using deprecated loader api -- * Modules config list: | -- +- DungeonRespawn -- | * dungeonrespawn.conf.dist -- +- mod-ah-bot -- | * mod_ahbot.conf.dist -- +- mod-autobalance -- | * AutoBalance.conf.dist -- +- mod-custom-login -- | * mod_customlogin.conf.dist -- +- mod-gain-honor-guard -- | * GainHonorGuard.conf.dist -- +- mod-money-for-kills -- | * mod_moneyforkills.conf.dist -- +- mod-npc-enchanter -- | * npc_enchanter.conf.dist -- +- mod-pocket-portal -- | * pocketportal.conf.dist -- +- mod-random-enchants -- | * RandomEnchants.conf.dist -- +- mod-reagent-bank -- | * reagent_bank.conf.dist -- +- mod-save-inventory -- | * mod-save-inventory.conf.dist -- +- mod-transmog -- | * transmog.conf.dist -- Running cmake hook: AFTER_SRC_LOAD -- No hooks registered for AFTER_SRC_LOAD -- Configuring done -- Generating done -- Build files have been written to: /mnt/raid0/wow_server/azerothcore/var/build/obj Running hooks: HOOKS_MAP_ON_AFTER_CONFIG Using 18 threads Statistics zeroed Cleaning... 100.0% [===================================================================================================] removed output (body is too long maximum is 65536 characters). real 6m52.322s user 101m25.610s sys 5m10.524s ```

Note: I know it is not debug but release. I have tried all three.

AC rev. hash/commit

f757e93da5cd+ 2023-10-28 10:54:03 +0200 (master branch)

Operating system

Debian 12 x64

Custom changes or Modules

It0w commented 1 year ago

Addition:

I changed the following setting back to default and now it compiles again.

# use precompiled headers ( fatest compilation but not optimized if you change headers often ) CSCRIPTPCH=${CSCRIPTPCH:-OFF} CCOREPCH=${CCOREPCH:-OFF}

I don't know why it doesn't compile without PCH.

Kitzunu commented 1 year ago

It's a known issue, so I can confirm this

It0w commented 1 year ago

I would like to add that on my old system that I have been using and am now replacing due to new hardware. Compiling without PCH works.

Pastebin

The old system uses the Debian 11 default kernel and runs as a VM guest. And the new system, Debian 12 with the XanMod kernel, has no VM.

I hope my babbling is helpful.