Issue
I am trying to install this python package. Unfortunately, I am running into compilation errors due to rank mismatch.
A bug for this package has already been reported here. The bug report says that "The most pragmatic solution seems to be adding the compiler flag -fallow-argument-mismatch to the setup scripts."
I do not understand how to go about doing this. The setup.py script only contains this:
from numpy.distutils.core import setup
from numpy.distutils.core import Extension
import os
import glob
ext_modules = [ Extension('orthpol_light',
glob.glob(os.path.join('src','*.f'))) ]
setup(
name='orthpol_light',
version = "1.0.1",
license = "COPYING.LESSER",
description = "Light python wrapper for the ORTHPOL package",
long_description=open("README.rst").read(),
url="http://www.limitcycle.it",
author = "Daniele Bigoni",
author_email = "[email protected]",
ext_modules = ext_modules
)
Do I put the flag here? I really have no idea. The file that's causing the error is in src/r1mach.f
Help appreciated!
Solution
The fix is already implemented in the software you link, in the adapt-to-gcc10
branch https://bazaar.launchpad.net/~catastropeia/pyorthpol/adapt-to-gcc10/revision/68
The relevant command then becomes
ext_modules = [ Extension('orthpol_light',
glob.glob(os.path.join('src','*.f')),
extra_f77_compile_args=['-fallow-argument-mismatch']) ]
Answered By - Vladimir F