-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Compilation Error on MacOS High Sierra #229
Comments
It's probably a missing path issue somewhere in setup.py. In date.cpp do you have a line saying #include "ql/time/date.hpp" ? |
Yes, on line 620 in date.cpp, I have the following include: The compiler command is as follows (from a different machine with MacOS on which I get the same error): |
Any chance that you haven't defined |
Thank you very much for your advice @thrasibule and @dpinte! I had indeed not defined this option. The name of the option in homebrew is "--with-intraday" (rather than "--enable-intraday") and this enables QL_HIGH_RESOLUTION_DATE. The compilation goes through, but when running the unit tests via python -m unittest discover -v This happens on two macs I have tried it on (one with Sierra and the other one with High Sierra). Any idea what might be causing this? Thanks, Michael |
BTW: I am getting these clang warnings when compiling pyql: clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated] |
The segfaults happens right away?? no tests at all go through? from quantlib.time.date import today
today() |
If I run the code above in the Python interpreter, I get the following error:
This happens on both Macs. I am going to try this on a third Mac which has Python installed via homebrew rather than Anaconda. |
Ok, unit tests are running on the third Mac that does not use Anaconda. I am getting the same clang warnings: clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated] So these can not be causing the problem on the other computers. Any ideas what can be going on? |
A few unit tests are failing but this is likely not connected: ======================================================================
|
@michaelnowotny do you know how brew build quantlib? You need to make sure it has been built with This message seem to indicate it's not the case:
|
Hi @dpinte, I do not know specifically know how quantlib is built in homebrew. The clang error message appears on all three macs I have tried it, including the one where everything works. The issue seems to be related to Anaconda. The issue appears on both computers which use Anaconda. Furthermore, I have uninstalled Anaconda on one of the Macs and installed Python via hombrew. After that everything works. So there must be some issue with Anaconda. I will uninstall Python from homebrew and reinstall Anaconda. Who knows, perhaps the installation had been referring to an out-of-date compiler, even though I kept conda up-to-date. But at this point, the problem seems to be unlikely to be causes by pyql or quantlib. Thank you both for your help! Michael |
Installed Anaconda again from scratch and the segmentation fault reappears. This is very likely an issue with Anaconda on the Mac. |
@michaelnowotny I can suggest using edm which is known to work as expected (https://www.enthought.com/product/enthought-deployment-manager). |
Thank you @dpinte. I will take a closer look. It is currently not clear to me if this will work with Anaconda or is an alternative to Anaconda. For the time being, I can simply keep using hombrew on Mac. Thanks again for your help! |
Dear pyql developers,
I am experiencing the following compilation error on my platform:
quantlib/time/date.cpp:1722:80: error: no type named 'Hour' in namespace
'QuantLib'
...PyObject* __Pyx_PyInt_From_QuantLib_3a__3a_Hour(QuantLib::Hour value);
~~~~~~~~~~^
quantlib/time/date.cpp:1725:82: error: no type named 'Minute' in namespace
'QuantLib'
...PyObject* __Pyx_PyInt_From_QuantLib_3a__3a_Minute(QuantLib::Minute value);
~~~~~~~~~~^
quantlib/time/date.cpp:1728:82: error: no type named 'Second' in namespace
'QuantLib'
...PyObject* __Pyx_PyInt_From_QuantLib_3a__3a_Second(QuantLib::Second value);
~~~~~~~~~~^
quantlib/time/date.cpp:1731:87: error: no type named 'Millisecond' in namespace
'QuantLib'
...PyObject* __Pyx_PyInt_From_QuantLib_3a__3a_Millisecond(QuantLib::Millise...
~~~~~~~~~~^
quantlib/time/date.cpp:1734:87: error: no type named 'Microsecond' in namespace
'QuantLib'
...PyObject* __Pyx_PyInt_From_QuantLib_3a__3a_Microsecond(QuantLib::Microse...
~~~~~~~~~~^
quantlib/time/date.cpp:1758:32: error: no type named 'Hour' in namespace
'QuantLib'
static CYTHON_INLINE QuantLib::Hour __Pyx_PyInt_As_QuantLib_3a__3a_Hour(...
~~~~~~~~~~^
quantlib/time/date.cpp:1761:32: error: no type named 'Minute' in namespace
'QuantLib'
static CYTHON_INLINE QuantLib::Minute __Pyx_PyInt_As_QuantLib_3a__3a_Min...
~~~~~~~~~~^
quantlib/time/date.cpp:1764:32: error: no type named 'Second' in namespace
'QuantLib'
static CYTHON_INLINE QuantLib::Second __Pyx_PyInt_As_QuantLib_3a__3a_Sec...
~~~~~~~~~~^
quantlib/time/date.cpp:1767:32: error: no type named 'Millisecond' in namespace
'QuantLib'
static CYTHON_INLINE QuantLib::Millisecond __Pyx_PyInt_As_QuantLib_3a__3...
~~~~~~~~~~^
quantlib/time/date.cpp:1770:32: error: no type named 'Microsecond' in namespace
'QuantLib'
static CYTHON_INLINE QuantLib::Microsecond __Pyx_PyInt_As_QuantLib_3a__3...
~~~~~~~~~~^
quantlib/time/date.cpp:5119:13: error: no type named 'Hour' in namespace
'QuantLib'
QuantLib::Hour __pyx_t_17;
The text was updated successfully, but these errors were encountered: