Quantlib 1.8 Python SWIG on Linux/Python 3.5.1

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Quantlib 1.8 Python SWIG on Linux/Python 3.5.1

alihassani

Has anyone got this up and running? After running

python setup.py wrap
successfully

 

I get the following error when running:

python setup.py build


running build
running build_py
copying QuantLib/QuantLib.py -> build/lib.linux-x86_64-3.5/QuantLib
running build_ext
building 'QuantLib._QuantLib' extension
g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Ws
trict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/
usr/include/python3.5m -I/usr/include -c QuantLib/quantlib_wrap.cpp -o build/temp.linux-x8
6_64-3.5/QuantLib/quantlib_wrap.o -Wno-unused
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
QuantLib/quantlib_wrap.cpp: In function ‘std::vector<boost::shared_ptr<QuantLib::BondHelpe
r> > convert_bond_helpers(const std::vector<boost::shared_ptr<QuantLib::BootstrapHelper<Qu
antLib::YieldTermStructure> > >&)
’:
QuantLib/quantlib_wrap.cpp:14709:20: warning: comparison between signed and unsigned integ
er expressions [
-Wsign-compare]
    for (int i=0;
i<helpers.size(); ++i)
                  
~^~~~~~~~~~~~~~~
{standard input}: Assembler messages:
{standard input}:2372708: Warning: end of file not at end of a line; newline inserted
{standard input}:2374015: Error: unknown pseudo-op: `.lb'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
error: command 'g++' failed with exit status 4



------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Quantlib 1.8 Python SWIG on Linux/Python 3.5.1

alihassani

If I just run ./configure and make -C Python I get:

 

creating build/temp.linux-x86_64-3.5/QuantLib
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Ws
trict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/
usr/include/python3.5m -I/usr/include -c QuantLib/quantlib_wrap.cpp -o build/temp.linux-x8
6_64-3.5/QuantLib/quantlib_wrap.o -Wno-unused -g -O2 -fno-strict-aliasing -Wno-unused -Wno
-uninitialized -Wno-sign-compare -Wno-write-strings
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not fo
r C++
{standard input}: Assembler messages:
{standard input}:1133226: Warning: end of file not at end of a line; newline inserted
{standard input}:1134159: Error: invalid operands (*UND* and .gcc_except_table sections) f
or `-'
{standard input}:1134162: Error: invalid operands (*UND* and .gcc_except_table sections) f
or `-'
gcc: internal compiler error: Killed (program cc1plus)

On Friday, May 20, 2016 12:57:13 AM EDT Ali Hassani wrote:

Has anyone got this up and running? After running

python setup.py wrap
successfully

 

I get the following error when running:

python setup.py build


running build
running build_py
copying QuantLib/QuantLib.py -> build/lib.linux-x86_64-3.5/QuantLib
running build_ext
building 'QuantLib._QuantLib' extension
g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Ws
trict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/
usr/include/python3.5m -I/usr/include -c QuantLib/quantlib_wrap.cpp -o build/temp.linux-x8
6_64-3.5/QuantLib/quantlib_wrap.o -Wno-unused
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
QuantLib/quantlib_wrap.cpp: In function ‘std::vector<boost::shared_ptr<QuantLib::BondHelpe
r> > convert_bond_helpers(const std::vector<boost::shared_ptr<QuantLib::BootstrapHelper<Qu
antLib::YieldTermStructure> > >&)
’:
QuantLib/quantlib_wrap.cpp:14709:20: warning: comparison between signed and unsigned integ
er expressions [
-Wsign-compare]
    for (int i=0;
i<helpers.size(); ++i)
                  
~^~~~~~~~~~~~~~~
{standard input}: Assembler messages:
{standard input}:2372708: Warning: end of file not at end of a line; newline inserted
{standard input}:2374015: Error: unknown pseudo-op: `.lb'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
error: command 'g++' failed with exit status 4





------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Quantlib 1.8 Python SWIG on Linux/Python 3.5.1

Luigi Ballabio
For what is worth, I just compiled it successfully in a Docker container based on Ubuntu 16.04 (Python 3.5.1, gcc 5.3.1).  Let me know if you manage to make it work.

Luigi


On Fri, May 20, 2016 at 7:20 AM Ali Hassani <[hidden email]> wrote:

If I just run ./configure and make -C Python I get:

 

creating build/temp.linux-x86_64-3.5/QuantLib
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Ws


trict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/
usr/include/python3.5m -I/usr/include -c QuantLib/quantlib_wrap.cpp -o build/temp.linux-x8

6_64-3.5/QuantLib/quantlib_wrap.o -Wno-unused -g -O2 -fno-strict-aliasing -Wno-unused -Wno
-uninitialized -Wno-sign-compare -Wno-write-strings

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not fo


r C++
{standard input}: Assembler messages:
{standard input}:1133226: Warning: end of file not at end of a line; newline inserted
{standard input}:1134159: Error: invalid operands (*UND* and .gcc_except_table sections) f
or `-'
{standard input}:1134162: Error: invalid operands (*UND* and .gcc_except_table sections) f
or `-'
gcc: internal compiler error: Killed (program cc1plus)

On Friday, May 20, 2016 12:57:13 AM EDT Ali Hassani wrote:

Has anyone got this up and running? After running

python setup.py wrap
successfully

 

I get the following error when running:

python setup.py build


running build
running build_py
copying QuantLib/QuantLib.py -> build/lib.linux-x86_64-3.5/QuantLib
running build_ext
building 'QuantLib._QuantLib' extension
g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Ws
trict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/
usr/include/python3.5m -I/usr/include -c QuantLib/quantlib_wrap.cpp -o build/temp.linux-x8
6_64-3.5/QuantLib/quantlib_wrap.o -Wno-unused
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
QuantLib/quantlib_wrap.cpp: In function ‘std::vector<boost::shared_ptr<QuantLib::BondHelpe
r> > convert_bond_helpers(const std::vector<boost::shared_ptr<QuantLib::BootstrapHelper<Qu
antLib::YieldTermStructure> > >&)
’:
QuantLib/quantlib_wrap.cpp:14709:20: warning: comparison between signed and unsigned integ
er expressions [
-Wsign-compare]
    for (int i=0;
i<helpers.size(); ++i)
                  
~^~~~~~~~~~~~~~~
{standard input}: Assembler messages:
{standard input}:2372708: Warning: end of file not at end of a line; newline inserted
{standard input}:2374015: Error: unknown pseudo-op: `.lb'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
error: command 'g++' failed with exit status 4




------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Quantlib 1.8 Python SWIG on Linux/Python 3.5.1

Jay-Jay-D
Hi there,

I'm trying to install Quanlib-Python in a Fedora23 with Anaconda as Python 3 distribution.

I followed all the steps in the installation page but when I tried: make -C Python --help throws cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ and got stuck.

Same with python setup.py build

Any hint?

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Quantlib 1.8 Python SWIG on Linux/Python 3.5.1

Luigi Ballabio
This should be just a warning. Are you (or Anaconda) passing any flags to the compiler that causes it to treat warnings as errors?

Luigi

On Thu, Jul 14, 2016 at 10:41 AM Jay-Jay-D <[hidden email]> wrote:
Hi there,

I'm trying to install Quanlib-Python in a Fedora23 with Anaconda as Python 3
distribution.

I followed all the steps in the installation page but when I tried: *make -C
Python --help* throws *cc1plus: warning: command line option
‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++* and got stuck.

Same with *python setup.py build*

Any hint?

Thanks in advance.




--
View this message in context: http://quantlib.10058.n7.nabble.com/Quantlib-1-8-Python-SWIG-on-Linux-Python-3-5-1-tp17463p17594.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Quantlib 1.8 Python SWIG on Linux/Python 3.5.1

Jay-Jay-D
How can I know if I or Anaconda  are passing any flags to the compiler that causes it to treat warnings as errors?

By the way, I don't think the warning is treated as error because it doesn't kill the make, just makes it hang. When I check the make  status with htop, after the warning is thrown the make start to consume more and more memory (even 2 GB in swap), but the status is 'D' (sleeping in disk).
Reply | Threaded
Open this post in threaded view
|

Re: Quantlib 1.8 Python SWIG on Linux/Python 3.5.1

Luigi Ballabio
Oh, ok. You're right, an error would stop the build immediately. The build is probably just taking a lot of memory (the wrappers are very large) and your computer is swapping. Decreasing the optimization level might help the compiler use less resources; you can try running

    CXXFLAGS='-O0' python setup.py build

and see if it works.

Luigi

On Fri, Jul 15, 2016 at 10:29 AM Jay-Jay-D <[hidden email]> wrote:
How can I know if I or Anaconda / are passing any flags to the compiler that
causes it to treat warnings as errors/?

By the way, I don't think the warning is treated as error because it doesn't
kill the make, just makes it hang. When I check the make  status with htop,
after the warning is thrown the make start to consume more and more memory
(even 2 GB in swap), but the status is 'D' (sleeping in disk).



--
View this message in context: http://quantlib.10058.n7.nabble.com/Quantlib-1-8-Python-SWIG-on-Linux-Python-3-5-1-tp17463p17597.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Quantlib 1.8 Python SWIG on Linux/Python 3.5.1

Jay-Jay-D
I tried with your suggestion, but the outcome is the same.

I also tried in in the same Fedora but with out Anaconda, and same problem.

Maybe my machine is to small? It has only 2 GB RAM.
Reply | Threaded
Open this post in threaded view
|

Re: Quantlib 1.8 Python SWIG on Linux/Python 3.5.1

Luigi Ballabio
Apologies for the delay. Yes, more RAM would help...

On Sat, Jul 16, 2016 at 4:10 PM Jay-Jay-D <[hidden email]> wrote:
I tried with your suggestion, but the outcome is the same.

I also tried in in the same Fedora but with out Anaconda, and same problem.

Maybe my machine is to small? It has only 2 GB RAM.



--
View this message in context: http://quantlib.10058.n7.nabble.com/Quantlib-1-8-Python-SWIG-on-Linux-Python-3-5-1-tp17463p17603.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users