Warzone2100 / warzone2100

Command the forces of The Project in a battle to rebuild the world after mankind has been nearly destroyed by nuclear missiles. A 100% free and open source real-time strategy game for Windows, macOS, Linux, BSD+

Home Page:https://wz2100.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build failure

maxsupermanhd opened this issue · comments

tag 4.4.2

                  -`                     max@tower0
                 .o+`                    ----------
                `ooo/                    OS: Arch Linux x86_64
               `+oooo:                   Host: MS-7E26 (1.0)
              `+oooooo:                  Kernel: 6.8.9-arch1-2
              -+oooooo+:                 Uptime: 5 hours, 15 mins
            `/:-:++oooo+:                Packages: 2236 (pacman), 56 (flatpak-user)
           `/++++/+++++++:               Shell: bash 5.2.26
          `/++++++++++++++:              Display (SSN-24BZ): 1920x1080 @ 75Hz
         `/+++ooooooooooooo/`            DE: Xfce4 4.18
        ./ooosssso++osssssso+`           WM: Xfwm4 (X11)
       .oossssso-````/ossssss+`          WM Theme: Default
      -osssssso.      :ssssssso.         Theme: Greybird-dark [GTK2/3/4]
     :osssssss/        osssso+++.        Icons: elementary [GTK2/3/4]
    /ossssssss/        +ssssooo/-        Font: Noto Sans Medium (10pt) [GTK2/3/4]
  `/ossssso+/:-        -:/+osssso+-      Cursor: Adwaita
 `+sso+:-`                 `.-/+oso:     Terminal: kitty 0.33.1
`++:.                           `-/+/    Terminal Font: NotoSansMono-Regular (11pt)
.`                                 `/    CPU: AMD Ryzen 9 7900X3D (24) @ 5.66 GHz
                                         GPU: NVIDIA GeForce RTX 4060 [Discrete]
                                         Memory: 5.36 GiB / 31.03 GiB (17%)
                                         Swap: 1.13 GiB / 4.00 GiB (28%)
                                         Disk (/): 836.93 GiB / 931.01 GiB (90%) - btrfs
                                         Disk (/mnt/InsideStore): 266.33 GiB / 439.04 GiB (61%) - ext4
                                         Disk (/mnt/spinstore0): 14.66 GiB / 915.82 GiB (2%) - ext4
                                         Disk (/mnt/spinstore1): 45.73 GiB / 457.38 GiB (10%) - ext4
                                         Local IP (enp12s0): 192.168.0.3/24 *
                                         Locale: en_US.UTF-8

                                         ████████████████████████
                                         ████████████████████████
                                         
[1211/1569] Building CXX object lib/ivis_opengl/CMakeFiles/ivis-opengl.dir/gfx_api_gl.cpp.o
FAILED: lib/ivis_opengl/CMakeFiles/ivis-opengl.dir/gfx_api_gl.cpp.o 
/usr/bin/c++ -DBASISU_HAVE_STD_TRIVIALLY_COPYABLE -DBASIS_ENABLED -DETCPAK_ENABLED -DJSON_USE_IMPLICIT_CONVERSIONS=0 -DNLOHMANN_JSON_NAMESPACE=nlohmann -DNLOHMANN_JSON_NAMESPACE_BEGIN="namespace nlohmann {" -DNLOHMANN_JSON_NAMESPACE_END=} -DWZ_DEBUG_GFX_API_LEAKS -DWZ_FRIBIDI_ENABLED -DWZ_VULKAN_ENABLED -I/home/max/wzbuild/4.4.2 -I/home/max/warzone2100/. -I/home/max/warzone2100/3rdparty -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/fribidi -I/home/max/warzone2100/3rdparty/optional-lite/include -I/home/max/warzone2100/3rdparty/launchinfo/include -I/home/max/warzone2100/3rdparty/glad/include -I/home/max/warzone2100/lib/ivis_opengl/3rdparty/etcpak -I/home/max/warzone2100/3rdparty/basis_universal/transcoder -isystem /home/max/warzone2100/3rdparty/glm -isystem /home/max/warzone2100/3rdparty/date/include -isystem /home/max/warzone2100/3rdparty/json/include -fstack-protector-strong -fstack-clash-protection -O2 -g -DNDEBUG -std=c++14 -fPIC -Wpedantic -Wall -Wextra -fno-common -fno-math-errno -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Winit-self -Woverloaded-virtual -Wstrict-null-sentinel -Wwrite-strings -Wpointer-arith -Wmissing-noreturn -Wnon-virtual-dtor -Wduplicated-cond -Walloc-zero -Walloca-larger-than=1024 -Wrestrict -Wfloat-conversion -Wstringop-truncation -Wlogical-op -Wuninitialized -Werror -Wno-float-conversion -Wno-unused-but-set-variable -Wno-sign-compare -Wno-unused-parameter -Wno-format-truncation -Wno-array-bounds -MD -MT lib/ivis_opengl/CMakeFiles/ivis-opengl.dir/gfx_api_gl.cpp.o -MF lib/ivis_opengl/CMakeFiles/ivis-opengl.dir/gfx_api_gl.cpp.o.d -o lib/ivis_opengl/CMakeFiles/ivis-opengl.dir/gfx_api_gl.cpp.o -c /home/max/warzone2100/lib/ivis_opengl/gfx_api_gl.cpp
In file included from /usr/include/c++/14.1.1/regex:69,
                 from /home/max/warzone2100/lib/ivis_opengl/gfx_api_gl.cpp:34:
In constructor ‘std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_State_info<std::integral_constant<bool, false>, _ResultsVec>::_State_info(std::__detail::_StateIdT, std::size_t) [with _ResultsVec = std::vector<std::__cxx11::sub_match<const char*>, std::allocator<std::__cxx11::sub_match<const char*> > >; _BiIter = const char*; _Alloc = std::allocator<std::__cxx11::sub_match<const char*> >; _TraitsT = std::__cxx11::regex_traits<char>; bool __dfs_mode = false]’,
    inlined from ‘std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_Executor(_BiIter, _BiIter, _ResultsVec&, const _RegexT&, _FlagT) [with _BiIter = const char*; _Alloc = std::allocator<std::__cxx11::sub_match<const char*> >; _TraitsT = std::__cxx11::regex_traits<char>; bool __dfs_mode = false]’ at /usr/include/c++/14.1.1/bits/regex_executor.h:81:2,
    inlined from ‘bool std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_M_lookahead(std::__detail::_StateIdT) [with _BiIter = const char*; _Alloc = std::allocator<std::__cxx11::sub_match<const char*> >; _TraitsT = std::__cxx11::regex_traits<char>; bool __dfs_mode = false]’ at /usr/include/c++/14.1.1/bits/regex_executor.tcc:155:17:
/usr/include/c++/14.1.1/bits/regex_executor.h:244:31: error: argument 1 value is zero [-Werror=alloc-zero]
  244 |           : _M_visited_states(new bool[__n]()), _M_start(__start)
      |                               ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14.1.1/bits/new_allocator.h:34,
                 from /usr/include/c++/14.1.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
                 from /usr/include/c++/14.1.1/bits/allocator.h:46,
                 from /usr/include/c++/14.1.1/string:43,
                 from /home/max/warzone2100/./lib/framework/debug.h:295,
                 from /home/max/warzone2100/./lib/framework/string_ext.h:25,
                 from /home/max/warzone2100/./lib/framework/frame.h:40,
                 from /home/max/warzone2100/lib/ivis_opengl/gfx_api_gl.cpp:20:
/usr/include/c++/14.1.1/new: In member function ‘bool std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_M_lookahead(std::__detail::_StateIdT) [with _BiIter = const char*; _Alloc = std::allocator<std::__cxx11::sub_match<const char*> >; _TraitsT = std::__cxx11::regex_traits<char>; bool __dfs_mode = false]’:
/usr/include/c++/14.1.1/new:133:26: note: in a call to allocation function ‘void* operator new [](std::size_t)’ declared here
  133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
In constructor ‘std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_State_info<std::integral_constant<bool, false>, _ResultsVec>::_State_info(std::__detail::_StateIdT, std::size_t) [with _ResultsVec = std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> > > > >; _BiIter = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> > > >; _TraitsT = std::__cxx11::regex_traits<char>; bool __dfs_mode = false]’,
    inlined from ‘std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_Executor(_BiIter, _BiIter, _ResultsVec&, const _RegexT&, _FlagT) [with _BiIter = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> > > >; _TraitsT = std::__cxx11::regex_traits<char>; bool __dfs_mode = false]’ at /usr/include/c++/14.1.1/bits/regex_executor.h:81:2,
    inlined from ‘bool std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_M_lookahead(std::__detail::_StateIdT) [with _BiIter = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> > > >; _TraitsT = std::__cxx11::regex_traits<char>; bool __dfs_mode = false]’ at /usr/include/c++/14.1.1/bits/regex_executor.tcc:155:17:
/usr/include/c++/14.1.1/bits/regex_executor.h:244:31: error: argument 1 value is zero [-Werror=alloc-zero]
  244 |           : _M_visited_states(new bool[__n]()), _M_start(__start)
      |                               ^~~~~~~~~~~~~~~
/usr/include/c++/14.1.1/new: In member function ‘bool std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_M_lookahead(std::__detail::_StateIdT) [with _BiIter = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> > > >; _TraitsT = std::__cxx11::regex_traits<char>; bool __dfs_mode = false]’:
/usr/include/c++/14.1.1/new:133:26: note: in a call to allocation function ‘void* operator new [](std::size_t)’ declared here
  133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
cc1plus: all warnings being treated as errors
[1212/1569] Building C object 3rdparty/quickjs-wz/CMakeFiles/quickjs.dir/quickjs.c.o
ninja: build stopped: subcommand failed.

GCC 14 bug - fixed in master branch

Solutions:

  1. Apply the fixes in #3765
  2. Or -DWZ_ENABLE_WARNINGS_AS_ERRORS=OFF as part of CMake configure step (probably a good idea if you hit other GCC 14 warnings that have since been fixed)

fist one does not apply because src/urlrequest_curl.cpp does not exist

and second one does not fix the issue (same error)

fist one does not apply because src/urlrequest_curl.cpp does not exist

Yeah, I didn’t expect it would apply cleanly - you’ll have to apply the fixes manually (the one for urlrequest_curl.cpp presumably applies to urlrequest.cpp in 4.4.2 - it’s the same fix for any source file that triggers the GCC 14 warning)