aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-04-12 15:26:37 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-04-12 15:26:37 +0100
commitfb041fe844074d2556cfc350b52f5742bfb866b3 (patch)
treeb28ccd457d3e542299de5ff72db3b64fc522a22a
parentd0a51f78d4705c2496c42a02c49b0bc70e931cf7 (diff)
Configure (numpy): added --std=c99 to CFLAGS to fix error
Elham Saremi recently reported the following errors when building Numpy in numpy/core/src/npysort/radixsort.c.src: "error: 'for' loop initial declarations are only allowed in C99 or C11 mode". After some searching, I found Issue 14147[1] on Numpy's main repository about the same problem. As described there, apparently Numpy needs C99 compiler, but doesn't check for it or set it manually (for some strange reason, leaving it to the packagers to check if they want!!!). Any way, after a check with Elham, we were able to fix it by adding the `--std=c99' to CFLAGS of Numpy's build and with this commit, it is now being implemented in the core Maneage to not cause a problem in any other project. [1] https://github.com/numpy/numpy/issues/14147
-rw-r--r--reproduce/software/make/python.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/reproduce/software/make/python.mk b/reproduce/software/make/python.mk
index 9c79abc..a15841c 100644
--- a/reproduce/software/make/python.mk
+++ b/reproduce/software/make/python.mk
@@ -599,6 +599,7 @@ $(ipydir)/numpy: $(ibidir)/unzip \
else \
export LDFLAGS="$(LDFLAGS) -shared"; \
fi; \
+ export CFLAGS="--std=c99 $$CFLAGS"; \
conf="$$(pwd)/reproduce/software/config/installation/numpy-scipy.cfg"; \
$(call pybuild, unzip, numpy-$(numpy-version),$$conf, \
Numpy $(numpy-version)) \