Re: Failure to build quantlib-python on Mandrake 9.1
Posted by
Dirk Eddelbuettel on
URL: http://quantlib.414.s1.nabble.com/Failure-to-build-quantlib-python-on-Mandrake-9-1-tp2670p2671.html
On Wed, Sep 17, 2003 at 01:30:35AM +0200, Thomas Pl?mpe wrote:
> Hi,
>
> I have installed QuantLib-0.3.3 and swig-1.3.11 on a Mandrake 9.1
> system. Unfortunately I encountered an error trying to build the
> QuantLib-Python-0.3.3 wrappers:
>
> running wrap
> Generating Python bindings for QuantLib...
> ./QuantLib/SWIG/common.i:21. Unable to find 'stl.i'
>
> I assume under these circumstance (i.e. without the wrappers) building
> the project is out of question, but tried anyway with this g++
> (gcc-3.2.2) failure:
>
> running build
> running build_py
> creating build
> creating build/lib.linux-i686-2.2
> creating build/lib.linux-i686-2.2/QuantLib
> copying QuantLib/__init__.py -> build/lib.linux-i686-2.2/QuantLib
> not copying QuantLib/__init__.py (output up-to-date)
> copying QuantLib/QuantLib.py -> build/lib.linux-i686-2.2/QuantLib
> running build_ext
> building 'QuantLib._QuantLib' extension
> creating build/temp.linux-i686-2.2
> g++ -DNDEBUG -O2 -fomit-frame-pointer -pipe -march=i586 -mcpu=pentiumpro -fPIC -I/usr/local/include -I/usr/local/include -I/usr/include/python2.2 -c QuantLib/quantlib_wrap.cpp -o build/temp.linux-i686-2.2/quantlib_wrap.o
> QuantLib/quantlib_wrap.cpp:945:6: #error using an old version of QuantLib, please update
Do you have an older version installed?
> QuantLib/quantlib_wrap.cpp: In function `std::string Array___str__(QuantLib::Array*)':
> QuantLib/quantlib_wrap.cpp:1096: no matching function for call to `QuantLib::ArrayFormatter::toString(double*, double*)'
> /usr/local/include/ql/dataformatters.hpp:53: candidates are: static std::string QuantLib::ArrayFormatter::toString(const QuantLib::Array&, int = 6, int = 0, unsigned int = std::numeric_limits<int>::max()())
> QuantLib/quantlib_wrap.cpp: In function `int Period___cmp__(QuantLib::Period*, const QuantLib::Period&)':
> QuantLib/quantlib_wrap.cpp:1646: no match for `QuantLib::Period& < const QuantLib::Period&' operator
> [...]
> QuantLib/quantlib_wrap.cpp:52648: parse error before `)' token
> error: command 'g++' failed with exit status 1
>
> Any ideas what I could do in order to get it compiled?
Works rather flawlessly for me with the Debian builds.
I just do
CC="$(cxxcompiler)" \
CXX="$(cxxcompiler)" \
CFLAGS="$(compilerflags)" \
CXXFLAGS="$(compilerflags)" \
$(PYTHON) setup.py build
and
$(PYTHON) setup.py install --prefix=$(debtmp)/usr
I used to use 2.2, and have now switched to 2.3.
Dirk
--
Those are my principles, and if you don't like them... well, I have others.
-- Groucho Marx