Jump to content
  • error: expected ‘)’ before ‘SIZEFMTD’


    jwh1981
    • Main Category: Core / Mangos Daemon
      Sub-Category: Unknown
      Version: 22.x (Current Master Branch)

    I am on https://github.com/mangoszero/server/commit/668c89ff2cc5fa09e4c78cdb477b0d4e189861f8 and I receive this when trying to compile: /home/jhendricks/zero-source/server/src/modules/SD3/base/escort_ai.cpp: In member function ‘void npc_escortAI::Start(bool, const Player*, const Quest*, bool, bool)’:
    /home/jhendricks/zero-source/server/src/modules/SD3/base/escort_ai.cpp:635:44: error: expected ‘)’ before ‘SIZEFMTD’
      635 |     debug_log("SD3: EscortAI started with " SIZEFMTD " waypoints. Run = %d, PlayerGuid = %s", WaypointList.size(), m_bIsRunning, m_playerGuid.GetString().c_str());

    Commenting out this line allows the compilation to finish correctly: debug_log("SD3: EscortAI started with " SIZEFMTD " waypoints. Run = %d, PlayerGuid = %s", WaypointList.size(), m_bIsRunning, m_playerGuid.GetString().c_str());


    User Feedback

    Recommended Comments

    jwh1981

    Posted

    Sorry I completely forgot to mention I am on Debian 12 with GCC 12.2.0

    Fyre

    Posted

    Tested on Windows a moment ago - no issue building.

    Will try to have someone test on Linux.

    Pysis

    Posted (edited)

    Having install log files or described procedures always helps more, but I believe jwh's SD3 is not current, and could probably benefit from a `git submodule update` or `pushd server/src/modules/SD3; git pull origin master; popd`.

    This commit published near before the date of this post will likely help once being included by that update:

    ⋊> .../server on master ⨯ pushd src/modules/SD3; git log -1 --format=reference (read); popd;
    read> 61e0b547c827cca9c09714d3580259f991f36fbd
    61e0b54 (Replaced SIZEFMTD macro with "%zu" format parameter, 2024-06-04)

    This commit in Zero's Server repository helped incorporate that SD3 commit:

    ⋊> /server on master ⨯ git log -1 --format=reference (read);
    read> 5ab90165fb888d3ee020006d81823247038925a7
    5ab90165 ([SD3] Updated SD3, 2024-06-04)

    My working environment

    ⋊> neofetch --stdout distro
    distro: Fedora release 40 (Forty) x86_64

    ⋊> gcc --version
    gcc (GCC) 14.1.1 20240701 (Red Hat 14.1.1-7)
    Copyright (C) 2024 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    ⋊> cmake --version
    cmake version 3.28.2

    CMake suite maintained and supported by Kitware (kitware.com/cmake).

    ⋊> pushd server; git log -1 --format=reference; popd;
    668c89ff (Update core_windows_build.yml, 2024-06-05)

    ⋊> pushd server/src/modules/SD3; git log -1 --format=reference; popd;
    519bbc3 (Merge branch 'master' into patch-1, 2024-06-04)

     

    The non-working environment that I have reproduced locally, that may match the poster's

    ⋊> on master ⨯ git log -1 --format=reference
    668c89ff (Update core_windows_build.yml, 2024-06-05)

    ⋊> on master ⨯ pushd src/modules/SD3; git log -1 --format=reference; popd;
    6ee2d21 (Update SD3 to use C++17, 2024-03-10)

    ⋊> .../server on master ⨯ sudo env                      \
                                          USE_FZF='true'            \
                                          SKIP_USER='true'          \
                                          KEEP_USER='true'          \
                                          SKIP_PATHS='true'         \
                                          SKIP_UNINSTALL='true'     \
                                          AUTO_DEFAULT_OPTIONS='true' \
                                          DB_COMMAND="mariadb -u$dbUser -p$dbPP" \
                                          SERVER_USER=(id -un)      \
                                          linux/getmangos.sh \
                                          ;
    Cleaning the old build...

    This script builds the MaNGOS server.
      Options that can be used in order to configure the process:
       General:
        CMAKE_INSTALL_PREFIX    Path where the server should be installed to
        BUILD_MANGOSD           Build the main server
        BUILD_REALMD            Build the login server
        BUILD_TOOLS             Build the map/vmap/mmap extractors
        USE_STORMLIB            Use StormLib for reading MPQs
        SOAP                    Enable remote access via SOAP
        PCH                     Enable use of precompiled headers
        DEBUG                   Debug build, only for systems without IDE (Linux, *BSD)
       Scripting engines:
        SCRIPT_LIB_ELUNA        Compile with support for Eluna scripts
        SCRIPT_LIB_SD3          Compile with support for ScriptDev3 scripts
       Modules:
        PLAYERBOTS              Enable Player Bots

      To set an option simply type -D<OPTION>=<VALUE> after 'cmake <srcs>'.
      Also, you can specify the generator with -G. See 'cmake --help' for more details
      For example: cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mangos -DSCRIPT_LIB_SD3=0

    -- Lua version: lua52
    -- Lua linking: dynamic
    ===================================================
    Mangos revision       : 668c89ff2cc5+ 2024-06-05 15:05:43 +0100 (master branch)
    Build type            : Release
    Install server(s) to  : .../server_install/bin
    Install configs to    : .../server_install/etc

    Detailed Information
    +-- opeating system   : Linux-6.9.9-200.fc40.x86_64
    +-- cmake version     : 3.28.2

    Build main server     : Yes (default)
    +-- with Eluna script engine
    +-- with SD3 script engine
    Build login server    : Yes (default)
    Support for SOAP      : No (default)
    Build tools           : No

    ===================================================
    -- Configuring done (0.3s)
    -- Generating done (0.2s)
    -- Build files have been written to: .../server_build

    ......
    [ 54%] Linking CXX static library libshared.a
    [ 54%] Built target shared
    [ 54%] Built target revision_data.h
    [ 55%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/cmake_pch.hxx.gch
    [ 55%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/pch.cpp.o
    [ 55%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/include/precompiled.cpp.o
    [ 55%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/include/sc_creature.cpp.o
    [ 55%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/include/sc_grid_searchers.cpp.o
    [ 55%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/include/sc_instance.cpp.o
    [ 55%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/system/ScriptDevMgr.cpp.o
    [ 55%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/system/ScriptLoader.cpp.o
    [ 56%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/system/system.cpp.o
    [ 56%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/base/escort_ai.cpp.o
    .../server/src/modules/SD3/base/escort_ai.cpp: In member function ‘void npc_escortAI::Start(bool, const Player*, const Quest*, bool, bool)’:
    .../server/src/modules/SD3/base/escort_ai.cpp:635:44: error: expected ‘)’ before ‘SIZEFMTD’
      635 |     debug_log("SD3: EscortAI started with " SIZEFMTD " waypoints. Run = %d, PlayerGuid = %s", WaypointList.size(), m_bIsRunning, m_playerGuid.GetString().c_str());
          |              ~                             ^~~~~~~~~
          |                                            )
    make[2]: *** [src/modules/SD3/CMakeFiles/mangosscript.dir/build.make:221: src/modules/SD3/CMakeFiles/mangosscript.dir/base/escort_ai.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:698: src/modules/SD3/CMakeFiles/mangosscript.dir/all] Error 2
    make: *** [Makefile:136: all] Error 2

    ================================================================================
    The selected tasks have been completed. If you built or installed Mangos, please
    edit your configuration files to use the database you configured for your MaNGOS
    server. If you have not configured your databases yet, please do so before
    starting your server for the first time.
    ================================================================================

     

    Edited by Pysis


    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use