Error building cmake 3.30.5 on debian 12 bookworm

I had to get a newer version of cmake for building another app and when i ran gmake this showed up. help please

desktop@desktop:~/Desktop/cmake-3.30.5$ gmake
[  2%] Built target cmsys
[  2%] Built target cmsys_c
[  2%] Built target cmsysTestsC
[  2%] Built target testConsoleBufChild
[  2%] Built target cmsysTestDynload
[  4%] Built target cmsysTestsCxx
[  4%] Built target cmsysTestProcess
[  4%] Built target cmstd
[  5%] Built target kwiml_test
[  6%] Built target cmlibrhash
[  7%] Built target cmzlib
[  9%] Built target cmnghttp2
[ 24%] Built target cmcurl
[ 24%] Built target curltest
[ 24%] Built target cmexpat
[ 25%] Built target cmbzip2
[ 28%] Built target cmzstd
[ 34%] Built target cmliblzma
[ 45%] Built target cmlibarchive
[ 45%] Built target cmjsoncpp
[ 48%] Built target cmlibuv
[ 51%] Built target cmForm
[ 51%] Building CXX object Utilities/cmcppdap/CMakeFiles/cmcppdap.dir/src/protocol_events.cpp.o
[ 51%] Building CXX object Utilities/cmcppdap/CMakeFiles/cmcppdap.dir/src/protocol_requests.cpp.o
In file included from /usr/include/c++/12/functional:59,
                 from /home/desktop/Desktop/cmake-3.30.5/Utilities/cmcppdap/include/dap/typeinfo.h:18,
                 from /home/desktop/Desktop/cmake-3.30.5/Utilities/cmcppdap/include/dap/protocol.h:24,
                 from /home/desktop/Desktop/cmake-3.30.5/Utilities/cmcppdap/src/protocol_requests.cpp:20:
/usr/include/c++/12/bits/std_function.h: In static member function ‘static bool std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_manager(std::_Any_data&, const std::_Any_data&, std::_Manager_operation) [with _Res = bool; _Functor = dap::TypeOf<dap::RestartFrameRequest>::serializeFields(dap::FieldSerializer*, const void*)::<lambda(dap::Serializer*)>; _ArgTypes = {dap::Serializer*}]’:
/usr/include/c++/12/bits/std_function.h:285:7: internal compiler error: Segmentation fault
  285 |       }
      |       ^
0x1afaeb6 internal_error(char const*, ...)
	???:0
0x907483 ggc_set_mark(void const*)
	???:0
0x85c1c7 gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85d030 gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85c38d gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85c6dd gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85dd09 gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85d4ba gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85e273 gt_ggc_mx_lang_type(void*)
	???:0
0x85d09b gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85cb5e gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85c6eb gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85dd09 gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85d4ba gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85e273 gt_ggc_mx_lang_type(void*)
	???:0
0x85d09b gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85cb5e gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85c6eb gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85dd09 gt_ggc_mx_lang_tree_node(void*)
	???:0
0x85d08a gt_ggc_mx_lang_tree_node(void*)
	???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
gmake[2]: *** [Utilities/cmcppdap/CMakeFiles/cmcppdap.dir/build.make:160: Utilities/cmcppdap/CMakeFiles/cmcppdap.dir/src/protocol_requests.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:2160: Utilities/cmcppdap/CMakeFiles/cmcppdap.dir/all] Error 2
gmake: *** [Makefile:166: all] Error 2

Can you say if the computer is:

  • Arm / Intel / other cpu
  • 32 / 64 bit cpu

This is an internal compiler error that may be unrelated to CMake. It’s occuring in the cppdap library that is used by CMake.
If you have a different compiler available, either a different version of GCC, or Clang, that might work.