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

Support for python 3.11 #75

Closed
jsoishi opened this issue Mar 10, 2023 · 2 comments
Closed

Support for python 3.11 #75

jsoishi opened this issue Mar 10, 2023 · 2 comments

Comments

@jsoishi
Copy link

jsoishi commented Mar 10, 2023

It appears that skfmm/pheap.cpp needs to be re-Cythonized for python 3.11 support. When I attempt to pip install, there is no binary, and the build fails with the following error:

     INFO: compile options: '-I/tmp/pip-build-env-hs0al687/overlay/lib/python3.11/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.11/numpy/distutils/include -I/home/jsoishi/miniforge3/envs/scikit-test/include/python3.11 -c'
      extra options: '-msse -msse2 -msse3'
      INFO: g++: skfmm/pheap.cpp
      INFO: g++: skfmm/heap.cpp
      skfmm/pheap.cpp: In function ‘void __Pyx_AddTraceback(const char*, int, int, const char*)’:
      skfmm/pheap.cpp:446:62: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
        446 |   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
            |                                                              ^~
      skfmm/pheap.cpp:3360:5: note: in expansion of macro ‘__Pyx_PyFrame_SetLineNumber’
       3360 |     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /home/jsoishi/miniforge3/envs/scikit-test/include/python3.11/Python.h:42,
                       from skfmm/pheap.cpp:6:
      /home/jsoishi/miniforge3/envs/scikit-test/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      error: Command "g++ -pthread -B /home/jsoishi/miniforge3/envs/scikit-test/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/jsoishi/miniforge3/envs/scikit-test/include -fPIC -O2 -isystem /home/jsoishi/miniforge3/envs/scikit-test/include -fPIC -I/tmp/pip-build-env-hs0al687/overlay/lib/python3.11/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.11/numpy/distutils/include -I/home/jsoishi/miniforge3/envs/scikit-test/include/python3.11 -c skfmm/pheap.cpp -o build/temp.linux-x86_64-cpython-311/skfmm/pheap.o -MMD -MF build/temp.linux-x86_64-cpython-311/skfmm/pheap.o.d -msse -msse2 -msse3" failed with exit status 1
@jkfurtney
Copy link
Member

Thanks for the note on this, I will get to this as soon as I can. If we Cythonize this for 3.11, will it break the earlier versions? Maybe we should add the cythonization as part of the build? If you have time to do it and create a PR I will merge it and we can see if the build servers pass. We should also add a 3.11 build on the build servers.

@jkfurtney
Copy link
Member

The 3.11 build works now. I will make a release.

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

2 participants