eddelbuettel / rquantlib

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

Package compilation error #113

Closed SamoPP closed 6 years ago

SamoPP commented 6 years ago

I am compiling RQuantLib from source on Ubuntu 18.04 using "Clean and Rebuild" option from RStudio. I get the following error:

** testing if installed package can be loaded
Error: package or namespace load failed for ‘RQuantLib’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/username/R/x86_64-pc-linux-gnu-library/3.4/RQuantLib/libs/RQuantLib.so':
  /home/username/R/x86_64-pc-linux-gnu-library/3.4/RQuantLib/libs/RQuantLib.so: undefined symbol: _ZN8QuantLib4Date11monthOffsetENS_5MonthEb

i have installed quantlib from your ppa: .

libquantlib0-dev is already the newest version (1.13-1.1710.0).
libquantlib0v5 is already the newest version (1.13-1.1710.0).

Which library/package is a mismatch here (monthOffset function?) so I try and get the versions in order?

Thanks.

eddelbuettel commented 6 years ago

Sorry, but "works for me" on 18.04:

edd@rob:~$ COLUMNS=90 dpkg -l | grep quantlib
ii  libquantlib0-dev 1.13-1.1710.0 amd64         Quantitative Finance Library -- develo
ii  libquantlib0v5   1.13-1.1710.0 amd64         Quantitative Finance Library -- librar
ii  quantlib-python  1.12-1        amd64         Python3 bindings for the Quantlib Quan
edd@rob:~$ install.r RQuantLib
trying URL 'https://cloud.r-project.org/src/contrib/RQuantLib_0.4.4.tar.gz'
Content type 'application/x-gzip' length 188141 bytes (183 KB)
==================================================
downloaded 183 KB

* installing *source* package ‘RQuantLib’ ...
** package ‘RQuantLib’ successfully unpacked and MD5 sums checked
checking for g++... g++
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
checking for Boost development files... yes
checking for minimal Boost version... yes
configure: creating ./config.status
config.status: creating src/Makevars
Completed configuration and ready to build.
** libs
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c RcppExports.cpp -o RcppExports.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c affine.cpp -o affine.o
affine.cpp: In function ‘Rcpp::List affineWithRebuiltCurveEngine(Rcpp::List, Rcpp::List, std::vector<QuantLib::Date>, std::vector<double>, Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::NumericVector)’:
affine.cpp:103:12: warning: unused variable ‘fixDayCount’ [-Wunused-variable]
     double fixDayCount = Rcpp::as<double>(legparams["dayCounter"]);
            ^~~~~~~~~~~
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c asian.cpp -o asian.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c barrier_binary.cpp -o barrier_binary.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c bermudan.cpp -o bermudan.o
bermudan.cpp: In function ‘Rcpp::List bermudanFromYieldEngine(Rcpp::List, Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::NumericMatrix)’:
bermudan.cpp:87:12: warning: unused variable ‘tolerance’ [-Wunused-variable]
     double tolerance = 1.0e-15;
            ^~~~~~~~~
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c bonds.cpp -o bonds.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c calendars.cpp -o calendars.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c curves.cpp -o curves.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c dates.cpp -o dates.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c daycounter.cpp -o daycounter.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c discount.cpp -o discount.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c hullwhite.cpp -o hullwhite.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c implieds.cpp -o implieds.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c modules.cpp -o modules.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c sabr.cpp -o sabr.o
sabr.cpp: In function ‘Rcpp::List sabrengine(Rcpp::List, Rcpp::List, std::vector<QuantLib::Date>, std::vector<double>, Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::NumericMatrix, Rcpp::NumericVector, Rcpp::NumericMatrix)’:
sabr.cpp:190:16: warning: unused variable ‘tol1’ [-Wunused-variable]
     const Real tol1 = 0.0001; // 1bp tolerance for model engine call put premia
                ^~~~
sabr.cpp:194:10: warning: variable ‘savedEvalDate’ set but not used [-Wunused-but-set-variable]
     Date savedEvalDate = Settings::instance().evaluationDate();
          ^~~~~~~~~~~~~
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c schedule.cpp -o schedule.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c utils.cpp -o utils.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c vanilla.cpp -o vanilla.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include"   -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes -march=native  -I/usr/include -fopenmp  -I../inst/include -I. -fopenmp -DRCPP_NEW_DATE_DATETIME_VECTORS -fpic  -g -O3 -Wall -pipe -pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes  -march=native -c zero.cpp -o zero.o
ccache g++ -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o RQuantLib.so RcppExports.o affine.o asian.o barrier_binary.o bermudan.o bonds.o calendars.o curves.o dates.o daycounter.o discount.o hullwhite.o implieds.o modules.o sabr.o schedule.o utils.o vanilla.o zero.o -L/usr/lib -lQuantLib -fopenmp -fopenmp -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/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
* DONE (RQuantLib)

The downloaded source packages are in
    ‘/tmp/downloaded_packages’
edd@rob:~$ 

Here install.r is a script from littler that simply calls install.packages(), the RQuantLib version is from CRAN and I use the standard Ubuntu 18.04 for everything.

Maybe you have an older QL hanging around somewhere...

eddelbuettel commented 6 years ago

Can you try the development version from GitHub as well? Installs just as fine for me, minus the warnings.

SamoPP commented 6 years ago

Thanks.

I am using development version from GitHub and using Clean and Rebuild for the project in RStudio. Let me look around the system if I have some other version of QL somewhere... What is strange that it all worked perfectly in the morning. In the meantime I guess I must have upgraded some dependency.

eddelbuettel commented 6 years ago

Try simplifying, ie use the standard R commands. RStudio does more; maybe devtools, roxygen2, ... got in the way.

SamoPP commented 6 years ago

I guess I have an old quantlib hanging around (did not interfere until a couple of hours ago): username@usernameVB:/$ COLUMNS=90 dpkg -l | grep quantlib rc libquantlib0 1.4-2 amd64 Quantitative Finance Library -- librar ii libquantlib0-dev 1.13-1.1710.0 amd64 Quantitative Finance Library -- develo ii libquantlib0v5 1.13-1.1710.0 amd64 Quantitative Finance Library -- librar

eddelbuettel commented 6 years ago

No rc means "removed package configuration remains" and is harmless. You could do sudo dpkg --purge libquantlib0 but this is not the cause I think.

SamoPP commented 6 years ago

Using devtools::install_github in terminal reveals: ... checking for Boost development files... no configure: error: Boost development files not found ERROR: configuration failed for package ‘RQuantLib’ ...

Which is strange. I have libboost-all-dev installed (actually I have reinstalled it)...

eddelbuettel commented 6 years ago

Much better. Keep chasing that. Maybe pkg-config is missing or something else.

Code is

## Check for Boost components
# QL_CHECK_BOOST_DEVEL
# --------------------
# Check whether the Boost headers are available
AC_DEFUN([QL_CHECK_BOOST_DEVEL],
[AC_MSG_CHECKING([for Boost development files])
 AC_TRY_COMPILE(
    [@%:@include <boost/version.hpp>
     @%:@include <boost/shared_ptr.hpp>
     @%:@include <boost/assert.hpp>
     @%:@include <boost/current_function.hpp>],
    [],
    [AC_MSG_RESULT([yes])],
    [AC_MSG_RESULT([no])
     AC_MSG_ERROR([Boost development files not found])
    ])
])

so it is really your compilation test failing. Your issue ...

SamoPP commented 6 years ago

I have all the required header files:

/usr/include/boost/version.hpp
/usr/include/boost/shared_ptr.hpp
/usr/include/boost/assert.hpp
/usr/include/boost/current_function.hpp

So there must be something wrong with where compiler/linker (or whatever) looks for include files. I remember I was reinstalling libc or something similar today and maybe that broke things...

SamoPP commented 6 years ago

I am out of (reading and searching for) ideas. Do you maybe have a hint what to do here?

eddelbuettel commented 6 years ago

Maybe look at your environment variables. Maybe try compiling that test program 'by hand'.

SamoPP commented 6 years ago

Unfortunately I am not versed enough to know what to look for in environment variables. Or know which test program to compile by hand.

I am using RQuntLib mostly for its calendar capabilities (to know whether a particular day is business day or not). Is there an alternative R package that has different calendars available and is being maintained? I guess I am not fit to use RQuantLib and since I use it in most of my packages I have written nothing works anymore. It is now the second time in one month I am wasting your time with this linking issues and versions of libraries etc.

eddelbuettel commented 6 years ago

Try this one: RcppQuantuccia -- it is a subset of QuantLib building headers only, no linking.

Would still be nice to figure out what ails you. But as there is nothing reproducible, I am closing this.

SamoPP commented 6 years ago

I have compiled the test program. In order for me to be able to do so I needed to uninstall miniconda3 and all the stuff installed with it (including gcc etc.) and remove miniconda3 from the path. That was causing problems. I guess it would be enough to just edit PATH and not uninstall miniconda3.

Now, also in R in terminal I get the same output as in RStudio (error persists): ** testing if installed package can be loaded Error: package or namespace load failed for ‘RQuantLib’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/kilometrics/R/x86_64-pc-linux-gnu-library/3.4/RQuantLib/libs/RQuantLib.so': /home/kilometrics/R/x86_64-pc-linux-gnu-library/3.4/RQuantLib/libs/RQuantLib.so: undefined symbol: _ZN8QuantLib4Date11monthOffsetENS_5MonthEb Error: loading failed

eddelbuettel commented 6 years ago

Ahhhhhh now for the first time you mentioned Conda. That "almost always" breaks things as far as I can tell.

Do. Not. Let. Conda. Mess. With. Your. Ubuntu. Paths. And. Library. Settings.

This issue is the price you pay. And why we insist on reproducible examples

SamoPP commented 6 years ago

Yeah, I wanted to test Lean from Quantconnect using Python and call my R functions via RPy2 and the official and recommended way to install Lean was via miniconda... And it installed a whole bunch of things including separate copy of (Microsoft) R etc., added miniconda3 folder to PATH and who knows what else... Thanks for the warning about conda. I am learning the hard way this issues.

I saw new quantlib package appeared in your ppa for Ubuntu 18.04 Bionic so I installed it. Tried to rebuild RQuantLib, but no success.

I can not figure out why monthOffset function call is the problem. I can see it here https://github.com/lballabio/QuantLib/blob/master/ql/time/date.cpp . Nothing special.

I looked at what RQuantLib links to. The following:

$ ldd '/home/username/R/x86_64-pc-linux-gnu-library/3.4/RQuantLib/libs/RQuantLib.so'
    linux-vdso.so.1 (0x00007ffe8f9df000)
    libQuantLib.so.0 => /usr/local/lib/libQuantLib.so.0 (0x00007f73f1b82000)
    libR.so => /usr/lib/libR.so (0x00007f73f1509000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f73f117b000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f73f0ddd000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f73f0bc5000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f73f07d4000)
    libblas.so.3 => /usr/lib/x86_64-linux-gnu/libblas.so.3 (0x00007f73f0579000)
    libreadline.so.7 => /lib/x86_64-linux-gnu/libreadline.so.7 (0x00007f73f0330000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f73f00be000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f73efe98000)
    libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f73efc88000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f73efa6b000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f73ef863000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f73ef65f000)
    libicuuc.so.60 => /usr/lib/x86_64-linux-gnu/libicuuc.so.60 (0x00007f73ef2a8000)
    libicui18n.so.60 => /usr/lib/x86_64-linux-gnu/libicui18n.so.60 (0x00007f73eee07000)
    libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f73eebd7000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f73ee9b8000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f73f472e000)
    libopenblas.so.0 => /usr/lib/x86_64-linux-gnu/libopenblas.so.0 (0x00007f73ec712000)
    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f73ec4e8000)
    libicudata.so.60 => /usr/lib/x86_64-linux-gnu/libicudata.so.60 (0x00007f73ea93f000)
    libgfortran.so.4 => /usr/lib/x86_64-linux-gnu/libgfortran.so.4 (0x00007f73ea560000)
    libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f73ea320000)

Which of the above might interfere?

eddelbuettel commented 6 years ago

Right. Conda is a little too all-encompassing for my tastes. apt works for me.

As for 18.04: Yes, I noticed some issues here so I rebuilt the QuantLib package. All good here now so slowly moving towards a 0.4.5 release.

As for you cannot build: There is is some inconsistency between what you say you did (all packages from Ubuntu and eg my PPA) and what I see here:

libQuantLib.so.0 => /usr/local/lib/libQuantLib.so.0 (0x00007f73f1b82000)

Clearly shows another QuantLib coming in. You probably don't want that as it is presumably the old one with the missing symbol.

SamoPP commented 6 years ago

You are right. I already removed the old one and now situation is like this (I assume correct):

$ ldd '/home/username/R/x86_64-pc-linux-gnu-library/3.4/RQuantLib/libs/RQuantLib.so'
    linux-vdso.so.1 (0x00007ffed812f000)
    libQuantLib.so.0 => /usr/lib/libQuantLib.so.0 (0x00007fe1a00f3000)
    libR.so => /usr/lib/libR.so (0x00007fe19fa7a000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe19f6ec000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe19f34e000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe19f136000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe19ed45000)
    libblas.so.3 => /usr/lib/x86_64-linux-gnu/libblas.so.3 (0x00007fe19eaea000)
    libreadline.so.7 => /lib/x86_64-linux-gnu/libreadline.so.7 (0x00007fe19e8a1000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fe19e62f000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fe19e409000)
    libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fe19e1f9000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fe19dfdc000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe19ddd4000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe19dbd0000)
    libicuuc.so.60 => /usr/lib/x86_64-linux-gnu/libicuuc.so.60 (0x00007fe19d819000)
    libicui18n.so.60 => /usr/lib/x86_64-linux-gnu/libicui18n.so.60 (0x00007fe19d378000)
    libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007fe19d148000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe19cf29000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fe1a29f1000)
    libopenblas.so.0 => /usr/lib/x86_64-linux-gnu/libopenblas.so.0 (0x00007fe19ac83000)
    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fe19aa59000)
    libicudata.so.60 => /usr/lib/x86_64-linux-gnu/libicudata.so.60 (0x00007fe198eb0000)
    libgfortran.so.4 => /usr/lib/x86_64-linux-gnu/libgfortran.so.4 (0x00007fe198ad1000)
    libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fe198891000)

But, unfortunately, RQuantLib does not build. Same issue.

eddelbuettel commented 6 years ago

I cannot look onto your machine. Something still has to be different as computers as in fact deterministic.

SamoPP commented 6 years ago

Resolved.

I removed and purged libquantlib. Made sure all the libQuantlib files are gone from file system. Reinstalled libquantlib* from your ppa. Used devtools::install_github. Worked. :)

Thanks for your help, patience and time.

eddelbuettel commented 6 years ago

You do no longer need devtools::install_github() as the new RQuantLib 0.4.5 has in the meantime appeared on CRAN. So just do install.packages("RQuantLib").

Appreciate your patience in working through this, and glad we confirmed once again that the standard setup "just works" ...