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

gfortran related errors #13

Open
firstkingofrome opened this issue Dec 1, 2022 · 1 comment
Open

gfortran related errors #13

firstkingofrome opened this issue Dec 1, 2022 · 1 comment

Comments

@firstkingofrome
Copy link

Hello, when I try and install this package I get a large number of fortran warnings followed by the error:

error: Command "/usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops -I/tmp/tmp3d4ew8eb/src.linux-x86_64-3.11 -I/home/eckertee/anaconda3/envs/hashpy/lib/python3.11/site-packages/numpy/core/include -I/home/eckertee/anaconda3/envs/hashpy/include/python3.11 -c -c hashpy/src/uncert_subs.f -o /tmp/tmp3d4ew8eb/hashpy/src/uncert_subs.o" failed with exit status 1
make: *** [Makefile:15: libhashpy.so] Error 1

I am using python 3.11, numpy 1.23.5 and gfortran version 11.3.0 on ubuntu.
(I also tried the same process using python 2.7) and the development branch of this software (also tried with the master branch).

This issue (#7) sounded very similar and claimed it was fixed, although I seem to be having the same problems. Id greatly appreciate any assistance in resolving this issue.

Thanks!

--Eric

@firstkingofrome
Copy link
Author

Ok, I determined that this is a result of gfortran (post version 10) treating something that had been a warning as an error. (this is detailed here and in other places where people have f77 dependencies... NCAR/ncl#123 )

A hacky fix is to run:

export FCFLAGS="-w -fallow-argument-mismatch -O2"
export FFLAGS="-w -fallow-argument-mismatch -O2"

in the terminal before attempting to install with pip (using this fork: #12 )

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

1 participant