Error compiling on Linux with GCC 11
caillotantoine opened this issue · 1 comments
caillotantoine commented
When I tried to compile on Ubuntu 22.04, I received the error:
error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
1301 | StackLowerThanAddress(&dummy, &result);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
caillotantoine commented
Ubuntu 22.04 is shipped with GCC 11. It will work with GCC 10.
sudo apt install gcc-10 g++-10
Then, instead of cmake ..
, run cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 ..
Afterward, the remainder of the procedure should work:
make
sudo make install