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

Problem with Ubuntu 22.04 install via pip/numpy, when compiling dependencies. #19868

Closed
dat-linux opened this issue Apr 27, 2022 · 8 comments
Closed
Labels
#bug Bug report

Comments

@dat-linux
Copy link

Is this a GCC version issue perhaps? I'm using gcc-11.2.0-19ubuntu1 amd64

Ouput:

         2997 |     return _Py_HashDouble(npy_half_to_double(PyArrayScalar_VAL(obj, Half)));
              |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              |                           |
              |                           double
        In file included from /usr/include/python3.10/Python.h:77,
                         from numpy/core/src/multiarray/scalartypes.c.src:3:
        /usr/include/python3.10/pyhash.h:10:38: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘double’
           10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
              |                                      ^~~~~~~~~~
        numpy/core/src/multiarray/scalartypes.c.src:2997:12: error: too few arguments to function ‘_Py_HashDouble’
         2997 |     return _Py_HashDouble(npy_half_to_double(PyArrayScalar_VAL(obj, Half)));
              |            ^~~~~~~~~~~~~~
        In file included from /usr/include/python3.10/Python.h:77,
                         from numpy/core/src/multiarray/scalartypes.c.src:3:
        /usr/include/python3.10/pyhash.h:10:23: note: declared here
           10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
              |                       ^~~~~~~~~~~~~~
        numpy/core/src/multiarray/scalartypes.c.src: In function ‘longdouble_arrtype_hash’:
        numpy/core/src/multiarray/scalartypes.c.src:2968:1: warning: control reaches end of non-void function [-Wreturn-type]
         2968 | }
              | ^
        numpy/core/src/multiarray/scalartypes.c.src: In function ‘float_arrtype_hash’:
        numpy/core/src/multiarray/scalartypes.c.src:2968:1: warning: control reaches end of non-void function [-Wreturn-type]
         2968 | }
              | ^
        numpy/core/src/multiarray/scalartypes.c.src: In function ‘half_arrtype_hash’:
        numpy/core/src/multiarray/scalartypes.c.src:2998:1: warning: control reaches end of non-void function [-Wreturn-type]
         2998 | }
              | ^
        x86_64-linux-gnu-gcc: numpy/core/src/multiarray/vdot.c
        x86_64-linux-gnu-gcc: numpy/core/src/multiarray/scalarapi.c
        x86_64-linux-gnu-gcc: numpy/core/src/umath/umathmodule.c
        x86_64-linux-gnu-gcc: numpy/core/src/multiarray/nditer_pywrap.c
        x86_64-linux-gnu-gcc: numpy/core/src/umath/reduction.c
        x86_64-linux-gnu-gcc: build/src.linux-x86_64-3.10/numpy/core/src/umath/clip.c
        x86_64-linux-gnu-gcc: build/src.linux-x86_64-3.10/numpy/core/src/umath/loops.c
        x86_64-linux-gnu-gcc: numpy/core/src/umath/ufunc_object.c
        x86_64-linux-gnu-gcc: numpy/core/src/umath/override.c
        x86_64-linux-gnu-gcc: numpy/core/src/npymath/npy_math.c
        x86_64-linux-gnu-gcc: build/src.linux-x86_64-3.10/numpy/core/src/npymath/ieee754.c
        x86_64-linux-gnu-gcc: build/src.linux-x86_64-3.10/numpy/core/src/npymath/npy_math_complex.c
        x86_64-linux-gnu-gcc: numpy/core/src/npymath/halffloat.c
        x86_64-linux-gnu-gcc: numpy/core/src/common/array_assign.c
        x86_64-linux-gnu-gcc: numpy/core/src/common/mem_overlap.c
        x86_64-linux-gnu-gcc: numpy/core/src/umath/extobj.c
        x86_64-linux-gnu-gcc: numpy/core/src/common/npy_longdouble.c
        x86_64-linux-gnu-gcc: numpy/core/src/common/ucsnarrow.c
        x86_64-linux-gnu-gcc: build/src.linux-x86_64-3.10/numpy/core/src/umath/scalarmath.c
        x86_64-linux-gnu-gcc: numpy/core/src/common/ufunc_override.c
        x86_64-linux-gnu-gcc: numpy/core/src/common/numpyos.c
        x86_64-linux-gnu-gcc: build/src.linux-x86_64-3.10/numpy/core/src/common/npy_cpu_features.c
        x86_64-linux-gnu-gcc: numpy/core/src/umath/ufunc_type_resolution.c
        x86_64-linux-gnu-gcc: numpy/core/src/multiarray/mapping.c
        x86_64-linux-gnu-gcc: numpy/core/src/multiarray/methods.c
        x86_64-linux-gnu-gcc: build/src.linux-x86_64-3.10/numpy/core/src/umath/matmul.c
        error: Command "x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild/src.linux-x86_64-3.10/numpy/core/src/umath -Ibuild/src.linux-x86_64-3.10/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.10/numpy/core/src/common -Inumpy/core/include -Ibuild/src.linux-x86_64-3.10/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.10 -Ibuild/src.linux-x86_64-3.10/numpy/core/src/common -Ibuild/src.linux-x86_64-3.10/numpy/core/src/npymath -c build/src.linux-x86_64-3.10/numpy/core/src/multiarray/scalartypes.c -o build/temp.linux-x86_64-3.10/build/src.linux-x86_64-3.10/numpy/core/src/multiarray/scalartypes.o -MMD -MF build/temp.linux-x86_64-3.10/build/src.linux-x86_64-3.10/numpy/core/src/multiarray/scalartypes.o.d -std=c99" failed with exit status 1
        [end of output]
  
    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for numpy
  Failed to build numpy
  ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

@dat-linux dat-linux added the #bug Bug report label Apr 27, 2022
@richerdk
Copy link

richerdk commented May 2, 2022

Exact same version and error for me as well. Were you able to workaround?

@dat-linux
Copy link
Author

dat-linux commented May 2, 2022

Exact same version and error for me as well. Were you able to workaround?

I still have problems with install. This issue doesn't seem to be getting any traction, so I'll update it with instructions on how to reproduce, and hopefully it gets picked up by a dev. Right now, based on the error messages, I see no logical workaround. Could be a compatibility issue with python 3.9 vs 3.10.

Python apps seem to break backwards compatibility quite lot for some reason. Dependency hell. I just wish there were precompiled packages for this stuff. Expecting real time dep builds is a recipe for trouble. The goal is supposed to be one code base for multiple platforms, but that goes out of the window if a simple distro upgrade can break it.

I run it in a virtual env as well.

@dat-linux
Copy link
Author

opening another with more details

@saiaprameya
Copy link

facing the same issue hope there is some update on this!!!

@sraosamanthula
Copy link

facing the same issue, hope someone provides an update at the earliest possible.
Thanks

@dat-linux
Copy link
Author

facing the same issue, hope someone provides an update at the earliest possible. Thanks

You need to run it in a Python 3.9 env't. Try https://github.com/pyenv/pyenv

@mdengler
Copy link

This appears to be an issue with pyarrow; see my comment in numpy/numpy#22520 (comment)

@mdengler
Copy link

opening another with more details

#19986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

5 participants