velocyto-team / velocyto.R

RNA velocity estimation in R
http://velocyto.org
177 stars 213 forks source link

Compilation failure #211

Open davidjquispe opened 2 months ago

davidjquispe commented 2 months ago

I am trying to install the package in R and keep getting this recurrent issue

install_github("velocyto-team/velocyto.R") Downloading GitHub repo velocyto-team/velocyto.R@HEAD Skipping 1 packages not available: pcaMethods ── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────── ✔ checking for file ‘/tmp/RtmpUL3yWQ/remotes18ddd3f0e03f9/velocyto-team-velocyto.R-83e6ed9/DESCRIPTION’ (343ms) ─ preparing ‘velocyto.R’: ✔ checking DESCRIPTION meta-information ─ cleaning src ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories ─ building ‘velocyto.R_0.6.tar.gz’

Installing package into ‘/home/pochelab/R/x86_64-pc-linux-gnu-library/4.4’ (as ‘lib’ is unspecified) installing source* package ‘velocyto.R’ ... using staged installation libs using C++ compiler: ‘g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0’ using C++11 g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/home/pochelab/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -I'/home/pochelab/R/x86_64-pc-linux-gnu-library/4.4/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/build/r-base-Kaw86j/r-base-4.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c RcppExports.cpp -o RcppExports.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/home/pochelab/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -I'/home/pochelab/R/x86_64-pc-linux-gnu-library/4.4/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/build/r-base-Kaw86j/r-base-4.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c points_within.cpp -o points_within.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/home/pochelab/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -I'/home/pochelab/R/x86_64-pc-linux-gnu-library/4.4/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/build/r-base-Kaw86j/r-base-4.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c routines.cpp -o routines.o routines.cpp: In function ‘arma::sp_mat balanced_knn(const mat&, int, int, bool, int)’: routines.cpp:48:29: error: format not a string literal and no format arguments [-Werror=format-security] 48 | Rf_warning(es.str().c_str()); | ^ cc1plus: some warnings being treated as errors make: ** [/usr/lib/R/etc/Makeconf:204: routines.o] Error 1 ERROR: compilation failed for package ‘velocyto.R’ removing ‘/home/pochelab/R/x86_64-pc-linux-gnu-library/4.4/velocyto.R’ Warning message: In i.p(...) : installation of package ‘/tmp/RtmpUL3yWQ/file18ddd4f93b660/velocyto.R_0.6.tar.gz’ had non-zero exit status

Thanks in advance

puweilin commented 1 month ago

Same question here. Ask for help.

erlun1 commented 1 month ago

Please comment out the line Rf_warning(es.str().c_str()) on line 48 in the /src/routines.cpp script. This is just a warning and does not affect the software installation and normal use.