DataSlingers / ExclusiveLasso

Generalized Linear Models with the Exclusive Lasso Penalty
https://DataSlingers.github.io/ExclusiveLasso/
5 stars 2 forks source link

fail to install, it gives 'fatal error: R.h: No such file or directory' #18

Open RorschachY opened 1 year ago

RorschachY commented 1 year ago

using

library(devtools)
install_github("DataSlingers/ExclusiveLasso")

and it gives:

In file included from D:/R-4.2.2/library/Rcpp/include/RcppCommon.h:30,
                 from D:/R-4.2.2/library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:25,
                 from D:/R-4.2.2/library/RcppArmadillo/include/RcppArmadillo.h:29,
                 from ExclusiveLasso.cpp:23:
D:/R-4.2.2/library/Rcpp/include/Rcpp/r/headers.h:66:10: fatal error: R.h: No such file or directory
   66 | #include <R.h>
      |          ^~~~~
compilation terminated.
make: *** [D:/R-4.2.2/etc/x64/Makeconf:260:ExclusiveLasso.o] 错误 1
ERROR: compilation failed for package 'ExclusiveLasso'
* removing 'D:/R-4.2.2/library/ExclusiveLasso'

i'm using r 4.2.2, win11, vscode

constancepopovic commented 1 year ago

@RorschachY I have had the same issue, were you able to overcome this at all?

michaelweylandt commented 1 year ago

Hi @RorschachY and @constancepopovic,

That looks like it's more of a Rcpp/Rcpp Armadillo issue than one specific to ExclusiveLasso : are you able to build other RcppArmadillo packages from source? Maybe try our clustRviz package or one of the reverse depends on CRAN? (If using CRAN, make sure you try to build locally and not download the pre-built tarball.)

RorschachY commented 1 year ago

I tried to reinstall Rcpp, and it resolved the issue.