hashpy icon indicating copy to clipboard operation
hashpy copied to clipboard

gfortran related errors

Open firstkingofrome opened this issue 3 years ago • 1 comments

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 (https://github.com/markcwill/hashpy/issues/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 avatar Dec 01 '22 16:12 firstkingofrome

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... https://github.com/NCAR/ncl/issues/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: https://github.com/markcwill/hashpy/pull/12 )

firstkingofrome avatar Dec 05 '22 17:12 firstkingofrome