gcc15 and cmake 4.0.1: errors at cross-building cmake

Hi guys,
I’m in upgrade process of gcc from 14.2.0 to 15.1.0 in my distros and have issue with cross-compiling cmake 4.0.1 for my toolchain.

Cross-build erorr is like this: gist:d171eaf91b52dd999a2cf9019342d558 · GitHub

I’m not sure is it: gcc15 bug or cmake 4.0.1 incompability with gcc15?

Can somebody hint me how to move froward with this issue?

upgrade to 4.0.2 not helps :frowning:
Error is still like this: gist:928e4e1fef5e4de68e9dcf17d6d53b8c · GitHub

Are you updating CMake and GCC at the same time? Why not do it sequentially.

The error does not seem to be related to CMake.
According to your error message bool is the same as unsigned char. In C++ they are specified as distinct types. This usually only happens, if some C programmer creates such a define.

Try to compile a C++ file with just this:

#include <string>

If that fails, something with your cross compiler is wrong.

But if that works, you need to find out why if fails. I would compile cmCursesDummyWidget.cxx manually, and iteratively strip everything before the <string> include until you identify which code before causes that message. Everything after the include can be immediately removed, as they don’t cause the problem.

Josef,
Many thx for replay. I managed to get cmake cross-cmpiling.
Issue was too old ncurses in my distro: i had 6.4; upgrade to 6.5_20250503 fixes issue.
I think it is bug in cmake deps checking - as current 4.0.2 allows to build attempt we know build will be failing due too old dependency.

(interesting is that too old ncurses issue was only manifesting for cmake.
other huge components like qt5 (+5k objects to build or chrominium with +24k objects to build - all were cross-building no problem)

sad that i lost 4 days trying to solve this…

My Debian stable has curses v6.4 installed.
CMake compiles (gcc 12) without problems and ccmake works in the terminal.