longturn / freeciv21

Develop your civilization from humble roots to a global empire
GNU General Public License v3.0
214 stars 39 forks source link

WebAssemply target fails compile #2306

Open jwrober opened 1 week ago

jwrober commented 1 week ago

Describe the bug The WebAssemply target won't compile during weekly builds

In file included from /home/runner/work/freeciv21/freeciv21/common/scriptcore/api_common_intl.cpp:17:
In file included from /home/runner/work/freeciv21/freeciv21/common/scriptcore/api_common_intl.h:13:
/home/runner/work/freeciv21/freeciv21/dependencies/sol2/sol/sol.hpp:6755:10: error: no member named 'construct' in 'optional<type-parameter-0-0 &>'
 6755 |                         this->construct(std::forward<Args>(args)...);
      |                         ~~~~  ^
/home/runner/work/freeciv21/freeciv21/dependencies/sol2/sol/sol.hpp:14541:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
 14541 | #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
       |                                ^
/home/runner/work/freeciv21/freeciv21/dependencies/sol2/sol/sol.hpp:17294:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
 17294 | #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
       |                                ^
2 warnings and 1 error generated.
make[2]: *** [common/scriptcore/CMakeFiles/scriptcore.dir/build.make:107: common/scriptcore/CMakeFiles/scriptcore.dir/api_common_intl.cpp.o] Error 1
make[2]: Leaving directory '/home/runner/work/freeciv21/freeciv21'
make[1]: *** [CMakeFiles/Makefile2:4757: common/scriptcore/CMakeFiles/scriptcore.dir/all] Error 2
make[1]: Leaving directory '/home/runner/work/freeciv21/freeciv21'
make: *** [Makefile:156: all] Error 2
emmake: error: 'make' failed (returned 2)
Error: Process completed with exit code 1.

Suggestion is to update Sol and the version of Emscripten we are using.

jwrober commented 1 week ago

We are using the current version of Sol2