openPMD / openPMD/openPMD-api

New static assert from pybind11--3.0.2 prevents compilation

Open
#1,850 2 comments 0 reactions 0 assignees View on GitHub
affects latest release bug frontend: Python3
Dominant language
C++
Stars
161
Forks
59
Avg merge
2d 22h
Merged PRs (30d)
7

Description

The recently released pybind11--3.0.2 includes https://github.com/pybind/pybind11/pull/5533, which added a static assert that is triggered when trying to install openPMD-api.

First seen with the MacOS HiPACE++ CI, which gets the newses pybind-11 version from Homebrew
https://github.com/Hi-PACE/hipace/actions/runs/22096489445/job/63854810924?pr=1360
```
==> Pouring pybind11--3.0.2.all.bottle.tar.gz
🍺  /opt/homebrew/Cellar/pybind11/3.0.2: 95 files, 1.2MB
==> Installing openpmd/openpmd/openpmd-api dependency: toml11
==> Pouring toml11--4.4.0.all.bottle.tar.gz
🍺  /opt/homebrew/Cellar/toml11/4.4.0: 66 files, 641.2KB
Warning: `$HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK` is set: not checking for outdated
dependents or dependents with broken linkage!

==> Fetching downloads for: openpmd-api
✔︎ Formula openpmd-api (0.17.0)
==> Installing openpmd-api from openpmd/openpmd
==> cmake .. -DopenPMD_USE_MPI=ON -DopenPMD_USE_HDF5=ON -DopenPMD_USE_ADIOS2=ON 
==> make install
Last 15 lines from /Users/runner/Library/Logs/Homebrew/openpmd-api/02.make.log:
      |                ^
/opt/homebrew/include/pybind11/pybind11.h:2347:9: note: in instantiation of function template specialization 'pybind11::class_::def_property>' requested here
 2347 |         def_property(name,
      |         ^
/private/tmp/openpmd-api-20260217-11842-yfti2e/openPMD-api-0.17.0/src/binding/python/Iteration.cpp:97:10: note: in instantiation of function template specialization 'pybind11::class_::def_readwrite, pybind11::return_value_policy, pybind11::keep_alive<1, 0>>' requested here
   97 |         .def_readwrite(
      |          ^
/opt/homebrew/include/pybind11/pybind11.h:2462:25: note: expression evaluates to '0 == 1'
 2462 |         static_assert(0 == detail::constexpr_sum(detail::is_keep_alive::value...),
      |                       ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/openPMD.py.dir/src/binding/python/Iteration.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/openPMD.py.dir/all] Error 2
make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/* repositories):
  https://github.com/openpmd/homebrew-openpmd/issues

Error: Process completed with exit code 1.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.