【问题标题】:configure: error: gmp.h header not found when building glpk配置:错误:构建 glpk 时未找到 gmp.h 标头
【发布时间】:2017-02-17 18:54:20
【问题描述】:

当尝试在 Mac OS X 上构建 glpk-4.61 时

./configure --with-gmp

我收到以下错误消息:

checking gmp.h usability... no checking gmp.h presence... no checking for gmp.h... no configure: error: gmp.h header not found

安装 GMP 没有问题,头文件 gmp.h 按预期存在于 /usr/local/include 中。

【问题讨论】:

  • 通常会有一个文件config.log,您可以在其中看到 configure 如何尝试确定 gmp.h 是否存在以及如何失败。这应该会告诉您需要解决的问题。

标签: macos build configure gmp glpk


【解决方案1】:

config.log 告诉我的只是我已经知道的,gcc 找不到 gmp.h(在尝试预处理 conftest.c 时)。但是,可以使用cpp -v 检查c 预处理器使用了哪些包含路径,结果是Xcode 把它们弄得一团糟。解决方案是运行xcode-select --install,它添加了通常的包含路径。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-04-19
    • 1970-01-01
    • 2021-06-17
    • 2020-03-07
    • 2017-05-24
    • 2021-07-22
    • 1970-01-01
    相关资源
    最近更新 更多