This is probably a conda issue instead of Rccp itself, but maybe someone has ideas on what to do about it. I've installed R via conda: r-base v3.4.1 from the "r" channel. When trying to install Rccp (or any packages depending on Rccp) with install.packages(), I get the error:
/ebio/abt3_projects/software/dev/miniconda3/envs/test/bin/x86_64-conda_cos6-linux-gnu-c++ -I/ebio/abt3_projects/software/dev/miniconda3/envs/test/lib/R/include -DNDEBUG -I../inst/include/ -D_FORTIFY_SOURCE=2 -O2 -I/ebio/abt3_projects/software/dev/miniconda3/envs/test/include -fpic -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I/ebio/abt3_projects/software/dev/miniconda3/envs/test/include -c Date.cpp -o Date.o
make: /ebio/abt3_projects/software/dev/miniconda3/envs/test/bin/x86_64-conda_cos6-linux-gnu-c++: Command not found
/ebio/abt3_projects/software/dev/miniconda3/envs/test/lib/R/etc/Makeconf:167: recipe for target 'Date.o' failed
I've tried conda install gcc_linux-64, but this doesn't install x86_64-conda_cos6-linux-gnu-c++. The closest file to this is "x86_64-conda_cos6-linux-gnu-c++filt", and symlinking this as "x86_64-conda_cos6-linux-gnu-c++" doesn't work.
Is there a way to bypass using x86_64-conda_cos6-linux-gnu-c++?
I've tried the suggestions at this post on stackoverflow, but nothing's working. I don't want to abandon using conda environments, but I can't install all the R packages I need via conda (eg., the "r" or "bioconda" channels), and installing packages with install.packages() keeps generating x86_64-conda_cos6-linux-gnu-c++: command not found errors for certain R packages.
Closing this here -- please talk to the Conda people. Or install Rcpp yourself from source.
Nobody I know is using Conda to his R environment. I may well have a biased sample, but I see nothing but the errors and _e.g._ questions on SO. I would suggest avoiding it. Or else go and work out all the issues. We can't help -- nobody around here uses it AFAICT. You _could_ ask on rcpp-devel....
conda install gxx_linux-64
provides x86_64-conda_cos6-linux-gnu-c++
THANK YOU @Sinan81 . This helped me immeasurably. I use conda to manage my R environment and couldn't perform the package updates You solved my problem.
@Sinan81 Really nice, it's what I want. Thanks.
I'll add this to the Rcpp FAQ.
@eddelbuettel probably want to also add a link to where conda describes its compiler info:
https://conda.io/docs/user-guide/tasks/build-packages/compiler-tools.html
c.f. macOS uses:
conda install clangxx_osx-64
Or we can use this command to install gxx_linux-64
conda install -c anaconda gxx_linux-64
thank you @Sinan81
@Sinan81 Thanks a lot!
The fix suggested by @Sinan81 did not work for me, but I finally found a solution at the bottom of the StackOverflow link above in @nick-youngblut 's original post.
It was simply to install packages directly through Conda:
conda install -c r r-tidyverse
(can replace r-tidyverse with r-rpart, more generally r-yourpackage)
Big caveat: it will only work for some R packages, others may not have conda build paths (packages with large user bases are more likely to be ok). I often use R from RCall.jl in Julia and RCall's default behavior is to have conda manage R packages.
Most helpful comment
conda install gxx_linux-64provides x86_64-conda_cos6-linux-gnu-c++