You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once I build ROBIN on Ubuntu 22.04, the below error occurs:
In file included from /usr/include/signal.h:328,
from /home/ROBIN/tests/catch.hpp:8042,
from /home/ROBIN/tests/main.cc:9:
/home/ROBIN/tests/catch.hpp:10830:58: error: call to non-'constexpr' function 'long int sysconf(int)'
10830 | static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
| ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /home/ROBIN/tests/catch.hpp:8042,
from /home/ROBIN/tests/main.cc:9:
/usr/include/unistd.h:640:17: note: 'long int sysconf(int)' declared here
640 | extern long int sysconf (int __name) __THROW;
| ^~~~~~~
In file included from /home/ROBIN/tests/main.cc:9:
/home/ROBIN/tests/catch.hpp:10889:45: error: size of array 'altStackMem' is not an integral constant-expression
10889 | char FatalConditionHandler::altStackMem[sigStackSize] = {};
| ^~~~~~~~~~~~
In file included from /home/ROBIN/tests/test_utils.hpp:15,
from /home/ROBIN/tests/core_test.cpp:8:
/home/ROBIN/include/robin/core.hpp: In member function 'robin::IGraph* robin::CompGraphConstructor<Measurements, CompCheckFunc, 2>::BuildCompGraph(robin::GraphsStorageType) [with Measurements = ____C_A_T_C_H____T_E_S_T____9()::H; CompCheckFunc = ____C_A_T_C_H____T_E_S_T____9()::Vec2dComp]':
/home/ROBIN/include/robin/core.hpp:504:3: warning: control reaches end of non-void function [-Wreturn-type]
504 | }
like this:
How to resolve
According to this solution, when I add the following two lines:
#undef MINSIGSTKSZ
#define MINSIGSTKSZ 16384
like this:
// at line 10821 of `tests/catch.hpp`
#undef MINSIGSTKSZ
#define MINSIGSTKSZ 16384
namespace Catch {
struct SignalDefs {
int id;
const char* name;
};
// 32kb for the alternate stack seems to be sufficient. However, this value
// is experimentally determined, so that's not guaranteed.
static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
it can be resolved.
Point to discuss
I heard that the value might differ depending on the OS. What would be the best way to handle this?
The text was updated successfully, but these errors were encountered:
Error
Once I build ROBIN on Ubuntu 22.04, the below error occurs:
like this:
How to resolve
According to this solution, when I add the following two lines:
like this:
it can be resolved.
Point to discuss
I heard that the value might differ depending on the OS. What would be the best way to handle this?
The text was updated successfully, but these errors were encountered: