jlaffy / scalop

Single Cell Analysis Operations
https://jlaffy.github.io/scalop
GNU General Public License v3.0
12 stars 19 forks source link

Cannot install package #4

Open doublezede opened 2 years ago

doublezede commented 2 years ago

Hi, I'm trying to install the scalop package, using R version 4.2.1 Platform: x86_64-apple-darwin19.6.0 (64-bit) devtools::install_github("jlaffy/scalop")

But I get the following error:

* installing *source* package ‘scalop’ ...
** using staged installation
** libs
clang -I"/usr/local/Cellar/r/4.2.1/lib/R/include" -DNDEBUG  -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fPIC  -Wno-implicit-function-declaration  -c init.c -o init.o
clang -I"/usr/local/Cellar/r/4.2.1/lib/R/include" -DNDEBUG  -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fPIC  -Wno-implicit-function-declaration  -c nd.c -o nd.o
nd.c:24:10: fatal error: 'S.h' file not found
#include "S.h"
         ^~~~~
1 error generated.
make: *** [nd.o] Error 1
ERROR: compilation failed for package ‘scalop’
* removing ‘/usr/local/lib/R/4.2/site-library/scalop’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/zs/_5szrr6j2zv3rm4r3xt4rhpxz58q7z/T//Rtmpbyuh0z/file71421bdf6ff0/scalop_1.1.0.tar.gz’ had non-zero exit status

Any idea what could explain this error? Thank you for your help, Kind regards, Jenn

gengbaobao commented 2 years ago

Hello Jenn I also get this error. Have you solved the problem yet?

Best, Baobao

doublezede commented 2 years ago

Hi Baobao, I haven't tried installing the package since, as I'm still waiting for an answer here. Kind regards, Jenn

gengbaobao commented 2 years ago

Hi Jenn You can download the source code and load it in R with "source()" function. In this way, we can use the function of scalop package too. It works for me.

Baobao

hugo-lef commented 1 year ago

Hi, I try to install the scalop package and I'm using, R version 4.2.2 (2022-10-31) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.7

I have the same error as doublezede trying to install scallop with devtools, so as gengbaobao suggest, I tried to install the package using the source code but it doesn't work and gives me this type of error for this command : install.packages("~/Desktop/Stage M2/Bulk TCGA/scalop.tar.gz", repos = NULL, type = "source") A part of the error : ^ ._init.c:1:176: error: expected identifier or '(' <U+0000><U+0005><U+0016><U+0007><U+0000><U+0002><U+0000><U+0000>Mac OS X <U+0000><U+0002><U+0000><U+0000><U+0000> <U+0000><U+0000><U+0000>2<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0002><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>ATTR<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><98><U+0000><U+0000><U+0000><<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0001><U+0000><U+0000><U+0000><98><U+0000><U+0000><U+0000><<U+0000><U+0000><U+0015>com.apple.quarantine<U+0000>q/0081;6437f8f4;Chrome;7DE3FAED-1D72-445E-AD79-0D194F64C58D ^ ._init.c:1:212: warning: null character ignored [-Wnull-character] <U+0000><U+0005><U+0016><U+0007><U+0000><U+0002><U+0000><U+0000>Mac OS X <U+0000><U+0002><U+0000><U+0000><U+0000> <U+0000><U+0000><U+0000>2<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0002><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>ATTR<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><98><U+0000><U+0000><U+0000><<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0001><U+0000><U+0000><U+0000><98><U+0000><U+0000><U+0000><<U+0000><U+0000><U+0015>com.apple.quarantine<U+0000>q/0081;6437f8f4;Chrome;7DE3FAED-1D72-445E-AD79-0D194F64C58D<U+0000> ^ 97 warnings and 8 errors generated. make: *** [._init.o] Error 1 ERROR: compilation failed for package ‘scalop’

If someone can help me :)

ghost commented 1 year ago

Similar issue. @jlaffy

hugo-lef commented 1 year ago

The problem for me was the version of R (4.2.2) that didn't allow me to install the package and was giving me this error. What I did was to create a conda environment with an earlier version of R (4.1 for example) and I was able to reinstall scalop. Hope it helps

ghost commented 1 year ago

All - in addition to Hugo's helpful comments, please see: https://stackoverflow.com/questions/76387189/fatal-error-relating-to-include-s-h-when-installing-r-scalop-package/76387609#76387609