Atrik Posted 23 hours ago Report Share Posted 23 hours ago (edited) I'm not able to compile a28 or main, the compilation fail with this error: ../../../source/scriptinterface/ModuleLoader.h:86:15: required from here /usr/include/c++/11/bits/stl_pair.h:218:11: error: ‘std::pair<_T1, _T2>::second’ has incomplete type 218 | _T2 second; ///< The second member | ^~~~~~ In file included from ../../../source/dapinterface/DapInterface.cpp:30: ../../../source/scriptinterface/ModuleLoader.h:50:15: note: forward declaration of ‘class Script::ModuleLoader::CompiledModule’ 50 | class CompiledModule; | ^~~~~~~~~~~~~~ make[1]: *** [atlas.make:233: obj/atlas_Release/MiscHandlers.o] Error 1 make[1]: *** Waiting for unfinished jobs.... JSInterface_GameView.cpp JSInterface_Renderer.cpp make[1]: *** [engine.make:390: obj/engine_Release/CConsole.o] Error 1 make: *** [Makefile:122: engine] Error 2 AtlasObjectJS.cpp make[1]: *** [graphics.make:417: obj/graphics_Release/FontManager.o] Error 1 make[1]: *** Waiting for unfinished jobs.... CCmpMotionBall.cpp make[1]: *** [simulation2.make:371: obj/simulation2_Release/CCmpAIManager.o] Error 1 make[1]: *** Waiting for unfinished jobs.... AtlasObjectText.cpp CommonConvert.cpp make[1]: *** [dapinterface.make:142: obj/dapinterface_Release/DapInterface.o] Error 1 make: *** [Makefile:92: dapinterface] Error 2 Some time ago I already had this error when compiling main, and though it was because of some WIP, but now I'm guessing the problem is on my end since it's still here. What am I doing wrong? Debian build Thanks Edited 23 hours ago by Atrik 1 Quote Link to comment Share on other sites More sharing options...
phosit Posted 16 hours ago Report Share Posted 16 hours ago I don't think that the problem is on your side. But it's weird that nobody encountered this error. Which compiler do you use? Quote Link to comment Share on other sites More sharing options...
phosit Posted 15 hours ago Report Share Posted 15 hours ago Could you test this: https://gitea.wildfiregames.com/0ad/0ad/pulls/8528 1 Quote Link to comment Share on other sites More sharing options...
Vantha Posted 12 hours ago Report Share Posted 12 hours ago I got an error like this a while ago too and the cause was that the compiler version was too old. 1 Quote Link to comment Share on other sites More sharing options...
Atrik Posted 2 hours ago Author Report Share Posted 2 hours ago 12 hours ago, phosit said: Could you test this: https://gitea.wildfiregames.com/0ad/0ad/pulls/8528 That do fix the error, but compilation fails later with another forward declaration and a bunch of new errors too. I have clang 18.1.8, rusc 1.91.0 Spoiler error: ‘constexpr void fmt::v8::basic_format_parse_context<Char, ErrorHandler>::on_error(const char*) [with Char = char; ErrorHandler = fmt::v8::detail::error_handler]’ called in a constant expression 2201 | context_.on_error(message); | ~~~~~~~~~~~~~~~~~^~~~~~~~~ /usr/include/fmt/core.h:692:22: note: ‘constexpr void fmt::v8::basic_format_parse_context<Char, ErrorHandler>::on_error(const char*) [with Char = char; ErrorHandler = fmt::v8::detail::error_handler]’ is not usable as a ‘constexpr’ function because: 692 | FMT_CONSTEXPR void on_error(const char* message) { | ^~~~~~~~ /usr/include/fmt/core.h:693:27: error: call to non-‘constexpr’ function ‘void fmt::v8::detail::error_handler::on_error(const char*)’ 693 | ErrorHandler::on_error(message); | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ /usr/include/fmt/core.h:618:29: note: ‘void fmt::v8::detail::error_handler::on_error(const char*)’ declared here 618 | FMT_NORETURN FMT_API void on_error(const char* message); | ^~~~~~~~ ../../../source/graphics/MapGenerator.cpp:401:110: error: no matching function for call to ‘std::runtime_error::runtime_error(<brace-enclosed initializer list>)’ 401 | throw std::runtime_error{fmt::format("Loading module {:?} takes too long.", script.string8())}; | [...] /usr/include/fmt/core.h:2201:22: error: ‘constexpr void fmt::v8::basic_format_parse_context<Char, ErrorHandler>::on_error(const char*) [with Char = char; ErrorHandler = fmt::v8::detail::error_handler]’ called in a constant expression 2201 | context_.on_error(message); | ~~~~~~~~~~~~~~~~~^~~~~~~~~ ../../../source/graphics/MapGenerator.cpp:418:48: error: no matching function for call to ‘std::runtime_error::runtime_error(<brace-enclosed initializer list>)’ 418 | GENERATOR_NAME)}; | ^ In file included from /usr/include/c++/11/system_error:41, from /usr/include/c++/11/bits/std_mutex.h:39, from /usr/include/c++/11/bits/atomic_wait.h:49, from /usr/include/c++/11/bits/atomic_base.h:41, from /usr/include/c++/11/atomic:41, from ../../../source/lib/debug.h:45, from ../../../source/lib/precompiled.h:70, from ../../../source/pch/graphics/precompiled.h:18: /usr/include/c++/11/stdexcept:237:5: note: candidate: ‘std::runtime_error::runtime_error(const std::runtime_error&)’ 237 | runtime_error(const runtime_error&) _GLIBCXX_NOTHROW; | ^~~~~~~~~~~~~ Quote Link to comment Share on other sites More sharing options...
hyperion Posted 2 hours ago Report Share Posted 2 hours ago 11 minutes ago, Atrik said: I have clang 18.1.8, rusc 1.91.0 I think you are using gcc instead, if you want to use clang you have to set CXX environment variable or pass --cc=clang to update-workspace.sh, also your gcc version is likely older then gcc-12. 1 Quote Link to comment Share on other sites More sharing options...
Atrik Posted 1 hour ago Author Report Share Posted 1 hour ago (edited) 1 hour ago, hyperion said: if you want to use clang you have to set CXX environment variable or pass --cc=clang to update-workspace.sh, also your gcc version is likely older then gcc-12. Thanks, so what I've tried now is : ./update-workspaces.sh --cc=gcc-12 cd gcc make And ./update-workspaces.sh --cc=clang-18 cd gcc #Can't see any other folders make If i pass a compiler version i don't have to update-workspaces.sh, it tell me so. Therefor I'm guessing i do have to compiler I'm passing above. Yet compilation fails in both cases. With gcc /usr/include/fmt/core.h:2201:22: error: ‘constexpr void fmt::v8::basic_format_parse_context<Char, ErrorHandler>::on_error(const char*) [with Char = char; ErrorHandler = fmt::v8::detail::error_handler]’ called in a constant expression 2201 | context_.on_error(message); With clang In file included from ../../../source/ps/GameSetup/GameSetup.cpp:84: ../../../source/scriptinterface/FunctionWrapper.h:518:6: error: call to consteval function 'fmt::basic_format_string<char, std::basic_string<char> &>::basic_format_string<char[51], 0>' is not a constant expression 518 | "Failed defining function {:?} on the native scope.", classInfo->name)}; | ^ Edited 1 hour ago by Atrik Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.