Skip to content

Compilation failure with Python 3.11 #259

@SnarkBoojum

Description

@SnarkBoojum

I wanted to update the Debian package for fpylll to the latest version because we want to transition to Python 3.12 ; unfortunately during the transition that means we compile for 3.11 and 3.12.

And with 3.11 I get a failure:

In function ‘PyObject* __Pyx_PyInt_From_int(int)’,
    inlined from ‘PyObject* __pyx_pf_6fpylll_5fplll_3bkz_12BKZReduction_6__call__(__pyx_obj_6fpylll_5fplll_3bkz_BKZReduction*)’ at build/src/fpylll/fplll/bkz.cpp:4422:35:
build/src/fpylll/fplll/bkz.cpp:15227:34: warning: ‘__pyx_v_r’ may be used uninitialized [-Wmaybe-uninitialized]
15227 |             return PyInt_FromLong((long) value);
      |                                  ^
build/src/fpylll/fplll/bkz.cpp: In function ‘PyObject* __pyx_pf_6fpylll_5fplll_3bkz_12BKZReduction_6__call__(__pyx_obj_6fpylll_5fplll_3bkz_BKZReduction*)’:
build/src/fpylll/fplll/bkz.cpp:4095:7: note: ‘__pyx_v_r’ was declared here
 4095 |   int __pyx_v_r;
      |       ^~~~~~~~~
build/src/fpylll/fplll/enumeration.cpp:2101:21: error: conflicting declaration of ‘bool evaluator_callback_call_obj(PyObject*, int, double*)’ with ‘C’ linkage
 2101 | __PYX_EXTERN_C bool evaluator_callback_call_obj(PyObject *, int, double *); /*proto*/
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from build/src/fpylll/fplll/enumeration.cpp:874:
build/src/fpylll/fplll/enumeration_callback_helper.h:10:8: note: previous declaration with ‘C++’ linkage
   10 |   bool evaluator_callback_call_obj(PyObject *obj, int n, double *new_sol_coord);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command '/usr/lib/ccache/x86_64-linux-gnu-gcc' failed with exit code 1
E: pybuild pybuild:395: build: plugin distutils failed with: exit code=1: /usr/bin/python3 setup.py build 
dh_auto_build: error: pybuild --build -i python{version} -p 3.11 returned exit code 13

My first idea is "why two declarations?", but I haven't dug to see if that was indeed the problem.

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