Having a lot of trouble getting RQuantLib working on our RStudio Connect server. Started with the boost-devel and QuantLib packages, but install.packages("RQuantLib") still can't find QuantLib, error below. Anyone have success implementing RQuantLib on linux? Thanks!
* installing *source* package ‘RQuantLib’ ...
** package ‘RQuantLib’ successfully unpacked and MD5 sums checked
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -m64 accepts -g... yes
checking how to run the C++ preprocessor... g++ -m64 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -m64 accepts -g... (cached) yes
checking for R... yes
checking for quantlib-config... no
configure: error: Please install QuantLib before trying to build RQuantLib.
ERROR: configuration failed for package ‘RQuantLib’
* removing ‘/root/R/x86_64-redhat-linux-gnu-library/3.4/RQuantLib’type or paste code here
This is a great question! Sorry for the delayed response!
Are you trying to install this when deploying content to Connect? Debugging these system library dependencies can be a bit of a pain. One way to try interactively is to log into the server's terminal (ssh, etc.) and try installing the package in a session on the command line.
I have to say I am not super familiar with RQuantLib, but hopefully someone here is!
I do not recommend using apt-get install or yum install for the package. If you want Connect to be able to install the package, you will want to be sure that normal install.packages() works from a terminal.
You said you have installed libquantlib0-dev? Also, what linux distribution are you on?
Thanks for the follow up. I’ve tried the steps outlined below. Since I only need the businessDaysBetween function from RQuantLib and not all of the fancy financial analysis stuff I’m now planning on using something like the bizdays package instead. Thanks again!
If you only need businessDaysBetween, you can have a look at RcppQuantuccia, which aims at bringing as much as possible from (R)QuantLib as a header only library that can be installed without system dependencies. Currently it does not support all that many functions, but businessDaysBetween is among them.