2

I am having an issue when deploying a shiny app that requires the package RQuantLib. When I'm running my application, everything works fine, even the part where the RQuantLib package is needed. However, when deploying the application, the process is stopped when building the package RQuantLib.

When I put into comments the line "library(RQuantLib)" the application can be deployed but I am obviously missing my parts based on the use of this package.

Here's the error :

[2018-11-17T22:26:33.546919933+0000] Building R package: RQuantLib (0.4.5)
/mnt/packages/build /mnt
* installing to library ‘/opt/R/3.5.0/lib/R/library’
* 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++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for R... yes
checking for quantlib-config... yes
configure: WARNING: RQuantLib requires QuantLib (>= 1.8.0).
configure: error: Please upgrade to a current version.
ERROR: configuration failed for package ‘RQuantLib’
* removing 
‘/opt/R/3.5.0/lib/R/library/RQuantLib’################################# End 
Task Log ################################# 
Erreur : Unhandled Exception: Child Task 565972976 failed: Error building 
image: Error building RQuantLib (0.4.5). Build exited with non-zero status: 
1
De plus : Warning message:
Error detecting locale: Error in read.table(file = file, header = header, 
sep = sep, quote = quote, : incomplete final line found by readTableHeader 
on 'raw'
(Using default: en_US) 

Thank you in advance !

L Rolland
  • 21
  • 5

1 Answers1

2

RQuantLib author here. I actually try to make this as plain as I can:

configure: WARNING: RQuantLib requires QuantLib (>= 1.8.0).
configure: error: Please upgrade to a current version.
ERROR: configuration failed for package ‘RQuantLib’

Also not sure what system you are on (as you didn't say) but both Debian and Ubuntu have RQuantLib natively: sudo apt install r-cran-rquantlib is all it takes.

Otherwise it may be worth re-stating the somewhat obvious: to build RQuantLib from source you need both R and QuantLib on the system you are building (== installing) on if you install from source. Hence the attractiveness of installing binaries -- which I provide as Debian maintainer.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • Thank you for you quick answer. I am under windows, my application works locally, the problem occurs when deploying the application not when running it. I know that installing QuantLib is mandatory. But how can I make it work when hosted on R shinyapps ? – L Rolland Nov 17 '18 at 23:01
  • 1
    You need the _hosting server_ to have the packages you want to use. In this case, the shiny server (running Linux) needs to have the proper libraries. Maybe the free one doesn't? – Dirk Eddelbuettel Nov 18 '18 at 03:12
  • I'm having the same problem, also working in windows (10). @LRolland could you find a solution? – Gibran Peniche Feb 03 '21 at 23:27