configure: error: gmp.h header not found when building glpk

时间:2017-02-16 22:57:27

标签: macos build configure gmp glpk

When trying to build glpk-4.61 on Mac OS X with

./configure --with-gmp

I get the following error message:

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

There were no issues installing GMP, and the header file gmp.h is present in /usr/local/include as expected.

1 个答案:

答案 0 :(得分:1)

config.log告诉我的不过是我已经知道的,gcc无法找到gmp.h(当试图预处理conftest.c时)。但是,可以使用cpp -v来检查c预处理器使用哪些包含路径,结果发现Xcode弄乱了它们。解决方案是运行xcode-select --install,这会添加通常的包含路径。