contourpy fails to compile with an 4 identical errors (different lines) in wrap.cpp "error: 'kw_only' is not a member of 'py'" Reproducible: Always Steps to Reproduce: emerge -u1 dev-python/contourpy Actual Results: emerge fails Expected Results: package should install
Created attachment 867004 [details] emerge log Error occurs line 81 ../contourpy-1.1.0/src/wrap.cpp:196:18: error: ‘kw_only’ is not a member of ‘py’ 196 | py::kw_only(), | ^~~~~~~ ../contourpy-1.1.0/src/wrap.cpp:250:18: error: ‘kw_only’ is not a member of ‘py’ 250 | py::kw_only(), | ^~~~~~~ ../contourpy-1.1.0/src/wrap.cpp:310:18: error: ‘kw_only’ is not a member of ‘py’ 310 | py::kw_only(), | ^~~~~~~ ../contourpy-1.1.0/src/wrap.cpp:377:18: error: ‘kw_only’ is not a member of ‘py’ 377 | py::kw_only(), | ^~~~~~~
Created attachment 867005 [details] emerge --info
I created a test program to see if the issue is with pybind11. The following program will fail to compile with the same error: > #include <pybind11/pybind11.h> > > namespace py = pybind11; > > int add(int i, int j) { > return i + j; > } > > PYBIND11_MODULE(test_pybind, m) { > m.def("add", &add, "A function that adds.", > py::arg("i"), py::kw_only(), py::arg("j")); > } However, if I specify the compiler to include the site-package version of pybind11 using "-I/usr/lib/python3.11/site-packages/pybind11/include" it will compile. Even though the pybind11 in /usr/include and the site-package location are identical. So this bug is probably not with contourpy, but somewhere further up.
You don't happen to have pybind11 includes somewhere else, right? Like in /usr/local/include that would likely take priority unless specify a -I
Looks like I installed FEniCS c. 4 years ago which added pybind11 to /usr/local/include........