Building SWIG wrappers on OSX

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

Building SWIG wrappers on OSX

newbie73
When building SWIG wrappers on XP, it seems that the compiler uses the binary for QuantLib that has already been built, however, building on OSX appears to re-build the entire QuantLib package even after seting QL_DIR to my current QuantLib installation directory.

Any ideas on how to get this process to execute faster?
Reply | Threaded
Open this post in threaded view
|

Re: Building SWIG wrappers on OSX

Luigi Ballabio
On Mon, 2007-09-17 at 15:21 -0700, newbie73 wrote:
> When building SWIG wrappers on XP, it seems that the compiler uses the binary
> for QuantLib that has already been built, however, building on OSX appears
> to re-build the entire QuantLib package even after seting QL_DIR to my
> current QuantLib installation directory.

Sounds strange to me---the SWIG wrappers assume that the library is
precompiled. How did you compile them? I mean, with which commands?

Luigi


--

Use every man after his desert, and who shall scape whipping?
-- Hamlet, Act II, scene II



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Building SWIG wrappers on OSX

newbie73
I used ./configure path-to-boost, path-to-boost-lib
then ./build install

the libs were installed in /usr/local/lib


Luigi Ballabio wrote
On Mon, 2007-09-17 at 15:21 -0700, newbie73 wrote:
> When building SWIG wrappers on XP, it seems that the compiler uses the binary
> for QuantLib that has already been built, however, building on OSX appears
> to re-build the entire QuantLib package even after seting QL_DIR to my
> current QuantLib installation directory.

Sounds strange to me---the SWIG wrappers assume that the library is
precompiled. How did you compile them? I mean, with which commands?

Luigi


--

Use every man after his desert, and who shall scape whipping?
-- Hamlet, Act II, scene II



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Building SWIG wrappers on OSX

Luigi Ballabio
On Wed, 2007-09-19 at 05:28 -0700, newbie73 wrote:
> I used ./configure path-to-boost, path-to-boost-lib
> then ./build install
>
> the libs were installed in /usr/local/lib

Sorry---I meant, how did you compile the SWIG wrappers?

Luigi



--

Better to remain silent and be thought a fool than to speak out and
remove all doubt.
-- Abraham Lincoln



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Building SWIG wrappers on OSX

newbie73
./python setup.py wrap



Luigi Ballabio wrote
On Wed, 2007-09-19 at 05:28 -0700, newbie73 wrote:
> I used ./configure path-to-boost, path-to-boost-lib
> then ./build install
>
> the libs were installed in /usr/local/lib

Sorry---I meant, how did you compile the SWIG wrappers?

Luigi



--

Better to remain silent and be thought a fool than to speak out and
remove all doubt.
-- Abraham Lincoln



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Building SWIG wrappers on OSX

Luigi Ballabio
On Wed, 2007-09-19 at 05:49 -0700, newbie73 wrote:
> ./python setup.py wrap

Followed by "python setup.py build", I guess. That recompiles the
wrappers, i.e., quantlib_wrap.cpp (which might be a long process) but
doesn't recompile the library.

Luigi


--

The economy depends about as much on economists as the weather does on
weather forecasters.
-- Jean-Paul Kauffmann



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Building SWIG wrappers on OSX

newbie73
So then ... why does it take so long?  My mac isn't *that* old, it's a dual core 1.8 processor with 1gb ram.  On my XP machine, the build of the wrappers takes about 1 minute.  With my Mac, it takes about 6-8 hours.  Something's odd ... for the build to take that long



Luigi Ballabio wrote
On Wed, 2007-09-19 at 05:49 -0700, newbie73 wrote:
> ./python setup.py wrap

Followed by "python setup.py build", I guess. That recompiles the
wrappers, i.e., quantlib_wrap.cpp (which might be a long process) but
doesn't recompile the library.

Luigi


--

The economy depends about as much on economists as the weather does on
weather forecasters.
-- Jean-Paul Kauffmann



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Building SWIG wrappers on OSX

Luigi Ballabio
On Wed, 2007-09-19 at 05:59 -0700, newbie73 wrote:
> So then ... why does it take so long?  My mac isn't *that* old, it's a dual
> core 1.8 processor with 1gb ram.  On my XP machine, the build of the
> wrappers takes about 1 minute.  With my Mac, it takes about 6-8 hours.
> Something's odd ... for the build to take that long

When you run setup.py build, which command line gets executed? (setup.py
prints it out on the screen.)

Luigi


--

If I do not want others to quote me, I do not speak.
-- Phil Wayne



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Building SWIG wrappers on OSX

newbie73
strange - looks like it needed to build a version of QuantLib that has the files named like this:

libQuantLib-0.8.1.a
I also have:
libQuantLib.a, all in my usr/local/bin

looks like it couldn't find the binary file named libQuantLib.a so it had to build the entire library from scratch.  

This last time I ran it, it executed in about a minute, as expected.

Thanks for the help, now on to adding a 2 Factor Vasicek implementation :)
Luigi Ballabio wrote
On Wed, 2007-09-19 at 05:59 -0700, newbie73 wrote:
> So then ... why does it take so long?  My mac isn't *that* old, it's a dual
> core 1.8 processor with 1gb ram.  On my XP machine, the build of the
> wrappers takes about 1 minute.  With my Mac, it takes about 6-8 hours.
> Something's odd ... for the build to take that long

When you run setup.py build, which command line gets executed? (setup.py
prints it out on the screen.)

Luigi


--

If I do not want others to quote me, I do not speak.
-- Phil Wayne



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users