1

Hi fellow QuantLib users,

I am trying to install QuantLib on my iMac running Big Sur, following the (somewhat outdated?) steps here: https://www.quantlib.org/install/macosx.shtml

Issue:

Despite having installed boost, I am getting the following error:

checking for Boost development files... no
configure: error: Boost development files not found

Does anyone have an idea why I am getting this?

Background:

I ran brew install boost, and verified that

  • under /usr/local/lib are boost library files such as libboost_chrono-mt.a symlinked to a location in ../Cellar/boost/1.75.0/lib/
  • the symlink /usr/local/include/boost points to header files in /usr/local/Cellar/boost/1.75.0/include/boost

the configure command I ran was:

./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++’

just to be sure, I also ran the following, but got the same error:

./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++’

Thanks in advance for any insight!!!

############### Reply to Luigi's suggestion Below ################

I looked into config.log as you suggested, and there are bunch of failures but none mentions boost:

First one is:

#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

This --> from my presumably incorrect guess of the modification of the original instruction needed for Big Sur (btw, any idea what the correct modification should be?)

There are 3 more types of failures (each get repeated), which are:

#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

Does any of these give you a clue?

  • May you look into the generated `config.log` file? It might show the actual error the compiler is reporting. – Luigi Ballabio Dec 21 '20 at 09:05
  • Thanks Luigi! I am having trouble putting things in the right format as a comment... lemme try putting my reply in my original post – MacDeveloperNewbie Dec 21 '20 at 19:00
  • #3 is okay because it has to be "nonexistent" :-) https://unix.stackexchange.com/questions/360506/what-is-ac-nonexistent-h – Polluks Feb 27 '21 at 14:03

2 Answers2

0

If you ran your configure command exactly as you copied it in your question, i.e.,

./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++’

you're closing what's supposed to be CXXFLAGS with an , not an '. This means that it's not really closed, and it runs to the next '; you can see that in the formatting above, which displays the string in green. The same goes for the that's supposed to close LDFLAGS. Instead, use

./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++'

Now, to make sure this is not an issue for others: I've checked the QuantLib site, and the command seems to be correct there. I guess either your browser or your editor tried to do some fancy formatting of the quotes. It would be useful if you wrote how you copied the command from the instructions to the terminal, so we can warn about it. Thanks!

Luigi Ballabio
  • 4,128
  • 21
  • 29
-1

In my case, it is due to g++ not installed, if you check the error before "configure: error: Boost development files not found" in the screen, maybe you will find g++ error. After "apt install g++", everything went through.