Skip to content

compatibility issues with master branch cython #33224

Closed
@tacaswell

Description

@tacaswell

On the cython master branch the generated c code has unused functions which fails the build with:


  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -I/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/numpy/core/include -I/home/tcaswell/.virtualenvs/sys38/include -I/usr/include/python3.8 -c pandas/_libs/algos.c -o build/temp.linux-x86_64-3.8/pandas/_libs/algos.o -Werror
    pandas/_libs/algos.c:87270:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_762__defaults__’ defined but not used [-Werror=unused-function]
    87270 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_762__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/algos.c:78766:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_744__defaults__’ defined but not used [-Werror=unused-function]
    78766 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_744__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/algos.c:71391:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_726__defaults__’ defined but not used [-Werror=unused-function]
    71391 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_726__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/algos.c:62479:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_724__defaults__’ defined but not used [-Werror=unused-function]
    62479 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_724__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/algos.c:56193:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_678__defaults__’ defined but not used [-Werror=unused-function]
    56193 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_678__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/algos.c:50908:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_632__defaults__’ defined but not used [-Werror=unused-function]
    50908 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_632__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/algos.c:40806:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_586__defaults__’ defined but not used [-Werror=unused-function]
    40806 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_586__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/algos.c:34476:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_540__defaults__’ defined but not used [-Werror=unused-function]
    34476 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_540__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/algos.c:29147:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_494__defaults__’ defined but not used [-Werror=unused-function]
    29147 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_494__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/algos.c:19248:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_448__defaults__’ defined but not used [-Werror=unused-function]
    19248 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_448__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pandas/_libs/algos.c:12162:18: error: ‘__pyx_pf_6pandas_5_libs_5algos_446__defaults__’ defined but not used [-Werror=unused-function]
    12162 | static PyObject *__pyx_pf_6pandas_5_libs_5algos_446__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    error: command 'gcc' failed with exit status 1

and similar warnings from other modules (this just happens to be the first one).

If I remove the "-Werror" it seems to build ok.

Not sure if this should be reported here at cython. I will likely try to bisect this to the cython change later today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BuildLibrary building on various platforms

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions