Skip to content

Unable to build on Debian trixie #202

@devinrsmith

Description

@devinrsmith

GCC is failing with incompatible pointer types. It may be possible to simply ignore these errors by setting -Wincompatible-pointer-types, but it's probably better to try and use the more correct types if possible.

1.956 src/main/c/jni/org_jpy_PyLib.c:2529:17: error: assignment to ‘PyFrameObject *’ {aka ‘struct _frame *’} from incompatible pointer type ‘PyObject *’ {aka ‘struct _object *’} [-Wincompatible-pointer-types]
1.956  2529 |         pyFrame = PyObject_GetAttrString(pyTraceback, "tb_frame");
1.956       |                 ^
1.956 src/main/c/jni/org_jpy_PyLib.c:2533:73: error: passing argument 1 of ‘PyObject_GetAttrString’ from incompatible pointer type [-Wincompatible-pointer-types]
1.956  2533 |                 filenameChars = PyLib_ObjToChars(PyObject_GetAttrString(pyCode, "co_filename"), &pyFilenameUtf8);
1.956       |                                                                         ^~~~~~
1.956       |                                                                         |
1.956       |                                                                         PyCodeObject *
1.957 src/main/c/jni/org_jpy_PyLib.c: In function ‘python_traceback_report’:
1.958 src/main/c/jni/org_jpy_PyLib.c:2833:36: error: passing argument 1 of ‘format_python_traceback’ from incompatible pointer type [-Wincompatible-pointer-types]
1.958  2833 |     return format_python_traceback(tb, buf, bufLen);
1.958       |                                    ^~
1.958       |                                    |
1.958       |                                    PyObject * {aka struct _object *}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions