Pandas: BUG: build from source failed on Ubuntu 20.04

Created on 13 Jun 2020  Â·  4Comments  Â·  Source: pandas-dev/pandas

  • [x] I have checked that this issue has not already been reported.

  • [x] I have confirmed this bug exists on the latest version of pandas.

  • [ ] (optional) I have confirmed this bug exists on the master branch of pandas.


Output of the build script

(pandas-dev) xxx@xxx-home-office:~/Workspace/pandas-VirosaLi$ python setup.py build_ext --inplace -j 4
running build_ext
building 'pandas._libs.interval' extension
gcc -pthread -B /home/xxx/miniconda3/envs/pandas-dev/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs/tslibs -Ipandas/_libs/src/klib -I/home/xxx/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/numpy/core/include -I/home/xxx/miniconda3/envs/pandas-dev/include/python3.8 -c pandas/_libs/interval.c -o build/temp.linux-x86_64-3.8/pandas/_libs/interval.o -Werror
building 'pandas._libs.tslibs.nattype' extension
gcc -pthread -B /home/xxx/miniconda3/envs/pandas-dev/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs/tslibs -I/home/xxx/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/numpy/core/include -I/home/xxx/miniconda3/envs/pandas-dev/include/python3.8 -c pandas/_libs/tslibs/nattype.c -o build/temp.linux-x86_64-3.8/pandas/_libs/tslibs/nattype.o -Werror
pandas/_libs/tslibs/nattype.c:4998:18: error: ‘__pyx_pw_6pandas_5_libs_6tslibs_7nattype_4_NaT_11__div__’ defined but not used [-Werror=unused-function]
 4998 | static PyObject *__pyx_pw_6pandas_5_libs_6tslibs_7nattype_4_NaT_11__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pandas/_libs/interval.c:8301:18: error: ‘__pyx_pw_6pandas_5_libs_8interval_8Interval_25__div__’ defined but not used [-Werror=unused-function]
 8301 | static PyObject *__pyx_pw_6pandas_5_libs_8interval_8Interval_25__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_y) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1

Problem description

Recently I decide to try out Ubuntu 20.04. The build process failed. See the output in the section above. I replaced my user name with xxx.

Bug

Most helpful comment

For what it's worth, I have

$ cython --version
Cython version 0.29.16

All 4 comments

Thanks @VirosaLi for the report

I've built it from source on Ubuntu 20.04 and it works fine, did you follow the exact steps from here https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#creating-a-development-environment ?

There were some issues with the latest version of cython.

For what it's worth, I have

$ cython --version
Cython version 0.29.16

It's a cython issue, version 0.29.20 has this problem. The cython version was pinned 3 days ago. And my forked repo is not up to date with the master branch. I should double check next time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

swails picture swails  Â·  3Comments

marcelnem picture marcelnem  Â·  3Comments

Ashutosh-Srivastav picture Ashutosh-Srivastav  Â·  3Comments

ericdf picture ericdf  Â·  3Comments

matthiasroder picture matthiasroder  Â·  3Comments