QuantLib icon indicating copy to clipboard operation
QuantLib copied to clipboard

QuantLib Intraday Python - OSX

Open samirzamarialai opened this issue 3 years ago • 7 comments

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.

samirzamarialai avatar Sep 15 '22 15:09 samirzamarialai

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.

boring-cyborg[bot] avatar Sep 15 '22 15:09 boring-cyborg[bot]

What flags (if any) did you pass to ./configure?

lballabio avatar Sep 15 '22 15:09 lballabio

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

samirzamarialai avatar Sep 15 '22 15:09 samirzamarialai

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?

lballabio avatar Sep 15 '22 15:09 lballabio

It was something I tried, but it does not have an effect. This is the latest version (1.27)

samirzamarialai avatar Sep 15 '22 16:09 samirzamarialai

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_*)

lballabio avatar Sep 15 '22 16:09 lballabio

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.

lballabio avatar Sep 15 '22 16:09 lballabio

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.

github-actions[bot] avatar Nov 15 '22 02:11 github-actions[bot]

This issue was automatically closed because it has been stalled for two weeks with no further activity.

github-actions[bot] avatar Nov 30 '22 02:11 github-actions[bot]