Re: quantlib-python compile error
Posted by Brad-11 on
URL: http://quantlib.414.s1.nabble.com/quantlib-python-compile-error-tp4088p4092.html
Dirk Eddelbuettel <edd <at> debian.org> writes:
>
> Can you try gcc 3.4.* or 4.0.*? Works for the Debian packages I maintain ...
>
I get a slightly different error message with gcc 3.4.4:
$ python setup.py build
running build
running build_py
running build_ext
building 'QuantLib._QuantLib' extension
g++ -fno-strict-aliasing -DNDEBUG -fPIC -I/usr/local/include
-I/usr/include/python2.3 -c QuantLib/quantlib_wrap.cpp -o
build/temp.linux-i686-2.3/QuantLib/quantlib_wrap.o -Wno-unused
In file included from /usr/local/include/ql/PricingEngines/Barrier/all.hpp:24,
from /usr/local/include/ql/PricingEngines/all.hpp:31,
from /usr/local/include/ql/quantlib.hpp:41,
from QuantLib/quantlib_wrap.cpp:1136:
/usr/local/include/ql/PricingEngines/Barrier/analyticbarrierengine.hpp:56:
error: expected unqualified-id before "asm"
error: command 'g++' failed with exit status 1
As you can see, it still fails. I thought about where the "asm" comes from, and
thought that maybe it is something to do with the preprocessing. So I ran the
above g++ line, but with -E instead of -c.
It seems that this is the offending bit:
Volatility volatility() const;
Real __asm__ __volatile__ ("" : : : "memory") const;
Real rebate() const;
Unfortunately, I have no idea why the preprocessor inserts that bit there. Is
"barrier()" a macro somewhere?
What do you think?
Brad