hrbrmstr/arabia

devtools installation issue with Rcpp

Closed this issue · 2 comments

Hello! First, just wanted to say thanks for working on this; I'm pretty excited to be able to use the data Lowrance .sl2 files.

I'm primarily having problems with installing the library using devtools::install_git("https://gitlab.com/hrbrmstr/arabia").

I routinely get the following error message, which seems to indicate that the library is unable to locate my Rcpp package during compilation. I've confirmed that Rcpp has been downloaded, in the directory ~/R/x86_64-pc-linux-gnu-library/3.4/Rcpp and when I copy Rcpp.h to the arabia/src folder and use #include "Rcpp.h" instead of #include <Rcpp.h>, the compiler moves onto the next #include <file> that is located in the Rcpp directory but not the arabia library itself. I see the g++ flag for -I/usr/share/R/include, but am unsure what that entails.

Part of this might be that my R environment is pretty new; I don't usually use this ecosystem, and so it's certainly possible that certain libraries aren't in the right place, although I've tried to follow the default paths for installations, so it's feasible that others might run into this problem at some point as well. I'm running this on a derivative of Ubuntu 17.10. Thanks!


Downloading git repo https://github.com/hrbrmstr/arabia.git
Installing arabia
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
CMD INSTALL '/tmp/Rtmpyz1hVz/file19af788ca11b'  \
--library='/home/username/R/x86_64-pc-linux-gnu-library/3.4' --install-tests 

* installing *source* package ‘arabia’ ...
** libs
g++  -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-1q72bO/r-base-3.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c arabia-main.cpp -o arabia-main.o
arabia-main.cpp:1:10: fatal error: Rcpp.h: No such file or directory
#include <Rcpp.h>
        ^~~~~~~~
compilation terminated.
/usr/lib/R/etc/Makeconf:168: recipe for target 'arabia-main.o' failed
make: *** [arabia-main.o] Error 1
ERROR: compilation failed for package ‘arabia’
* removing ‘/home/username/R/x86_64-pc-linux-gnu-library/3.4/arabia’
Installation failed: Command failed (1)
Error in library(arabia) : there is no package called ‘arabia’
Execution halted 

try installing again from the repo. and, if you already have dplyr, tidyr and purrr installed then try doing install_github("hrbrmstr/arabia", dep=FALSE)

That seems to have fixed it, thank you!