Issue 1:
Cannot build numpy v1.17.0 on CentOS 7.

Previous version works fine.

I'm seeing a lot of C99/C11 features in error message, and avx512f.

Not sure if the required --std option is set but I don't think gcc 4.8.5 (the system default compiler on CentOS 7) can handle all of that.

Reproducing code example:

Simply build the wheel on CentOS 7 with python3.

Error message:

Some error log attached.

The entire story is too long to be pasted here.

#6 356.1 compile options: '-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.6m -c'
#6 356.1 gcc: _configtest.c
#6 356.1 _configtest.c: In function 'main':
#6 356.1 _configtest.c:5:3: warning: implicit declaration of function '__builtin_mul_overflow' [-Wimplicit-function-declaration]
#6 356.1 __builtin_mul_overflow(5, 5, (int*)5);
#6 356.1 ^
#6 356.1 gcc -pthread _configtest.o -o _configtest
#6 356.1 _configtest.o: In function `main':
#6 356.1 /tmp/pip-req-build-poiltggx/_configtest.c:5: undefined reference to `__builtin_mul_overflow'
#6 356.1 collect2: error: ld returned 1 exit status
#6 356.1 failure.
#6 356.1 removing: _configtest.c _configtest.o _configtest.o.d
#6 356.1 C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC
#6 356.1
#6 356.1 compile options: '-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.6m -c'
#6 356.1 gcc: _configtest.c
#6 356.1 _configtest.c: In function 'main':
#6 356.1 _configtest.c:7:16: warning: unused variable 'r' [-Wunused-variable]
#6 356.1 volatile int r = __builtin_cpu_supports("sse");
#6 356.1 ^
#6 356.1 gcc -pthread _configtest.o -o _configtest
#6 356.1 success!
#6 356.1 removing: _configtest.c _configtest.o _configtest.o.d _configtest
#6 356.1 C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC
#6 356.1
#6 356.1 compile options: '-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.6m -c'
#6 356.1 gcc: _configtest.c
#6 356.1 _configtest.c: In function 'main':
#6 356.1 _configtest.c:7:3: error: Parameter to builtin not valid: avx512f
#6 356.1 volatile int r = __builtin_cpu_supports("avx512f");
#6 356.1 ^
#6 356.1 _configtest.c:7:16: warning: unused variable 'r' [-Wunused-variable]
#6 356.1 volatile int r = __builtin_cpu_supports("avx512f");
#6 356.1 ^
#6 356.1 failure.
#6 356.1 removing: _configtest.c _configtest.o
#6 356.1 C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC
#6 356.1
#6 356.1 compile options: '-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.6m -c'
#6 356.1 gcc: _configtest.c
#6 356.1 gcc -pthread _configtest.o -o _configtest
#6 356.1 success!
#6 356.1 removing: _configtest.c _configtest.o _configtest.o.d _configtest
#6 356.1 C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC
#6 356.1
#6 356.1 compile options: '-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.6m -c'
#6 356.1 gcc: _configtest.c
#6 356.1 gcc -pthread _configtest.o -o _configtest
#6 356.1 success!
#6 356.1 removing: _configtest.c _configtest.o _configtest.o.d _configtest

#6 358.3 C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC
#6 358.3
#6 358.3 compile options: '-Ibuild/src.linux-x86_64-3.6/numpy/core/src/common -Inumpy/core/include -Ibuild/src.linux-x86_64-3.6/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.6m -Ibuild/src.linux-x86_64-3.6/numpy/core/src/common -Ibuild/src.linux-x86_64-3.6/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.6/numpy/core/src/common -Ibuild/src.linux-x86_64-3.6/numpy/core/src/npymath -c'
#6 358.3 gcc: build/src.linux-x86_64-3.6/numpy/core/src/npysort/radixsort.c
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_bool':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: note: use option -std=c99 or -std=gnu99 to compile your code
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_bool':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_byte':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_byte':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_ubyte':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_ubyte':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_short':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_short':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_ushort':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_ushort':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_int':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_int':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_uint':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_uint':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_long':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_long':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_ulong':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_ulong':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_longlong':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_longlong':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_ulonglong':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:112:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_ulonglong':
#6 358.3 numpy/core/src/npysort/radixsort.c.src:202:5: error: 'for' loop initial declarations are only allowed in C99 mode
#6 358.3 for (npy_intp i = 1; i < num; i++) {
#6 358.3 ^
#6 358.3 error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ibuild/src.linux-x86_64-3.6/numpy/core/src/common -Inumpy/core/include -Ibuild/src.linux-x86_64-3.6/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.6m -Ibuild/src.linux-x86_64-3.6/numpy/core/src/common -Ibuild/src.linux-x86_64-3.6/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.6/numpy/core/src/common -Ibuild/src.linux-x86_64-3.6/numpy/core/src/npymath -c build/src.linux-x86_64-3.6/numpy/core/src/npysort/radixsort.c -o build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/numpy/core/src/npysort/radixsort.o -MMD -MF build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/numpy/core/src/npysort/radixsort.o.d" failed with exit status 1
#6 358.3 ----------------------------------------
#6 358.4 ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-poiltggx/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-poiltggx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-50nzprh1/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Numpy/Python version information:

CentOS 7

Default python 3 (3.6)

Default gcc (4.8)

Issue 2:
When I attempt to build on RHEL 7.3, I get an error unless I manually do

(numpy-testing-py3) [jfoxrabi@... numpy]$ export CFLAGS=-std=c99

Here is my console session without setting the flag (forgive me for using ./runtests.py. I still haven't figured out a better shortcut for getting the log and running the test simultaneously):

(numpy-testing-py3) [jfoxrabi@... numpy]$ echo $CFLAGS

(numpy-testing-py3) [jfoxrabi@... numpy]$ ./runtests.py
Building, see build.log...
... build in progress
Processing numpy/random/mtrand/randint_helpers.pxi.in
Processing numpy/random/mtrand/mtrand.pyx
Cythonizing sources
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/include']

FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/include']

non-existing path in 'numpy/distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/include']

FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/include']

running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build/src.linux-x86_64-3.6
creating build/src.linux-x86_64-3.6/numpy
creating build/src.linux-x86_64-3.6/numpy/distutils
building library "npymath" sources
get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
customize Gnu95FCompiler
Found executable /home/jfoxrabi/miniconda3/envs/numpy-testing-py3/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using config
C compiler: gcc -pthread -B /home/jfoxrabi/miniconda3/envs/numpy-testing-py3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=vla -Werror=nonnull -Werror=pointer-arith -Wlogical-op -Werror=unused-function -fPIC

compile options: '-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/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/include/python3.6m -c'
gcc: _configtest.c
gcc -pthread -B /home/jfoxrabi/miniconda3/envs/numpy-testing-py3/compiler_compat -Wl,--sysroot=/ _configtest.o -o _configtest
success!
removing: _configtest.c _configtest.o _configtest.o.d _configtest
C compiler: gcc -pthread -B /home/jfoxrabi/miniconda3/envs/numpy-testing-py3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=vla -Werror=nonnull -Werror=pointer-arith -Wlogical-op -Werror=unused-function -fPIC

compile options: '-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/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/include/python3.6m -c'
gcc: _configtest.c
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
gcc -pthread -B /home/jfoxrabi/miniconda3/envs/numpy-testing-py3/compiler_compat -Wl,--sysroot=/ _configtest.o -o _configtest
/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/compiler_compat/ld: _configtest.o: in function `main':
/home/jfoxrabi/Documents/OTS/numpy/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status

<... SNIP ...>

numpy/fft/pocketfft.c:2042:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t m=0; m<n; ++m)
^
numpy/fft/pocketfft.c: In function ‘rfftblue_forward’:
numpy/fft/pocketfft.c:2054:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t m=0; m<n; ++m)
^
numpy/fft/pocketfft.c: In function ‘execute_complex’:
numpy/fft/pocketfft.c:2213:7: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < nrepeats; i++) {
^
numpy/fft/pocketfft.c: In function ‘execute_real_forward’:
numpy/fft/pocketfft.c:2246:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int d=0; d<ndim-1; ++d)
^
numpy/fft/pocketfft.c:2265:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < nrepeats; i++) {
^
numpy/fft/pocketfft.c: In function ‘execute_real_backward’:
numpy/fft/pocketfft.c:2310:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < nrepeats; i++) {
^
Running from numpy source directory.
/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
error: Command "gcc -pthread -B /home/jfoxrabi/miniconda3/envs/numpy-testing-py3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=vla -Werror=nonnull -Werror=pointer-arith -Wlogical-op -Werror=unused-function -fPIC -Inumpy/core/include -Ibuild/src.linux-x86_64-3.6/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/home/jfoxrabi/miniconda3/envs/numpy-testing-py3/include/python3.6m -Ibuild/src.linux-x86_64-3.6/numpy/core/src/common -Ibuild/src.linux-x86_64-3.6/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.6/numpy/core/src/common -Ibuild/src.linux-x86_64-3.6/numpy/core/src/npymath -c numpy/fft/pocketfft.c -o build/temp.linux-x86_64-3.6/numpy/fft/pocketfft.o -MMD -MF build/temp.linux-x86_64-3.6/numpy/fft/pocketfft.o.d" failed with exit status 1

Build failed!

Complete failed build.log

As soon as I set CFLAGS, the build completes and the tests start to run:

(numpy-testing-py3) [jfoxrabi@... numpy]$ export CFLAGS=-std=c99
(numpy-testing-py3) [jfoxrabi@... numpy]$ ./runtests.py
Building, see build.log...
Build OK
NumPy version 1.17.0.dev0+8aedcc0
NumPy relaxed strides checking option: True
.................x...................................................... [ 0%]
........................................................................ [ 1%]
........................................................................ [ 2%]
........................................................................ [ 3%]
......................ssss................................x............s [ 4%]
........................................................................ [ 5%]
........................................................................ [ 6%]
........................................................................ [ 7%]
........................................................................ [ 8%]
........................................................................ [ 9%]
.................................................................sss.... [ 10%]
........................................................................ [ 11%]
...........................s.......................xx........s.......... [ 12%]

<... SNIP ...>

Complete successful build.log

This looks like the -std=c99 flag is not being set explicitly somewhere, and my compiler does not assume it.

For completeness, I am running in an Anaconda environment (named numpy-testing-py3), running Python 3.6.8, installing numpy commit 8aedcc0129b9fa7e1785aa11779cbc1c1b3d3395 (my branch for #10855), which is effectively master at 49689f7.

I have edited out my hostname, but not the paths or user name because the former are at fairly standard locations, and the latter is publicly available.