eddelbuettel / rquantlib

R interface to the QuantLib library
117 stars 50 forks source link

Windows build for quantlib 1.8 #56

Closed tleitch closed 8 years ago

tleitch commented 8 years ago

I cross compiled quantlib on Ubuntu for a Windows host. Is there somewhere I can upload to share. It has passed quantlib tests but I have not performed a Rquanltib build to test.

eddelbuettel commented 8 years ago

You completely and utterly rock. We could have talked about this last weekend...

Somehow I coaxed @joshuaulrich into attempting it based on the rwinlib/quantlib files by @jeroenooms / @thirdwing.

Now, before we get further, you need to arrange the resulting files (for i386 and amd64) in such a way that RQuantLib can build against it.

tleitch commented 8 years ago

I compiled for 32 bit as well last night. I used boost 1.61.0. Looking at the rwinlib/quantlib, I see the zip files have ".a" file, but my build(s) also had a ".la" files.

Not sure what I do next?

eddelbuettel commented 8 years ago

The .la are leftovers. I don;t think we need those.

@joshuaulrich is in the process of finalizing this as well. We're close.

tleitch commented 8 years ago

I'll go back to sabrSwaption then. Let me know if you need anything. I have an issue that was fixed in 1.7, so interested when the updated library is available.

eddelbuettel commented 8 years ago

Yes, we do want an updated QL library for CRAN builds sooner rather than later.

joshuaulrich commented 8 years ago

@tleitch are you able to install RQuantLib on Windows using your cross-compiled QuantLib libraries?

I currently have a script to mostly automate the process of building/installing QuantLib for both 32- and 64-bit architectures on Windows. It also uses them to install/build RQuantLib, and runs the RQuantLib unit tests.

tleitch commented 8 years ago

Haven't tried yet. Library is on my linux box, I uploaded to onedrive and looking to update rwinlib and my windows box at cftc, but stopped to wait for your efforts to bear fruit.

tleitch commented 8 years ago

was this accomplished or on hold? i just finished the hard part of building a sabr swaption interface and I'm getting ready to move it to windows before release and will link against the current cran version, so wondering what I will be getting.

eddelbuettel commented 8 years ago

We are waiting on Uwe Ligges to take advantage of Josh's build, so it is "pending".

Our hands are tied though.

jeroen commented 8 years ago

They're not completely tied: it is acceptable to download and static link libprotobuf on the fly during package build. That way you don't have to bother Uwe, plus the package will build form source on non-cran windows machines.

If you're interested feel free to copy the corresponding makevars.win from e.g. xml2, hunspell, pdftools, etc.

eddelbuettel commented 8 years ago

Sure. Our Rblpapi package does the same, and we'll talk at useR! about what x13binary does.

That does not take away from the fact that Uwe has accommodated us in the past, and as indicated that he will again. He is just busy.

jeroen commented 8 years ago

Right. It's actually slightly simpler than e.g. Rblpapi because you don't have to bundle any binaries or dll files with the package. Just download and extract the static libs to a temporary dir and then add that path to PKG_LIBS.

Looks like I won't be able to make it to useR this year :(

eddelbuettel commented 8 years ago

Which is what Rblpapi does because we do not get the sources from Bloomberg -- it is copying of pre-built libraries only.

But it is preferable to not download semi-random stuff. I would feel better about more local builds, so I am willing to wait for Uwe.

eddelbuettel commented 8 years ago

Still pending with Uwe. Sent him another email.

eddelbuettel commented 8 years ago

I have given up on Uwe and CRAN; the next upload will be Unix-only.

I have however build binary Windows packages (with help from @joshuaulrich) and will make those available via a drat repo.