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

error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'} #32

Open
barracuda156 opened this issue Dec 29, 2022 · 2 comments

Comments

@barracuda156
Copy link

Python bindings fail on macOS with gcc12:

:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_libpetanque/libpetanque/work/arybo-1.1.0/petanque/third-party/pybind11/cast.h: In function 'std::string pybind11::detail::error_string()':
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_libpetanque/libpetanque/work/arybo-1.1.0/petanque/third-party/pybind11/cast.h:442:36: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
:info:build   442 |                 "  " + handle(frame->f_code->co_filename).cast<std::string>() +
:info:build       |                                    ^~
:info:build In file included from /opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/Python.h:42:
:info:build /opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
:info:build    22 | typedef struct _frame PyFrameObject;
:info:build       |                ^~~~~~
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_libpetanque/libpetanque/work/arybo-1.1.0/petanque/third-party/pybind11/cast.h:442:75: error: expected primary-expression before '>' token
:info:build   442 |                 "  " + handle(frame->f_code->co_filename).cast<std::string>() +
:info:build       |                                                                           ^
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_libpetanque/libpetanque/work/arybo-1.1.0/petanque/third-party/pybind11/cast.h:442:77: error: expected primary-expression before ')' token
:info:build   442 |                 "  " + handle(frame->f_code->co_filename).cast<std::string>() +
:info:build       |                                                                             ^
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_libpetanque/libpetanque/work/arybo-1.1.0/petanque/third-party/pybind11/cast.h:444:29: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
:info:build   444 |                 handle(frame->f_code->co_name).cast<std::string>() + "\n";
:info:build       |                             ^~
:info:build /opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
:info:build    22 | typedef struct _frame PyFrameObject;
:info:build       |                ^~~~~~
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_libpetanque/libpetanque/work/arybo-1.1.0/petanque/third-party/pybind11/cast.h:444:64: error: expected primary-expression before '>' token
:info:build   444 |                 handle(frame->f_code->co_name).cast<std::string>() + "\n";
:info:build       |                                                                ^
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_libpetanque/libpetanque/work/arybo-1.1.0/petanque/third-party/pybind11/cast.h:444:66: error: expected primary-expression before ')' token
:info:build   444 |                 handle(frame->f_code->co_name).cast<std::string>() + "\n";
:info:build       |                                                                  ^
:info:build /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_libpetanque/libpetanque/work/arybo-1.1.0/petanque/third-party/pybind11/cast.h:445:26: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
:info:build   445 |             frame = frame->f_back;
:info:build       |                          ^~
:info:build /opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
:info:build    22 | typedef struct _frame PyFrameObject;
:info:build       |                ^~~~~~

Without Python bindings the library builds fine and all tests pass: macports/macports-ports#17103

@0xTowel
Copy link

0xTowel commented Apr 18, 2023

I don't believe it supports Python 3.11 yet. Try on 3.9 and you should be fine

@TsXor
Copy link

TsXor commented Dec 4, 2023

just replace the bundled pybind11 in pytanque with latest pybind11 release and it will compile

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

3 participants