Topics

Error installing package on CentOS 7

beppeg@...
 

Dear all,
I'm going crazy to install the package on CentOS 7.
Required QuantLib library installed from EPEL repository via yum seems to be < 1.14 so I installed successfully 1.16 release compiling from sources.

Installing R-package I get following error:
 
 *** caught segfault ***
address 0x7f2370de92a0, cause 'invalid permissions'

Error occurs loading library after compilation.

Did someone have and solved the problem?
Ther's some tutorial/hint about installation on CentOS 7?

Thank you.
Beppe
 

Dirk Eddelbuettel
 

On 11 September 2019 at 04:50, beppeg@... wrote:
| Dear all,
| I'm going crazy to install the package on CentOS 7.
| Required QuantLib library installed from EPEL repository via yum seems to be < 1.14 so I installed successfully 1.16 release compiling from sources.
|
| Installing R-package I get following error:
|
| *** caught segfault ***
| address 0x7f2370de92a0, cause 'invalid permissions'
|
| Error occurs loading library after compilation.
|
| Did someone have and solved the problem?
| Ther's some tutorial/hint about installation on CentOS 7?

Segfauls are sometimes a symptom of mismatched libraries. Make sure QuantLib
and Rcpp are built with the same compiler, so if you installed QuantLib from
source, also install Rcpp from sources.

Also, after building QuantLib, it might be a good idea to run its test
suite.

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | @edd

dick.r.chiang@...
 

The package maintainer has previously not recommended the following, but it directly addresses the core problem.  The alternative is to upgrade to a CentOS version with boost libraries greater than 1.58.  Lots of back and forth on github issues #119, #132.

1. git clone `lballabio/QuantLib`
```
./autogen.sh`
./configure --prefix=$HOME/.local --enable-intraday
make install
```
2. git clone `eddelbuettel/rquantlib` and remove `CXX_STD=CXX11` from `src/Makevars.in`
3. From the `rquantlib` parent directory, fire up R and execute
```
library(devtools)
install()
library(RQuantLib)
getHolidayList("UnitedStates", as.Date("2018-12-01"), as.Date("2019-01-02"))
```
 

Dirk Eddelbuettel
 

On 11 September 2019 at 11:00, dick.r.chiang@... wrote:
| The package maintainer has previously not recommended the following, but it directly addresses the core problem.  The alternative is to upgrade to a CentOS version with boost libraries greater than 1.58.  Lots of back and forth on github issues #119, #132.

Oh dear I had forgotten all about! Indeed, old Boost / old compilers will do
that too. I should probably beef up the checks in configure.ac.

Thanks for pointing that out.

Minor nits below.

| 1. git clone `lballabio/QuantLib`
| ```
| ./autogen.sh`
| ./configure --prefix=$HOME/.local --enable-intraday

Hidden directory? Hm. Maybe $HOME/lib/ ? Anyway...

| make install
| ```
| 2. git clone `eddelbuettel/rquantlib` and remove `CXX_STD=CXX11` from `src/Makevars.in`
| 3. From the `rquantlib` parent directory, fire up R and execute
| ```
| library(devtools)
| install()

Or just say 'R CMD INSTALL .'

Dirk

| library(RQuantLib)
| getHolidayList("UnitedStates", as.Date("2018-12-01"), as.Date("2019-01-02"))
| ```
|
|
|

--
http://dirk.eddelbuettel.com | @eddelbuettel | @edd