【发布时间】:2021-03-30 17:11:01
【问题描述】:
您好 QuantLib 用户,
我正在尝试在运行 Big Sur 的 iMac 上安装 QuantLib,按照此处的(有点过时?)步骤:https://www.quantlib.org/install/macosx.shtml
问题:
尽管安装了 boost,但我收到以下错误:
checking for Boost development files... no
configure: error: Boost development files not found
有人知道我为什么会得到这个吗?
背景:
我跑了brew install boost,并验证了这一点
- 在
/usr/local/lib下是boost 库文件,例如libboost_chrono-mt.a符号链接到../Cellar/boost/1.75.0/lib/中的位置 - 符号链接
/usr/local/include/boost指向/usr/local/Cellar/boost/1.75.0/include/boost中的头文件
我运行的配置命令是:
./configure --disable-shared --with-boost-include=/usr/local/include/ --with-boost-lib=/usr/local/lib/ --prefix=/usr/local/ CXXFLAGS='-O3 -stdlib=libc++ -mmacosx-version-min=11’ LDFLAGS='-stdlib=libc++’
为了确定,我也运行了以下命令,但得到了同样的错误:
./configure --disable-shared --with-boost-include=/usr/local/Cellar/boost/1.75.0/include/ --with-boost-lib=/usr/local/Cellar/boost/1.75.0/lib/ --prefix=/usr/local/ CXXFLAGS='-O3 -stdlib=libc++ -mmacosx-version-min=11’ LDFLAGS='-stdlib=libc++’
提前感谢任何见解!!!
###############下面回复Luigi的建议################
我按照你的建议查看了 config.log,有一堆失败但没有提到boost:
第一个是:
#1
configure:4324: g++ -c -O3 -stdlib=libc++ -mmacosx-version-min=11’ LDFLAGS=-stdlib=libc++’ -I/usr/local/include conftest.cpp >&5
clang: error: no such file or directory: 'LDFLAGS=-stdlib=libc++’'
clang: error: invalid version number in '-mmacosx-version-min=11’'
configure:4324: $? = 1
这 --> 我对 Big Sur 所需的原始指令的修改可能不正确的猜测(顺便说一句,知道正确的修改应该是什么吗?)
还有另外 3 种失败类型(每种都会重复),它们是:
#2
configure:4290: g++ -qversion >&5
clang: error: unknown argument '-qversion'; did you mean '--version'?
clang: error: no input files
configure:4301: $? = 1
#3
configure:4604: gcc -E -I/usr/local/include conftest.c
conftest.c:11:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
configure:4604: $? = 1
#4
configure:6395: ar cru libconftest.a @conftest.lst >&5
ar: @conftest.lst: No such file or directory
configure:6398: $? = 1
这些有没有给你一些线索?
【问题讨论】:
-
您可以查看生成的
config.log文件吗?它可能会显示编译器报告的实际错误。 -
谢谢路易吉!我无法将内容以正确的格式作为评论...让我尝试将我的回复放在我的原始帖子中
-
#3 没问题,因为它必须是“不存在的”:-) unix.stackexchange.com/questions/360506/…
标签: boost quantlib macos-big-sur