Skip to content
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

[Bug] blspy fails to build due to MINSIGSTKSZ no longer being a compile-time constant #290

Closed
llowrey opened this issue Nov 7, 2021 · 12 comments
Assignees

Comments

@llowrey
Copy link

llowrey commented Nov 7, 2021

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

@hoffmang9
Copy link
Member

You should just install the bls wheel - pip install blspy as it should work fine with that old version of the c library.

@llowrey
Copy link
Author

llowrey commented Nov 8, 2021

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.

@emlowe
Copy link
Contributor

emlowe commented Nov 10, 2021

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.

@emlowe emlowe transferred this issue from Chia-Network/chia-blockchain Nov 10, 2021
@llowrey
Copy link
Author

llowrey commented Nov 13, 2021

I submitted a PR to fix this: #291

@AmineKhaldi
Copy link
Contributor

@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!

@llowrey
Copy link
Author

llowrey commented Nov 13, 2021

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.

@AmineKhaldi
Copy link
Contributor

AmineKhaldi commented Nov 13, 2021

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.

@github-actions
Copy link

'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.'

@lklimek
Copy link

lklimek commented Nov 29, 2021

This can be also reproduced when building bls-signatures main branch on Ubuntu 21.10 impish (most recent one).

@AmineKhaldi AmineKhaldi self-assigned this Nov 29, 2021
@AmineKhaldi
Copy link
Contributor

@lklimek Could you please try PR #298 as that should address what you're seeing now?

@lklimek
Copy link

lklimek commented Dec 8, 2021

Ubuntu 21.10 builds correctly on the most recent main (1.0.8, commit 6385ba2). Thank you @AmineKhaldi

@emlowe
Copy link
Contributor

emlowe commented Feb 2, 2023

Closing

@emlowe emlowe closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants