Fix "Unknown CMake command "check_symbol_exists"."#466
Fix "Unknown CMake command "check_symbol_exists"."#466TheSCREWEDSoftware wants to merge 1 commit into
Conversation
Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.26200. The C compiler identification is MSVC 19.44.35222.0 The CXX compiler identification is MSVC 19.44.35222.0 Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped Detecting C compile features Detecting C compile features - done Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped Detecting CXX compile features Detecting CXX compile features - done Detected 64-bit platform MSVC: Minimum version required is 19.32, found 19.44.35222.0 - ok! MSVC: 64-bit platform, enforced -D_WIN64 parameter MSVC: Enabled increased number of sections in object files MSVC: Overloaded standard names MSVC: Disabled NON-SECURE warnings MSVC: Disabled POSIX warnings MSVC: Disabled generic compiletime warnings Found MySQL: Found Git: C:/Program Files/Git/cmd/git.exe (found suitable version "2.47.0.windows.2", minimum required is "1.7") Found MySQL: found components: binary Found MySQL executable: C:/Program Files/MySQL/MySQL Workbench 8.0 CE/mysql.exe * TrinityCore revision : 716f480 2026-05-05 11:31:32 +0200 (master branch) * Install core to : C:/Program Files (x86)/TrinityCore * Build world/auth : Yes (default) * Build with scripts : Yes (static) * Build map/vmap tools : Yes (default) * Build unit tests : No (default) * Unity build enabled : No (default) * Build core w/PCH : Yes (default) * Build scripts w/PCH : Yes (default) * Show compile-warnings : No (default) * Use coreside debug : No (default) * Show source tree : Yes (hierarchical) * Use GIT revision hash : Yes (default) Performing Test CMAKE_HAVE_LIBC_PTHREAD Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed Looking for pthread_create in pthreads Looking for pthread_create in pthreads - not found Looking for pthread_create in pthread Looking for pthread_create in pthread - not found Found Threads: TRUE Boost toolset is unknown (compiler MSVC 19.44.35222.0) Boost toolset is unknown (compiler MSVC 19.44.35222.0) Boost toolset is unknown (compiler MSVC 19.44.35222.0) Boost toolset is unknown (compiler MSVC 19.44.35222.0) Boost toolset is unknown (compiler MSVC 19.44.35222.0) Boost toolset is unknown (compiler MSVC 19.44.35222.0) Boost toolset is unknown (compiler MSVC 19.44.35222.0) Boost toolset is unknown (compiler MSVC 19.44.35222.0) CMake Error at dep/fmt/CMakeLists.txt:18 (check_symbol_exists): Unknown CMake command "check_symbol_exists". Configuring incomplete, errors occurred!
|
I can't reproduce the error. What cmake version do you use and how did you reproduce it? |
|
CMake 4.2.2 Configure, choose VS22 (VS26 not supported) and during configuration it threw the error (same as the one in the commit message) Edit: The original post at that I found the solution https://techoverflow.net/2019/06/20/how-to-fix-unknown-cmake-command-check_symbol_exists/ And CMake documentation does suggest it on the top before it's ran https://cmake.org/cmake/help/latest/module/CheckSymbolExists.html |
you are on linux, jemalloc's cmakelists pulls in CheckSymbolExists for you |
|
Problem: The include(CheckSymbolExists) directive was misplaced. It was sitting after the closing parenthesis ) of the FMT_HEADERS list (line 36), causing CMake to treat it as a stray statement that was never executed before check_symbol_exists was called on lines 18/20. This resulted in CMake not recognizing the command and throwing an error. Fix: Moved include(CheckSymbolExists) to the top of the file, before any call to check_symbol_exists, so the module is properly loaded before it is used. I am using Cmake 4.3.1 in windows and solution fixed the issue for me. |
Unsure if this is the proper fix to this but for me is what worked.