Re: RQuantLib v4.0.0 for Ubuntu 20

Dirk Eddelbuettel

On 2 May 2020 at 06:43, John Paul Broussard wrote:
| I recently updated to Ubuntu 20.04, as well as to R v4. When updating packages, I ran into an issue with RQuantLib.
| As the attached indicates, all appears ok with QuantLib and Boost,
| * installing *source* package ‘RQuantLib’ ...
| ** package ‘RQuantLib’ successfully unpacked and MD5 sums checked
| ** using staged installation
| 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++ -std=gnu++11 accepts -g... yes
| checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
| checking whether we are using the GNU C++ compiler... (cached) yes
| checking whether g++ -std=gnu++11 accepts -g... (cached) yes
| checking for R... yes
| checking for quantlib-config... yes
| checking for Boost development files... yes
| checking for minimal Boost version... yes
| configure: creating ./config.status
| config.status: creating src/Makevars
| Configured RQuantlib 0.4.12
| but when the final "steps" of the install occur:
| installing to /home/fibrou/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-RQuantLib/00new/RQuantLib/libs
| ** R
| ** data
| ** demo
| ** inst
| ** byte-compile and prepare package for lazy loading
| ** help
| *** installing help indices
| ** building package indices
| ** testing if installed package can be loaded from temporary location
| Error: package or namespace load failed for ‘RQuantLib’ in dyn.load(file, DLLpath = DLLpath, ...):
| unable to load shared object '/home/fibrou/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-RQuantLib/00new/RQuantLib/libs/':
| /home/fibrou/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-RQuantLib/00new/RQuantLib/libs/ undefined symbol: _ZN8QuantLib4Date11monthOffsetENS_5MonthEb
| Error: loading failed
| Execution halted
| ERROR: loading failed
| * removing ‘/home/fibrou/R/x86_64-pc-linux-gnu-library/4.0/RQuantLib’
| What am I missing?

edd@rob:~$ c++filt _ZN8QuantLib4Date11monthOffsetENS_5MonthEb
QuantLib::Date::monthOffset(QuantLib::Month, bool)

A symbol missing in the library (or libraries) you link against. It usually
means you QuantLib is older than what RQuantLib wants.

You report, detailed as it was, omits that detail.

I tend to create .deb packages for my work on RQuantLib and put them here in repo 'Miscelleneous Packages' (which seems to
have QL 1.10, 1.11, and 1.13). And sometimes I seem to put them in 'r-3.5'
(though they are not R related, I shouldn't do that) which has QL 1.15, QL
1.16, QL 1.17 and QL 1.18.

Which is what I run, currently still on 19.10:

edd@rob:~$ dpkg -l | grep quantlib | cut -c-79
ii libquantlib0-dev 1.18-1.1910.1
ii libquantlib0v5 1.18-1.1910.1
ii quantlib-examples 1.18-1.1910.1
ii quantlib-python 1.16-1.1904.0

Feel free to fetch them from there too.

Or, if you're really lazy and just need a simple RQuantLib installation, try
the pre-built package from the distro (may conflict with R 4.0.0 though) or
Michael's PPA (if/when rebuilt, dunno about the timing; will support 4.0.0).


-- | @eddelbuettel | @edd

Join to automatically receive all group messages.