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

ERROR: Failed building wheel for pyslalib #187

Open
xuhengdada opened this issue Jul 28, 2023 · 3 comments
Open

ERROR: Failed building wheel for pyslalib #187

xuhengdada opened this issue Jul 28, 2023 · 3 comments

Comments

@xuhengdada
Copy link

xuhengdada commented Jul 28, 2023

I am trying to install presto on CentOS7 and encounter "ERROR: Failed building wheel for pyslalib" problem,
the problem here is basically:

build/src.linux-x86_64-3.9/build/src.linux-x86_64-3.9/fortranobject.c:707:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < rank; ++i) {
^
build/src.linux-x86_64-3.9/build/src.linux-x86_64-3.9/fortranobject.c:707:5: note: use option -std=c99 or -std=gnu99 to compile your code
build/src.linux-x86_64-3.9/slalibmodule.c:203:12: warning: ‘f2py_size’ defined but not used [-Wunused-function]
static int f2py_size(PyArrayObject* var, ...)
^
error: Command "gcc -pthread -B /opt/pulsar_software/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /opt/pulsar_software/miniconda3/include -I/opt/pulsar_software/miniconda3/include -fPIC -O2 -isystem /opt/pulsar_software/miniconda3/include -fPIC -I. -Ibuild/src.linux-x86_64-3.9/build/src.linux-x86_64-3.9 -I/tmp/pip-build-env-ktomdtz8/overlay/lib/python3.9/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/distutils/include -I/opt/pulsar_software/miniconda3/include/python3.9 -c build/src.linux-x86_64-3.9/build/src.linux-x86_64-3.9/fortranobject.c -o build/temp.linux-x86_64-cpython-39/build/src.linux-x86_64-3.9/build/src.linux-x86_64-3.9/fortranobject.o -MMD -MF build/temp.linux-x86_64-cpython-39/build/src.linux-x86_64-3.9/build/src.linux-x86_64-3.9/fortranobject.o.d -msse -msse2 -msse3" failed with exit status 1

and I tried to install pyslablib by hand, and add -std=gnu99 to CFLAGS in the Makefile of pyslablib, but does not solve that issue.

Any suggestion to solve this issue? Many thanks!

@scottransom
Copy link
Owner

Hmmm. I can't reproduce this on RHEL7 using python3.7 (which is the most recent that I have access to). I was able to "pip install pyslalib" into a virtual environment with no issues. I notice that you are using miniconda. I wonder if it is related to that? (although note that I am successfully using miniconda to compile pyslalib on a couple other machines)

@scottransom
Copy link
Owner

It does seem to be related to your C compiler. Are you using gcc? And do you know what version it is? And did you try by adding -std=c99 as well as the gnu99 version? The fact that it compiled fine for me on pure RHEL7 (which is a very old one!) makes it seem like that might not be the actual issue, though.

@xuhengdada
Copy link
Author

Yes, I'm using the miniconda, since on the CentOS7, yum could only install python3.6 which is lower than the required version.
Here I was using gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), probably the version is too low? I can try to have a gcc with high version then give feedback.

Thank you very much!

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

No branches or pull requests

2 participants