bls-signatures
bls-signatures copied to clipboard
[Bug] blspy fails to build due to MINSIGSTKSZ no longer being a compile-time constant
What happened?
I cloned chia-blockchain and attempted to build per standard procedure, which I have done successfully many times before. My one Fedora 35 host is not able to build successfully due to MINSIGSTKSZ no longer being a compile-time constant. Search results indicate that this is due to the version of glibc included with Fedora 35.
OS: Fedora 35 glibc: 2.34
from /tmp/pip-install-_7kaglg9/blspy_df253f728ad84f1d9b0290f4d0ec90ab/src/../contrib/catch/catch.hpp:8034,
from /tmp/pip-install-_7kaglg9/blspy_df253f728ad84f1d9b0290f4d0ec90ab/src/test.cpp:20:
/tmp/pip-install-_7kaglg9/blspy_df253f728ad84f1d9b0290f4d0ec90ab/src/../contrib/catch/catch.hpp:10822:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10822 | static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
| ^~~~~~~~~~~
In file included from /usr/include/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /tmp/pip-install-_7kaglg9/blspy_df253f728ad84f1d9b0290f4d0ec90ab/src/../contrib/catch/catch.hpp:8034,
from /tmp/pip-install-_7kaglg9/blspy_df253f728ad84f1d9b0290f4d0ec90ab/src/test.cpp:20:
/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 /tmp/pip-install-_7kaglg9/blspy_df253f728ad84f1d9b0290f4d0ec90ab/src/test.cpp:20:
/tmp/pip-install-_7kaglg9/blspy_df253f728ad84f1d9b0290f4d0ec90ab/src/../contrib/catch/catch.hpp:10881:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10881 | char FatalConditionHandler::altStackMem[sigStackSize] = {};
| ^~~~~~~~~~~~
Version
1.2.11
What platform are you using?
Linux
What ui mode are you using?
CLI
Relevant log output
No response
You should just install the bls wheel - pip install blspy
as it should work fine with that old version of the c library.
You should just install the bls wheel -
pip install blspy
as it should work fine with that old version of the c library.
pip
tries to build blspy
and can't because of the glibc 2.34 issue.
Looks like glib 2.34 broke all backwards compatibility with this change (that was nice of them). We would welcome any PRs to fix this. Moving issue over to bls-signatures repo.
I submitted a PR to fix this: #291
@llowrey thank you for sending a PR!
We actually came to that realization but thought to use this as a chance to properly leverage the Catch2 library into our build system, to not just fix the immediate issue but also be able to easily maintain it and seamlessly update it in the future.
The changes for that are being tested under different environments just to make sure nothing regresses, so stay tuned!
Thanks for the update. I'll be looking for that new release but in the mean time is there a way I can get chia-blockchain to build with this new catch.hpp?
I'm not familiar with your build process and am not sure how to plug in my local bls-signatures build.
Thanks to @altendky who created a wheels package for you and provided instructions on what you can try, here goes:
- Grab the wheels from here and install the appropriate wheel for your environment using something like
venv/bin/pip install ./x.whl
- Comment out this line as you'll be installing blspy manually from the above step.
I hope that helps, please let us know if you need anything.
'This issue has been flagged as stale as there has been no activity on it in 14 days. If this issue is still affecting you and in need of review, please update it to keep it open.'
This can be also reproduced when building bls-signatures main
branch on Ubuntu 21.10 impish
(most recent one).
@lklimek Could you please try PR #298 as that should address what you're seeing now?
Ubuntu 21.10 builds correctly on the most recent main
(1.0.8, commit 6385ba2a040ba011702cf1fa6e7785847abcf7a9). Thank you @AmineKhaldi
Closing