YuLab-SMU / GOSemSim

:golf: GO-terms Semantic Similarity Measures
https://yulab-smu.top/biomedical-knowledge-mining-book/
58 stars 26 forks source link

Compilation error due to breaking change in Rcpp #28

Closed mjsteinbaugh closed 4 years ago

mjsteinbaugh commented 4 years ago

Hi Yu Lab, I'm now seeing a compilation issue due to Rcpp v1.0.4 for GOSemSim on Debian Linux:

> BiocManager::install("GOSemSim")                                                                   [12/194364]
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.3 (2020-02-29)
Installing package(s) 'GOSemSim'
trying URL 'https://bioconductor.org/packages/3.10/bioc/src/contrib/GOSemSim_2.12.0.tar.gz'
Content type 'application/x-gzip' length 604483 bytes (590 KB)
==================================================
downloaded 590 KB

* installing *source* package 'GOSemSim' ...
** using staged installation
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG  -I"/usr/local/opt/r/3.6/site-library/Rcpp/include"   -fpic
-g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c ICmethod.cpp -o ICmethod.o
In file included from /usr/local/opt/r/3.6/site-library/Rcpp/include/RcppCommon.h:135,
                 from /usr/local/opt/r/3.6/site-library/Rcpp/include/Rcpp.h:27,
                 from ICmethod.cpp:1:
ICmethod.cpp: In function 'Rcpp::NumericMatrix infoContentMethod_cpp(Rcpp::StringVector&, Rcpp::StringVector&, Rcpp::List&, Rcpp::NumericVector&, const string&, const string&)':
/usr/local/opt/r/3.6/site-library/Rcpp/include/Rcpp/lang.h:27:20: error: 'Rf_list2' is not a member of 'Rcpp'
 #define Rcpp_list2 Rf_list2
                    ^~~~~~~~
ICmethod.cpp:117:32: note: in expansion of macro 'Rcpp_list2'
   res.attr("dimnames") = Rcpp::Rcpp_list2( id1_, id2_ );
                                ^~~~~~~~~~
/usr/local/opt/r/3.6/site-library/Rcpp/include/Rcpp/lang.h:27:20: note: suggested alternative: 'Rcpp_list20'
 #define Rcpp_list2 Rf_list2
                    ^~~~~~~~
ICmethod.cpp:117:32: note: in expansion of macro 'Rcpp_list2'
   res.attr("dimnames") = Rcpp::Rcpp_list2( id1_, id2_ );
                                ^~~~~~~~~~
make: *** [/usr/lib/R/etc/Makeconf:177: ICmethod.o] Error 1
ERROR: compilation failed for package 'GOSemSim'
* removing '/usr/local/opt/r/3.6/site-library/GOSemSim'
Warning in install.packages(...) :
  installation of package 'GOSemSim' had non-zero exit status
Calls: <Anonymous> ... tryCatchList -> tryCatchOne -> doTryCatch -> install.packages

Best, Mike

mjsteinbaugh commented 4 years ago

Good news is that this issue seems to be fixed in the development version of Rcpp:

remotes::install_github("RcppCore/Rcpp")
packageVersion("Rcpp")
## [1] '1.0.4.3'
BiocManager::install("GOSemSim")
## works
GuangchuangYu commented 4 years ago

thanks for your feedback and testing with devel version of Rcpp.

Good news is that the fix works for both release and devel Rcpp.