Skip to content

Unable to build numpy with GCC 4.8.5 #14182

@adamjstewart

Description

@adamjstewart

I'm trying to install numpy from source but I'm seeing a lot of C99 errors.

Reproducing code example:

$ python -s setup.py --no-user-cfg build
$ python -s setup.py --no-user-cfg install --prefix=/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/py-numpy-1.17.0-37xrxjmnbitsruc7alrutzpvdil2xhhy --single-version-externally-managed --root=/

Error message:

I see hundreds of errors like:

numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_bool':
numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (npy_intp i = 1; i < num; i++) {
     ^
numpy/core/src/npysort/radixsort.c.src:112:5: note: use option -std=c99 or -std=gnu99 to compile your code

Numpy/Python version information:

  • Linux CentOS 7
  • GCC 4.8.5
  • Python 3.7.4
  • Numpy 1.17.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions