zhengxwen / SNPRelate

R package: parallel computing toolset for relatedness and principal component analysis of SNP data (Development version only)
http://www.bioconductor.org/packages/SNPRelate
101 stars 25 forks source link

error installing from bioconductor #11

Closed eparejatobes closed 9 years ago

eparejatobes commented 9 years ago

Installing through biocLite("SNPRelate", dependencies = TRUE) I get the following errors; any ideas? thanks

* installing *source* package ‘SNPRelate’ ...
** libs
g++ -m64 -I/usr/include/R -DNDEBUG -DUSING_R -I. -I/usr/local/include -I"/usr/lib64/R/library/gdsfmt/include"   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c ConvToGDS.cpp -o ConvToGDS.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -DUSING_R -I. -I/usr/local/include -I"/usr/lib64/R/library/gdsfmt/include"   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c R_SNPRelate.c -o R_SNPRelate.o
In file included from R_SNPRelate.c:17:0:
./R_GDS_Patch.h:97:26: error: conflicting types for ‘GDS_R_Array_Read’
 COREARRAY_DLL_LOCAL SEXP GDS_R_Array_Read(PdAbstractArray Obj,
                          ^
In file included from ./R_GDS_Patch.h:41:0,
                 from R_SNPRelate.c:17:
/usr/lib64/R/library/gdsfmt/include/R_GDS.h:154:14: note: previous declaration of ‘GDS_R_Array_Read’ was here
  extern SEXP GDS_R_Array_Read(PdAbstractArray Obj, const C_Int32 *Start,
              ^
In file included from R_SNPRelate.c:17:0:
./R_GDS_Patch.h:109:26: error: conflicting types for ‘GDS_R_Apply’
 COREARRAY_DLL_LOCAL void GDS_R_Apply(int Num, PdAbstractArray ObjList[],
                          ^
In file included from ./R_GDS_Patch.h:41:0,
                 from R_SNPRelate.c:17:
/usr/lib64/R/library/gdsfmt/include/R_GDS.h:158:14: note: previous declaration of ‘GDS_R_Apply’ was here
  extern void GDS_R_Apply(int Num, PdAbstractArray ObjList[],
              ^
make: *** [R_SNPRelate.o] Error 1
ERROR: compilation failed for package ‘SNPRelate’
* removing ‘/usr/lib64/R/library/SNPRelate’
zhengxwen commented 9 years ago

It is weired, and it seems that biocLite downloads SNPRelate from bioconductor extra repository instead bioconductor repository.

So would you mind downloading gdsfmt and SNPRelate sources and installing the packages:

wget --no-check-certificate https://github.com/zhengxwen/gdsfmt/tarball/master -O gdsfmt_latest.tar.gz
wget --no-check-certificate https://github.com/zhengxwen/SNPRelate/tarball/master -O SNPRelate_latest.tar.gz

** Install **
R CMD INSTALL gdsfmt_latest.tar.gz
R CMD INSTALL SNPRelate_latest.tar.gz
zhengxwen commented 9 years ago

I see the problem now. SNPRelate_1.0.1 will be committed to the release branch of Bioconductor.