QuantLib
QuantLib copied to clipboard
QuantLib Intraday Python - OSX
Hi,
I was trying to setup the library with intraday support using Python. However I run into some issues when compiling on a Macbook M1. I get the following error after running the 'make' command.
Undefined symbols for architecture arm64:
"_PrimitivePolynomials", referenced from:
LowDiscrepancyTest::testPolynomialsModuloTwo() in lowdiscrepancysequences.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [quantlib-test-suite] Error 1
make: *** [all-recursive] Error 1
Cross post : https://stackoverflow.com/questions/73727928/quantlib-mac-osx-ld-symbols-not-found-for-architecture-arm64
Any help is appreciated.
Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.
What flags (if any) did you pass to ./configure?
./configure --disable-shared --enable-static --with-boost-include=/opt/homebrew/Cellar/boost/ \
--with-boost-lib=/opt/homebrew/Cellar/boost/1.79.0_2/include/boost/algorithm --prefix=/usr/local/ \
--enable-intraday CXXFLAGS='-O2 -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.9 -target arm64-apple-darwin20.2.0' \
LDFLAGS='-stdlib=libc++ -mmacosx-version-min=10.9'
Is the -target arm64-apple-darwin20.2.0 necessary? (Unfortunately I don't have a M1 to try it)
Also, is this 1.27 or an earlier version?
It was something I tried, but it does not have an effect. This is the latest version (1.27)
Maybe unrelated, but the --with-boost-lib=/opt/homebrew/Cellar/boost/1.79.0_2/include/boost/algorithm looks strange. I would have expected --with-boost-lib=/opt/homebrew/Cellar/boost/1.79.0_2/lib which should be the location of the libs (the various libboost_*)
Another couple of things you might try is to pass to -mmacosx-version-min your actual Mac OS version, or even not pass -stdlib and -mmacosx-version-min at all.
This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.
This issue was automatically closed because it has been stalled for two weeks with no further activity.