-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Ubuntu] Build [65%] : error: size of array ‘altStackMem’ is not an integral constant-expression #147
Comments
I just build without test -DIO2D_WITHOUT_TESTS=1 |
1 install boost lib |
Same problem here:
I actually got it working suppressing the test like @varomix suggested and then also by manually cloning googletest release 1.11.0 in thirdparty folder as suggested here |
do you find any solution, i am also facing the same problem on Ubuntu 22.04 |
May you share with me where I can add this one into cmake? I tried to run it through the command line argument but cmake complaint that it ignores the manual input parameter. |
System Details:
Steps to reproduce the error
Refresh apt: sudo apt update
Install GCC:
sudo apt install build-essential
Install CMake:
sudo apt install cmake
Install Cairo:
sudo apt install libcairo2-dev
Install graphicsmagick:
sudo apt install libgraphicsmagick1-dev
Install libpng:
sudo apt install libpng-dev
Example of CMake execution:
Detailed Output
$ cmake --build .
Scanning dependencies of target io2d_core
[ 2%] Building CXX object P0267_RefImpl/P0267_RefImpl/CMakeFiles/io2d_core.dir/rgba_color.cpp.o
[ 4%] Building CXX object P0267_RefImpl/P0267_RefImpl/CMakeFiles/io2d_core.dir/xinterchangebuffer.cpp.o
[ 6%] Linking CXX static library libio2d_core.a
[ 6%] Built target io2d_core
Scanning dependencies of target io2d_cairo
[ 9%] Building CXX object P0267_RefImpl/P0267_RefImpl/cairo/CMakeFiles/io2d_cairo.dir/cairo_renderer-graphicsmagickinit.cpp.o
[ 11%] Linking CXX static library libio2d_cairo.a
[ 11%] Built target io2d_cairo
Scanning dependencies of target io2d_cairo_xlib
[ 13%] Building CXX object P0267_RefImpl/P0267_RefImpl/cairo/xlib/CMakeFiles/io2d_cairo_xlib.dir/cairo_renderer_xlib.cpp.o
[ 16%] Linking CXX static library libio2d_cairo_xlib.a
[ 16%] Built target io2d_cairo_xlib
Scanning dependencies of target color_fill
[ 18%] Building CXX object P0267_RefImpl/Samples/color_fill/CMakeFiles/color_fill.dir/main.cpp.o
[ 20%] Linking CXX executable color_fill
[ 20%] Built target color_fill
Scanning dependencies of target cpu_load
[ 23%] Building CXX object P0267_RefImpl/Samples/cpu_load/CMakeFiles/cpu_load.dir/main.cpp.o
[ 25%] Building CXX object P0267_RefImpl/Samples/cpu_load/CMakeFiles/cpu_load.dir/data_source.cpp.o
[ 27%] Building CXX object P0267_RefImpl/Samples/cpu_load/CMakeFiles/cpu_load.dir/profiler_linux.cpp.o
[ 30%] Linking CXX executable cpu_load
[ 30%] Built target cpu_load
Scanning dependencies of target draw_cpp
[ 32%] Building CXX object P0267_RefImpl/Samples/draw_cpp/CMakeFiles/draw_cpp.dir/main.cpp.o
[ 34%] Linking CXX executable draw_cpp
[ 34%] Built target draw_cpp
Scanning dependencies of target life
[ 37%] Building CXX object P0267_RefImpl/Samples/life/CMakeFiles/life.dir/main.cpp.o
[ 39%] Linking CXX executable life
[ 39%] Built target life
Scanning dependencies of target rocks_in_space
[ 41%] Building CXX object P0267_RefImpl/Samples/rocks_in_space/CMakeFiles/rocks_in_space.dir/Asteroid.cpp.o
[ 44%] Building CXX object P0267_RefImpl/Samples/rocks_in_space/CMakeFiles/rocks_in_space.dir/Game.cpp.o
[ 46%] Building CXX object P0267_RefImpl/Samples/rocks_in_space/CMakeFiles/rocks_in_space.dir/Input.cpp.o
[ 48%] Building CXX object P0267_RefImpl/Samples/rocks_in_space/CMakeFiles/rocks_in_space.dir/Maths.cpp.o
[ 51%] Building CXX object P0267_RefImpl/Samples/rocks_in_space/CMakeFiles/rocks_in_space.dir/Physics.cpp.o
[ 53%] Building CXX object P0267_RefImpl/Samples/rocks_in_space/CMakeFiles/rocks_in_space.dir/Ship.cpp.o
[ 55%] Building CXX object P0267_RefImpl/Samples/rocks_in_space/CMakeFiles/rocks_in_space.dir/LinuxMain.cpp.o
[ 58%] Linking CXX executable rocks_in_space
[ 58%] Built target rocks_in_space
Scanning dependencies of target sprites
[ 60%] Building CXX object P0267_RefImpl/Samples/sprites/CMakeFiles/sprites.dir/main.cpp.o
[ 62%] Linking CXX executable sprites
[ 62%] Built target sprites
Scanning dependencies of target tests
[ 65%] Building CXX object P0267_RefImpl/Tests/CMakeFiles/tests.dir/main.cpp.o
In file included from /usr/include/signal.h:328,
from /home/raxit/P0267_RefImpl/P0267_RefImpl/Tests/Catch2/single_include/catch.hpp:4716,
from /home/raxit/P0267_RefImpl/P0267_RefImpl/Tests/main.cpp:15:
/home/raxit/P0267_RefImpl/P0267_RefImpl/Tests/Catch2/single_include/catch.hpp:7320:45: error: size of array ‘altStackMem’ is not an integral constant-expression
7320 | char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
| ^~~~~~~~
gmake[2]: *** [P0267_RefImpl/Tests/CMakeFiles/tests.dir/build.make:82: P0267_RefImpl/Tests/CMakeFiles/tests.dir/main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:619: P0267_RefImpl/Tests/CMakeFiles/tests.dir/all] Error 2
gmake: *** [Makefile:160: all] Error 2
Why this issue?
After studying responses to previous similar issues, I feel like the solutions mentioned there may not be applicable to the newer ubuntu 21.10 LTS. Previous similar issues were typically solved by updating
cmake
orgcc
to the latest version but in the case of latest ubuntu (21.10), such requirements are already fulfilled.The text was updated successfully, but these errors were encountered: