[Rcpp-devel] Segfault in using RInside

Dirk Eddelbuettel edd at debian.org
Wed Feb 5 04:36:37 CET 2014


On 4 February 2014 at 22:26, Jiqiang Guo wrote:
| I got a seg fault from using RInside after upgrading Rcpp to the current
| version.  The following is an example of using an example in RInside package:
| 
| $ make rinside_test0
| g++ -I/usr/share/R/include -I/home/jq/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/
| include -I/home/jq/R/x86_64-pc-linux-gnu-library/3.0/RInside/include -O3 -pipe
| -g -Wall    rinside_test0.cpp  -L/usr/lib/R/lib -lR  -lblas -llapack  -L/
| home/jq/R/x86_64-pc-linux-gnu-library/3.0/RInside/lib -lRInside -Wl,-rpath,/
| home/jq/R/x86_64-pc-linux-gnu-library/3.0/RInside/lib -o rinside_test0
| 
| $ ./rinside_test0
| Segmentation fault
| 
| $ R -q -e 'library(Rcpp);library(RInside);sessionInfo()'
| > library(Rcpp);library(RInside);sessionInfo()
| R version 3.0.2 (2013-09-25)
| Platform: x86_64-pc-linux-gnu (64-bit)
| 
| locale:
|  [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C
|  [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8
|  [5] LC_MONETARY=en_US.utf8    LC_MESSAGES=en_US.utf8
|  [7] LC_PAPER=en_US.utf8       LC_NAME=C
|  [9] LC_ADDRESS=C              LC_TELEPHONE=C
| [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
| 
| attached base packages:
| [1] stats     graphics  grDevices utils     datasets  methods   base
| 
| other attached packages:
| [1] RInside_0.2.10 Rcpp_0.11.0
| >
| 
| Am I missing something? 

A one-time pain: You need to rebuild /everything/ that uses Rcpp as it was
all built under the assumption that there would be a shared library (on
Linux: libRcpp.so).

Starting with Rcpp 0.11.0, we can now do without libRcpp.so.  But the old
build does not know that, so it needs to be rebuilt.

See the release notes and announcement for details.

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list