Hi all,
I am experiencing problems building the python module of quantlib. I have checked out the latest version of both quantlib and quantlib-python. I then built quantlib and installed it. I am using swig1.3.9 and python2.2 on Redhat linux 7.2. I ran makewrappers.py to generate the swig file. This ran through successfully. I am now trying to run "python2 setup.py build" but this returns a compile error complaining about limits that could not be found. The include statement is in /usr/local/include/ql/qldefines.hpp:146:22. This include just includes <limits>. What should I do to solve the error and get the python module built for quantlib? Any help would be appreciated. Regards Gerrit van Dyk ------------------------------------------------------------------------- This e-mail is intended only for the use of the individual or entity named above and may contain information that is confidential and privileged, proprietary to the company and protected by law. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. Opinions, conclusions and other information in this message that do not relate to the official business of our company shall be understood as neither given nor endorsed by it. |
At 11:02 AM 4/16/02 +0200, Gerrit Van Dyk wrote:
>I am now trying to run "python2 setup.py build" but this returns a compile >error complaining about limits that could not be found. >The include statement is in /usr/local/include/ql/qldefines.hpp:146:22. This >include just includes <limits>. Gerrit, I'll give it a shot. First of all, please take a look inside /usr/local/include/ql/config.hpp or wherever the QuantLib headers got installed and tell me whether there is a line inside reading #define HAVE_LIMITS 1 (note: LIMITS, not CLIMITS neither LIMITS_H) Oh, and another piece of info: which gcc version are you running? Later, Luigi |
In reply to this post by Gerrit Van Dyk-2
Luigi wrote:
> At 11:02 AM 4/16/02 +0200, Gerrit Van Dyk wrote: > >I am now trying to run "python2 setup.py build" but this > returns a compile > >error complaining about limits that could not be found. > >The include statement is in > /usr/local/include/ql/qldefines.hpp:146:22. This > >include just includes <limits>. > > Gerrit, > I'll give it a shot. First of all, please take a look inside > /usr/local/include/ql/config.hpp or wherever the QuantLib headers got > installed and tell me whether there is a line inside reading > #define HAVE_LIMITS 1 > (note: LIMITS, not CLIMITS neither LIMITS_H) > Oh, and another piece of info: which gcc version are you running? > Yes there is a line #define HAVE_LIMITS 1, I have attached the file for convenience ------------------------------------------------------------------------- This e-mail is intended only for the use of the individual or entity named above and may contain information that is confidential and privileged, proprietary to the company and protected by law. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. Opinions, conclusions and other information in this message that do not relate to the official business of our company shall be understood as neither given nor endorsed by it. config.hpp (2K) Download Attachment |
At 12:30 PM 4/16/02 +0200, Gerrit Van Dyk wrote:
>I am using gcc3(3.0.2) and g++3(3.0.2) > >Yes there is a line #define HAVE_LIMITS 1 Hmm. This should mean that configure *did* find <limits> during its tests. Ok, let's track this down. Can you check where limits is located in your system? Also, can you show me the full output of python setup.py build? Later, Luigi |
In reply to this post by Gerrit Van Dyk-2
>Ok, let's track this down. Can you check where limits is
>located in your >system? Also, can you show me the full output of python setup.py build? 1) limits is located in /usr/include/g++-v3/ as limits 2) Here is the output from: python2 setup.py build [gerrit@venus1 QuantLib-Python]$ python2 setup.py build running build running build_py not copying QuantLib/__init__.py (output up-to-date) not copying QuantLib/QuantLib.py (output up-to-date) not copying QuantLib/defaults.py (output up-to-date) running build_ext my_init_posix: changing gcc to g++ building 'QuantLib.QuantLibc' extension g++ -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/local/include -I/usr/include -I/usr/include/python2.2 -c QuantLib/quantlib_wrap.cpp -o build/temp.linux-i686-2.2/quantlib_wrap.o -I/usr/local/include -I/usr/local/include In file included from /usr/local/include/ql/quantlib.hpp:23, from QuantLib/quantlib_wrap.cpp:704: /usr/local/include/ql/qldefines.hpp:146:22: limits: No such file or directory error: command 'g++' failed with exit status 1 [gerrit@venus1 QuantLib-Python]$ Regards Gerrit ------------------------------------------------------------------------- This e-mail is intended only for the use of the individual or entity named above and may contain information that is confidential and privileged, proprietary to the company and protected by law. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. Opinions, conclusions and other information in this message that do not relate to the official business of our company shall be understood as neither given nor endorsed by it. |
In reply to this post by Gerrit Van Dyk-2
Ok, Thanks Luigi I seem to have found the missing "limits" problem. Although
I have environment variables set up for using my preferred compiler setup.py still picks up the incorrect compiler. I have an environment variable CC that points to gcc3 and CCC that points to g++3. For the normal make and GNU tools this seems to be sufficient to enable your preferred compiler. The distutils package however defaults to gcc and g++ Looking closer at the output of "python setup.py build" I realized that it was calling g++ and not g++3. The command just completed successful with a minor warning. I just ran "python2 setup.py test" this too went ok. Now I need to get into it and start playing. Thanks again. Regards Gerrit van Dyk ------------------------------------------------------------------------- This e-mail is intended only for the use of the individual or entity named above and may contain information that is confidential and privileged, proprietary to the company and protected by law. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. Opinions, conclusions and other information in this message that do not relate to the official business of our company shall be understood as neither given nor endorsed by it. |
At 02:36 PM 4/16/02 +0200, Gerrit Van Dyk wrote:
>The command just completed successful with a minor warning. Gerrit, glad to hear that. I assume that the warning is In function `char* SWIG_UnpackData(char*, void*, int)': warning: `unsigned char uu' might be used uninitialized in this function in which case you can safely ignore it. Have fun, Luigi |
Free forum by Nabble | Edit this page |