Build failure with glibc 2.34 or higher: SIGSTKSZ is no longer constant
- Dominant language
- C++
- Stars
- 200
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
When building against glibc 2.34, a build failure occurs rooted [here](https://github.com/EOSIO/eos-vm/blob/d42a18152669c1cec69ad43e82af41c276bb4172/include/eosio/vm/execution_context.hpp#L273) due to the fact that SIGSTKSZ is no longer a `constexpr` value [(see glibc changelog)](https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=85e84fe53699fe9e392edffa993612ce08b2954a;hb=HEAD#l12). There is also an error about a type mismatch in the arguments to `max`, but the 'interesting' error is the `constexpr` trouble.
This seems to be a trivial fix, as it appears that nothing depends on `stack_cutoff` being `constexpr`. Simply replace line 273 with:
```c++
std::size_t stack_cutoff = std::max(252144, SIGSTKSZ);
```
Contributor guide
Assessment
This issue has not been assessed yet.