Question: Unable to install Rcpp package for genefo
0
gravatar for anjali.krishna1008
3.3 years ago by
anjali.krishna10080 wrote:

I have recently installed Bioconductor (version 2.13) on Rstudio (R version 3.0.2). I use Linux Mint 17.2 Cinnamon 64bit. I have been trying to install the "genefo" package, which has a dependency on the Rcpp package. However, the installation of Rcpp stalls with the error -
 (Unable to insert the code from the beginning)

* installing *source* package ‘Rcpp’ ...

** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -O3 -pipe  -g  -c Date.cpp -o Date.o
In file included from ../inst/include/RcppCommon.h:122:0,
                 from ../inst/include/Rcpp.h:27,
                 from Date.cpp:31:
../inst/include/Rcpp/exceptions.h:267:23: error: expected initializer before ‘stop’
     inline void NORET stop(const std::string& message) {
                       ^
../inst/include/Rcpp/exceptions.h:272:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1) {
                       ^
../inst/include/Rcpp/exceptions.h:277:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2) {
                       ^
../inst/include/Rcpp/exceptions.h:282:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3) {
                       ^
../inst/include/Rcpp/exceptions.h:287:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4) {
                       ^
../inst/include/Rcpp/exceptions.h:292:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5) {
                       ^
../inst/include/Rcpp/exceptions.h:297:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5, const T6& arg6) {
                       ^
../inst/include/Rcpp/exceptions.h:302:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5, const T6& arg6, const T7& arg7) {
                       ^
../inst/include/Rcpp/exceptions.h:307:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5, const T6& arg6, const T7& arg7, const T8& arg8) {
                       ^
../inst/include/Rcpp/exceptions.h:312:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5, const T6& arg6, const T7& arg7, const T8& arg8, const T9& arg9) {
                       ^
../inst/include/Rcpp/exceptions.h:317:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5, const T6& arg6, const T7& arg7, const T8& arg8, const T9& arg9, const T10& arg10) {
                       ^
In file included from ../inst/include/Rcpp/Vector.h:56:0,
                 from ../inst/include/Rcpp.h:38,
                 from Date.cpp:31:
../inst/include/Rcpp/vector/DimNameProxy.h: In member function ‘Rcpp::internal::DimNameProxy& Rcpp::internal::DimNameProxy::assign(SEXP)’:
../inst/include/Rcpp/vector/DimNameProxy.h:43:121: error: too many arguments to function ‘void Rcpp::stop(const string&)’
                     stop("dimension extent is '%d' while length of names is '%d'", INTEGER(dims)[dim_], Rf_length(other));
                                                                                                                         ^
In file included from ../inst/include/RcppCommon.h:70:0,
                 from ../inst/include/Rcpp.h:27,
                 from Date.cpp:31:
../inst/include/Rcpp/utils/tinyformat.h:127:10: note: declared here
     void stop(const std::string& message);
          ^
In file included from ../inst/include/Rcpp.h:47:0,
                 from Date.cpp:31:
../inst/include/Rcpp/Function.h: In constructor ‘Rcpp::Function_Impl<StoragePolicy>::Function_Impl(const string&, const string&)’:
../inst/include/Rcpp/Function.h:72:63: error: too many arguments to function ‘void Rcpp::stop(const string&)’
                 stop("there is no namespace called \"%s\"", ns);
                                                               ^
In file included from ../inst/include/RcppCommon.h:70:0,
                 from ../inst/include/Rcpp.h:27,
                 from Date.cpp:31:
../inst/include/Rcpp/utils/tinyformat.h:127:10: note: declared here
     void stop(const std::string& message);
          ^
make: *** [Date.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/home/anjali/R/x86_64-pc-linux-gnu-library/3.0/Rcpp’

The downloaded source packages are in
    ‘/tmp/RtmpCt7qAW/downloaded_packages’
Warning message:
In install.packages(pkgs = pkgs, lib = lib, repos = repos, ...) :
  installation of package ‘Rcpp’ had non-zero exit status

Please help me. I am new to Linux and Bioconductor.

ADD COMMENTlink modified 3.3 years ago by mfox0 • written 3.3 years ago by anjali.krishna10080

Please EDIT your question to provide the output of sessionInfo(), and also from the command line g++ --version. Please also consider asking for support about Rcpp on the Rcpp mailing list.

ADD REPLYlink written 3.3 years ago by Martin Morgan ♦♦ 24k

You're using rather outdated versions of R and (therefore) bioconductor. Please upgrade R to the latest version (v3.3.1) and try to install your packages again into a "clean" library -- ie. do not copy your old R packages over to your new installation.

ADD REPLYlink written 3.3 years ago by Steve Lianoglou12k
Answer: Unable to install Rcpp package for genefo
0
gravatar for mfox
3.3 years ago by
mfox0
mfox0 wrote:

I just had the same issue, and this is what fixed it for me.

1. download the Rcpp_0.12.6.tar.gz source package

2. Unzip the package 

3. Edit Rcpp/inst/include/Rcpp.h to add #define NORET I did it like this:

#define Rcpp_hpp
#define NORET
/* it is important that this comes first */
#include <RcppCommon.h>

4. Tar Rcpp into a new gzip:   #tar -cvzf Rcpp_0.12.6.new.tar.gz Rcpp

5 Open R and install the package from source from the R command line:

> install.packages("Rcpp_0.12.6.new.tar.gz", repos = NULL, type="source")

 

Good luck!

 

 

ADD COMMENTlink modified 3.3 years ago • written 3.3 years ago by mfox0

This is also relevant -- http://stackoverflow.com/questions/38566225/not-able-to-compile-rcpp-0-12-6-under-r -- and seems to be due to use of an older version of R.  A solution is likely to install from github, e.g.,

biocLite("devtools")  # if not already installed
biocLite("RcppCore/Rcpp")

The underlying feature that this depends on was introduced to R in 2014, implying that the R version in use is quite old -- time for an update? Especially the original poster, who is just getting started.

ADD REPLYlink modified 3.3 years ago • written 3.3 years ago by Martin Morgan ♦♦ 24k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 415 users visited in the last hour