【问题标题】:Edit setup to allow argument mismatch in gcc compilation编辑设置以允许 gcc 编译中的参数不匹配
【发布时间】:2021-06-13 11:50:28
【问题描述】:

我正在尝试安装this python package。不幸的是,由于排名不匹配,我遇到了编译错误。

已经报告了此软件包的错误here。错误报告说“最实用的解决方案似乎是将编译器标志 -fallow-argument-mismatch 添加到设置脚本中。”

我不明白该怎么做。 setup.py 脚本仅包含以下内容:

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 = "dabi@limitcycle.it",
    ext_modules = ext_modules
)

我把旗帜放在这里吗?我真的不知道。导致错误的文件在 src/r1mach.f

帮助表示赞赏!

【问题讨论】:

    标签: python numpy gcc fortran gfortran


    【解决方案1】:

    该修复已在您链接的软件中实现,在 adapt-to-gcc10 分支 https://bazaar.launchpad.net/~catastropeia/pyorthpol/adapt-to-gcc10/revision/68

    相关的命令就变成了

    ext_modules = [ Extension('orthpol_light',
                              glob.glob(os.path.join('src','*.f')),
                              extra_f77_compile_args=['-fallow-argument-mismatch']) ]
    

    【讨论】:

    • 顺便说一句,我真的很想知道为什么不能在 Cray T3 分支中通过 SMALL(1)LARGE(1)。不谈论在 Fortran 90 中的 epsilon、最近、间距、.. 的可用性。
    • 糟糕,没有看到那个提交。我对此也很陌生。感谢您指出这一点!!!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-08-15
    • 1970-01-01
    • 1970-01-01
    • 2013-08-10
    • 1970-01-01
    • 2021-10-04
    • 2014-05-26
    相关资源
    最近更新 更多