Closed BlueCollarWorker closed 10 years ago
@BlueCollarWorker What is the output of otool -L
on one of the built extensions.
Here is mine on the currency.so
DP-MBP:quantlib dpinte (fix-win-build) $ otool -L currency.so
currency.so:
/usr/local/lib/libQuantLib.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
Here is what I get:
otool -L currency.so
currency.so:
/opt/local/lib/libQuantLib.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
I'll try to compile one module with few dependencies directly and see if I get the same.
2014-09-16 18:07 GMT+02:00 Didrik Pinte notifications@github.com:
@BlueCollarWorker https://github.com/BlueCollarWorker What is the output of otool -L on one of the built extensions.
Here is mine on the currency.so
DP-MBP:quantlib dpinte (fix-win-build) $ otool -L currency.so currency.so: /usr/local/lib/libQuantLib.0.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
— Reply to this email directly or view it on GitHub https://github.com/enthought/pyql/issues/65#issuecomment-55767317.
@BlueCollarWorker The flat namespace just reminded me of something. How did you compile QuantLib? You need to make sure that you used the correct stdlib with clang otherwise, it will not work. From the installation notes (http://quantlib.org/install/macosx.shtml):
A note on Mac OS X 10.9 (Mavericks)
Users have reported linking problems under Mac OS X 10.9; the solution (thanks to Albert Azout for
pointing it out) seems to be to set the environment flags CXXFLAGS and LDFLAGS to
-stlib=libstdc++ -mmacosx-version-min=10.6
before compiling.
I thought I followed the very same instructions. QuantLib examples work, so it seems to be installed ok. I will nonetheless try to re-install it using http://stackoverflow.com/questions/23591929/installing-quantlib-on-ios-10-9 to make sure flags are set appropriately.
Just got it to work...
I installed all from scratch. In my first attempt, I installed boost using brew, but now from source. I also noticed that the INCLUDE_DIRS in the setup file had '..sources/boost/1_55_0' whereas my boost version is 1_56_0, so I changed the 55 to 56. In any case, it seems to be working well now. Thank's a lot for your help.
Great! Closing now.
Hi guys,
I have an install issue on Mac (Mac OS 10.9.4). I've installed QuantLib 1.3 and it works fine (example runs). Its located under opt/local, so I've added the opt/local/include and opt/local/lib directories into the setup.py file.
I then 'make build' and 'make install', and the pyql seems to install under my site-packages folder. It installs under a folder called quantlib-0.1-py2.7-macosx-10.5-x86_64.egg (bunch of .so files under a subfolder called quantlib). If I try to import currency (or any other module) it does not find it. However, if I supplement the pythonpath to go insider the folder mentioned above, and then import currency, I get the following message:
ImportError: dlopen(/Users/barnarson/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-macosx-10.5-x86_64.egg/quantlib/currency.so, 2): Symbol not found: __ZN8QuantLib8Currency4DataC1ERKSsS3_iS3_S3_iRKNS_8RoundingES3RKS0 Referenced from: /Users/barnarson/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-macosx-10.5-x86_64.egg/quantlib/currency.so Expected in: flat namespace in /Users/barnarson/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-macosx-10.5-x86_64.egg/quantlib/currency.so
Can you give me any hint as to what might have gone wrong?
P.S. I appreciate your work, the project is outstanding.