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

python 3.11 build problem #67

Closed
jostreff opened this issue Oct 15, 2022 · 4 comments
Closed

python 3.11 build problem #67

jostreff opened this issue Oct 15, 2022 · 4 comments

Comments

@jostreff
Copy link

It's impossible to be build when your primary python version is 3.11

@jostreff
Copy link
Author

Here it's output if you simple try to copy 3.10 directory to 3.11 directory.

===> Building for py311-frozendict-2.3.4
running build
running build_py
running build_ext
building 'frozendict._frozendict' extension
cc -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -march=native -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -march=native -fstack-protector-strong -fno-strict-aliasing -fPIC -I/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/Include -I/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/cpython_src/Objects -I/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/cpython_src/Objects/stringlib -I/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/cpython_src/Objects/clinic -I/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/cpython_src -I/usr/local/include/python3.11 -c frozendict/src/3_11/frozendictobject.c -o build/temp.freebsd-13.1-STABLE-amd64-cpython-311/frozendict/src/3_11/frozendictobject.o -DPY_SSIZE_T_CLEAN
In file included from frozendict/src/3_11/frozendictobject.c:6:
/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/cpython_src/Objects/dictobject.c:491:36: error: subscript of pointer to incomplete type 'PyDictValues' (aka 'struct _dictvalues')
CHECK(mp->ma_values[i] != NULL);
~~~~~~~~~~~~~^
/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/cpython_src/Objects/dictobject.c:434:16: note: expanded from macro 'CHECK'
do { if (!(expr)) { _PyObject_ASSERT_FAILED_MSG(op, Py_STRINGIFY(expr)); } } while (0)
^~~~
/usr/local/include/python3.11/cpython/dictobject.h:6:16: note: forward declaration of 'struct _dictvalues'
typedef struct _dictvalues PyDictValues;
^
In file included from frozendict/src/3_11/frozendictobject.c:6:
/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/cpython_src/Objects/dictobject.c:799:30: error: subscript of pointer to incomplete type 'PyDictValues' (aka 'struct _dictvalues')
value = mp->ma_values[i];
~~~~~~~~~~~~~^
/usr/local/include/python3.11/cpython/dictobject.h:6:16: note: forward declaration of 'struct _dictvalues'
typedef struct _dictvalues PyDictValues;
^
In file included from frozendict/src/3_11/frozendictobject.c:6:
/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/cpython_src/Objects/dictobject.c:830:16: warning: incompatible pointer types initializing 'PyObject **' (aka 'struct _object **') with an expression of type 'PyDictValues *' (aka 'struct _dictvalues *') [-Wincompatible-pointer-types]
PyObject *values = mp->ma_values;
^ ~~~~~~~~~~~~~
/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/cpython_src/Objects/dictobject.c:1090:39: error: subscript of pointer to incomplete type 'PyDictValues' (aka 'struct _dictvalues')
Py_VISIT(mp->ma_values[i]);
~~~~~~~~~~~~~^
/usr/local/include/python3.11/objimpl.h:199:13: note: expanded from macro 'Py_VISIT'
if (op) {
^~
/usr/local/include/python3.11/cpython/dictobject.h:6:16: note: forward declaration of 'struct _dictvalues'
typedef struct _dictvalues PyDictValues;
^
In file included from frozendict/src/3_11/frozendictobject.c:6:
/usr/ports/devel/py-frozendict/work-py311/frozendict-2.3.4/frozendict/src/3_11/cpython_src/Objects/dictobject.c:1090:39: error: subscript of pointer to incomplete type 'PyDictValues' (aka 'struct _dictvalues')
Py_VISIT(mp->ma_values[i]);
~~~~~~~~~~~~~^
/usr/local/include/python3.11/objimpl.h:200:45: note: expanded from macro 'Py_VISIT'
int vret = visit(_PyObject_CAST(op), arg);
^~
/usr/local/include/python3.11/object.h:107:49: note: expanded from macro '_PyObject_CAST'
#define _PyObject_CAST(op) _Py_CAST(PyObject
, (op))
^~
/usr/local/include/python3.11/pyport.h:24:38: note: expanded from macro '_Py_CAST'
#define _Py_CAST(type, expr) ((type)(expr))
^~~~
/usr/local/include/python3.11/cpython/dictobject.h:6:16: note: forward declaration of 'struct _dictvalues'
typedef struct _dictvalues PyDictValues;
^
frozendict/src/3_11/frozendictobject.c:453:41: error: subscript of pointer to incomplete type 'PyDictValues' (aka 'struct _dictvalues')
value = other->ma_values[i];
~~~~~~~~~~~~~~~~^
/usr/local/include/python3.11/cpython/dictobject.h:6:16: note: forward declaration of 'struct _dictvalues'
typedef struct _dictvalues PyDictValues;
^
1 warning and 5 errors generated.
error: command '/usr/bin/cc' failed with exit code 1
*** Error code 1

Stop.

@Marco-Sulla
Copy link
Owner

Marco-Sulla commented Oct 15, 2022

See #58

@jostreff
Copy link
Author

Actually python 3.11 is already released https://www.python.org/downloads/ - 2 days ago.

@Marco-Sulla
Copy link
Owner

frozendict C Extension for CPython 3.11 is currently WIP. In the meanwhile you can use the pure py version.

arkamar added a commit to arkamar/python-frozendict that referenced this issue Dec 3, 2022
This improves default behavior of setup.py in sense that py version of
frozendict is used for python versions which do not have C extension
available yet. This would probably reduce amount of issues similar to
[1-4] in future.

[1] Marco-Sulla#68
[2] Marco-Sulla#67
[3] Marco-Sulla#65
[4] Marco-Sulla#58
arkamar added a commit to arkamar/python-frozendict that referenced this issue Dec 3, 2022
This improves default behavior of setup.py in sense that py version of
frozendict is used for python versions which do not have C extension
available yet. This would probably reduce amount of issues similar to
[1-4] in future.

[1] Marco-Sulla#68
[2] Marco-Sulla#67
[3] Marco-Sulla#65
[4] Marco-Sulla#58
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