<p dir="auto">Cannot build numpy v1.17.0 on CentOS 7.<br>
Previous version works fine.<br>
I'm seeing a lot of C99/C11 features in error message, and avx512f.<br>
Not sure if the required <code class="notranslate">--std</code> option is set but I don't think gcc 4.8.5 (the system default compiler on CentOS 7) can handle all of that.</p>
<h3 dir="auto">Reproducing code example:</h3>
<p dir="auto">Simply build the wheel on CentOS 7 with python3.</p>
<h3 dir="auto">Error message:</h3>
<p dir="auto">Some error log attached.<br>
The entire story is too long to be pasted here.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#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(&quot;sse&quot;);
#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(&quot;avx512f&quot;);
#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(&quot;avx512f&quot;);
#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"><pre class="notranslate"><code class="notranslate">#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
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; num; i++) {
#6 358.3          ^
#6 358.3     error: Command &quot;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&quot; 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] = '&quot;'&quot;'/tmp/pip-req-build-poiltggx/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/tmp/pip-req-build-poiltggx/setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record /tmp/pip-record-50nzprh1/install-record.txt --single-version-externally-managed --compile Check the logs for full command output."><pre class="notranslate"><code class="notranslate">#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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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.
</code></pre></div>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto">CentOS 7<br>
Default python 3 (3.6)<br>
Default gcc (4.8)</p>
<p dir="auto">When I attempt to build on RHEL 7.3, I get an error unless I manually do</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(numpy-testing-py3) [jfoxrabi@... numpy]$ export CFLAGS=-std=c99"><pre class="notranslate"><code class="notranslate">(numpy-testing-py3) [jfoxrabi@... numpy]$ export CFLAGS=-std=c99
</code></pre></div>
<p dir="auto">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):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(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 &quot;npymath&quot; 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

&lt;... SNIP ...&gt;

numpy/fft/pocketfft.c:2042:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
   for (size_t m=0; m&lt;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&lt;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 &lt; 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&lt;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 &lt; 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 &lt; 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 &quot;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&quot; failed with exit status 1

Build failed!"><pre class="notranslate"><code class="notranslate">(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

&lt;... SNIP ...&gt;

numpy/fft/pocketfft.c:2042:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
   for (size_t m=0; m&lt;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&lt;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 &lt; 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&lt;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 &lt; 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 &lt; 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!
</code></pre></div>
<p dir="auto"><a href="https://github.com/numpy/numpy/files/2766190/build.log">Complete failed build.log</a></p>
<p dir="auto">As soon as I set <code class="notranslate">CFLAGS</code>, the build completes and the tests start to run:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(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%]

&lt;... SNIP ...&gt;"><pre class="notranslate"><code class="notranslate">(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%]

&lt;... SNIP ...&gt;
</code></pre></div>
<p dir="auto"><a href="https://github.com/numpy/numpy/files/2766210/build.log">Complete successful build.log</a></p>
<p dir="auto">This looks like the <code class="notranslate">-std=c99</code> flag is not being set explicitly somewhere, and my compiler does not assume it.</p>
<p dir="auto">For completeness, I am running in an Anaconda environment (named <code class="notranslate">numpy-testing-py3</code>), running Python 3.6.8, installing numpy commit  8aedcc0129b9fa7e1785aa11779cbc1c1b3d3395 (my branch for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="312065417" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/10855" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/10855/hovercard" href="https://github.com/numpy/numpy/pull/10855">#10855</a>), which is effectively <code class="notranslate">master</code> at <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/numpy/numpy/commit/49689f7be478fe9a4d33761b080eb6aef3f8f899/hovercard" href="https://github.com/numpy/numpy/commit/49689f7be478fe9a4d33761b080eb6aef3f8f899"><tt>49689f7</tt></a>.</p>
<p dir="auto">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.</p>