Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911702 - dev-python/contourpy-1.1.0 emerge fails with "error: 'kw_only' is not a member of 'py'"
Summary: dev-python/contourpy-1.1.0 emerge fails with "error: 'kw_only' is not a membe...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-04 08:46 UTC by dave.eckold
Modified: 2023-09-05 17:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge log (dev-python:contourpy-1.1.0:20230804-083646.log,13.83 KB, text/x-log)
2023-08-04 08:48 UTC, dave.eckold
Details
emerge --info (emerge-info.txt,9.06 KB, text/plain)
2023-08-04 08:49 UTC, dave.eckold
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dave.eckold 2023-08-04 08:46:19 UTC
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
Comment 1 dave.eckold 2023-08-04 08:48:48 UTC
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(),
      |                  ^~~~~~~
Comment 2 dave.eckold 2023-08-04 08:49:59 UTC
Created attachment 867005 [details]
emerge --info
Comment 3 dave.eckold 2023-09-05 11:53:03 UTC
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.
Comment 4 Ionen Wolkens gentoo-dev 2023-09-05 12:20:33 UTC
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
Comment 5 dave.eckold 2023-09-05 12:37:40 UTC
Looks like I installed FEniCS c. 4 years ago which added pybind11 to /usr/local/include........