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

undefined symbol when importing blspy #286

Closed
bbjubjub2494 opened this issue Nov 2, 2021 · 0 comments
Closed

undefined symbol when importing blspy #286

bbjubjub2494 opened this issue Nov 2, 2021 · 0 comments

Comments

@bbjubjub2494
Copy link
Contributor

When using pybind11 2.8+, everything compiles but an ImportError is raised at runtime with the message:

File "/nix/store/p3c7js1a70c3v28vhbcnq1fvffmxwx6f-python3-3.9.7/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 565, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1173, in create_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
ImportError: /nix/store/drrypsf90628kpkghkz8aj4vav07jw7j-python3.9-blspy-1.0.6/lib/python3.9/site-packages/blspy.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN3bls9GTElement4SIZEE

To my understanding, this is because constant static members such as GTElement::SIZE sometimes require a definition to be provided explicitly in a single translation unit under C++11 (but not C++17, then they are optional) The issue is alleviated by adding those definitions.

This was encountered on NixOS after force-updating pybind11, but seems like a latent bug so it might be good to nip it in the bud now.

NixOS/nixpkgs#144209

bbjubjub2494 added a commit to bbjubjub2494/bls-signatures that referenced this issue Nov 2, 2021
bbjubjub2494 added a commit to bbjubjub2494/bls-signatures that referenced this issue Nov 2, 2021
UdjinM6 pushed a commit to UdjinM6/bls-signatures that referenced this issue Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant