Rsubread Installation error
1
0
Entering edit mode
@chitsazanalex-11765
Last seen 5.9 years ago

Hey all,

I am getting an error when trying to install Rsubread on our server. Our cluster uses the module system and what's weird is that it only occurs with r_3.3.3 and installs properly with the msropen_3.3.2 version. All of my other packages are loaded with r_3.3.3 though so I want to install it with r_3.3.3. I have searched and found an old post on the support website (https://support.bioconductor.org/p/36641/) which seems similar but I can't figure out how to apply it to my case. Any ideas? 

 

> biocLite("Rsubread", type="source")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.4 (BiocInstaller 1.24.0), R 3.3.3 (2017-03-06).
Installing package(s) ‘Rsubread’
trying URL 'https://bioconductor.org/packages/3.4/bioc/src/contrib/Rsubread_1.24.2.tar.gz'
Content type 'unknown' length 9277377 bytes (8.8 MB)
==================================================
downloaded 8.8 MB
* installing *source* package ‘Rsubread’ ...
@@@@@ The operating system is Linux.
** libs
icc -std=gnu99 -I/sw/R-3.3.3/lib64/R/include -DNDEBUG  -I/usr/local/include   -DMAKE_FOR_EXON -D SUBREAD_VERSION="\"Rsubread 1.24.2\"" -fpic  -g -O2 -std=c99  -c HelperFunctions.c -o HelperFunctions.o
HelperFunctions.c(822): error: incomplete type is not allowed
      struct ifreq ifr;
                   ^
HelperFunctions.c(823): error: incomplete type is not allowed
      struct ifconf ifc;
                    ^
HelperFunctions.c(835): error: incomplete type is not allowed
      const struct ifreq* const end = it + (ifc.ifc_len / sizeof(struct ifreq));
                                                                 ^
HelperFunctions.c(837): error: expression must be a pointer to a complete object type
      for (; it != end; ++it) {
                          ^
HelperFunctions.c(838): error: pointer to incomplete class type is not allowed
          strcpy(ifr.ifr_name, it->ifr_name);
                               ^
HelperFunctions.c(840): error: identifier "IFF_LOOPBACK" is undefined
              if (! (ifr.ifr_flags & IFF_LOOPBACK)) { // don't count loopback
                                     ^
HelperFunctions.c(1009): warning #266: function "strtok_r" declared implicitly
              feature_name = strtok_r(file_line,"\t",&token_temp);
                             ^
HelperFunctions.c(1009): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
              feature_name = strtok_r(file_line,"\t",&token_temp);
                                                     ^
HelperFunctions.c(1013): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
              chro_name = strtok_r(NULL,"\t", &token_temp);
                                              ^
HelperFunctions.c(1017): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
              char * start_ptr = strtok_r(NULL,"\t", &token_temp);
                                                     ^
HelperFunctions.c(1018): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
              char * end_ptr = strtok_r(NULL,"\t", &token_temp);
                                                   ^
HelperFunctions.c(1039): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
              char * strand_str = strtok_r(NULL,"\t", &token_temp);
                                                      ^
HelperFunctions.c(1048): warning #266: function "strtok_r" declared implicitly
              chro_name = strtok_r(file_line,"\t",&token_temp);
                          ^
HelperFunctions.c(1048): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
              chro_name = strtok_r(file_line,"\t",&token_temp);
                                                  ^
HelperFunctions.c(1049): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
              strtok_r(NULL,"\t", &token_temp);// source
                                  ^
HelperFunctions.c(1050): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
              char * feature_type = strtok_r(NULL,"\t", &token_temp);// feature_type
                                                        ^
HelperFunctions.c(1053): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
                  char * start_ptr = strtok_r(NULL,"\t", &token_temp);
                                                         ^
HelperFunctions.c(1054): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
                  char * end_ptr = strtok_r(NULL,"\t", &token_temp);
                                                       ^
HelperFunctions.c(1080): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
                  strtok_r(NULL,"\t", &token_temp);// score
                                      ^
HelperFunctions.c(1081): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
                  is_negative_strand = ('-' == (strtok_r(NULL,"\t", &token_temp)[0]));//strand
                                                                    ^
HelperFunctions.c(1081): error: expression must have arithmetic type
                  is_negative_strand = ('-' == (strtok_r(NULL,"\t", &token_temp)[0]));//strand
                                               ^
HelperFunctions.c(1082): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
                  strtok_r(NULL,"\t",&token_temp);    // "frame"
                                     ^
HelperFunctions.c(1083): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
                  char * extra_attrs = strtok_r(NULL,"\t",&token_temp);   // name_1 "val1"; name_2 "val2"; ...
                                                          ^
HelperFunctions.c(1134): warning #266: function "strtok_r" declared implicitly
          char * anno_chr = strtok_r(fl, ",", &sam_chr);
                            ^
HelperFunctions.c(1134): warning #167: argument of type "char **" is incompatible with parameter of type "char *"
          char * anno_chr = strtok_r(fl, ",", &sam_chr);
                                              ^
compilation aborted for HelperFunctions.c (code 2)
make: *** [HelperFunctions.o] Error 2
ERROR: compilation failed for package ‘Rsubread’
* removing ‘/gscratch/home/achits/R/x86_64-pc-linux-gnu-library/3.3/Rsubread’
* restoring previous ‘/gscratch/home/achits/R/x86_64-pc-linux-gnu-library/3.3/Rsubread’
The downloaded source packages are in
    ‘/tmp/Rtmp1Zc3Sl/downloaded_packages’
installation path not writeable, unable to update packages: boot, cluster,
  foreign, lattice, MASS, Matrix, mgcv, Rcpp, rpart, survival
Warning message:
In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘Rsubread’ had non-zero exit status
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
[3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
[5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
[9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] BiocInstaller_1.24.0
loaded via a namespace (and not attached):
[1] tools_3.3.3
rsubread compilation error • 1.9k views
ADD COMMENT
0
Entering edit mode
Wei Shi ★ 3.6k
@wei-shi-2183
Last seen 7 days ago
Australia/Melbourne/Olivia Newton-John …

The compilation errors are caused by the use of compiler 'icc'. Rsubread has been comprehensively tested on compiler 'gcc' but not on 'icc'.

I think you will probably have to switch to gcc for compiling Rsubread. The following page provides useful advice for how to do so:

https://stackoverflow.com/questions/1616983/building-r-packages-using-alternate-gcc

ADD COMMENT
0
Entering edit mode

That did not work unfortunately. Still got a very similar error. 

 

[n2232 ~]$ gcc --version

gcc (GCC) 6.2.0

Copyright (C) 2016 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


[achits@n2232 ~]$ R CMD INSTALL --clean Rsubread_1.28.1.tar.gz

* installing to library ‘/gscratch/home/achits/R/x86_64-pc-linux-gnu-library/3.3’

* installing *source* package ‘Rsubread’ ...

@@@@@ The operating system is Linux.

** libs

gcc -I/sw/R-3.3.3/lib64/R/include -DNDEBUG  -I/usr/local/include   -DMAKE_FOR_EXON -D SUBREAD_VERSION="\"Rsubread 1.28.1\"" -w -fpic  -g -O2 -std=c99  -c HelperFunctions.c -o HelperFunctions.o

HelperFunctions.c: In function ‘mac_str’:

HelperFunctions.c:824:18: error: storage size of ‘ifr’ isn’t known

     struct ifreq ifr;

                  ^~~

HelperFunctions.c:825:19: error: storage size of ‘ifc’ isn’t known

     struct ifconf ifc;

                   ^~~

HelperFunctions.c:837:64: error: invalid application of ‘sizeof’ to incomplete type ‘struct ifreq’

     const struct ifreq* const end = it + (ifc.ifc_len / sizeof(struct ifreq));

                                                                ^~~~~~

HelperFunctions.c:839:23: error: increment of pointer to an incomplete type ‘struct ifreq’

     for (; it != end; ++it) {

                       ^~

HelperFunctions.c:840:32: error: dereferencing pointer to incomplete type ‘struct ifreq’

         strcpy(ifr.ifr_name, it->ifr_name);

                                ^~

HelperFunctions.c:842:36: error: ‘IFF_LOOPBACK’ undeclared (first use in this function)

             if (! (ifr.ifr_flags & IFF_LOOPBACK)) { // don't count loopback

                                    ^~~~~~~~~~~~

HelperFunctions.c:842:36: note: each undeclared identifier is reported only once for each function it appears in

HelperFunctions.c: In function ‘load_features_annotation’:

HelperFunctions.c:1083:67: error: subscripted value is neither array nor pointer nor vector

     is_negative_strand = ('-' == (strtok_r(NULL,"\t", &token_temp)[0]));//strand

                                                                   ^

make: *** [HelperFunctions.o] Error 1

ERROR: compilation failed for package ‘Rsubread’

* removing ‘/gscratch/home/achits/R/x86_64-pc-linux-gnu-library/3.3/Rsubread’
ADD REPLY
1
Entering edit mode

I don't know what caused this problem. You tried to install Rsubread version 1.28.1 on R 3.3.3, but this version of Rsubread is released with R 3.4.3. Not sure if it is the difference in R version causing this compilation problem.

ADD REPLY
0
Entering edit mode

Yeah that worked. Probably a much better idea. Thanks for the input

Alex

ADD REPLY
0
Entering edit mode

Hello. I have encountered the same issue. I have tried the approach of using gcc to compile the package but unfortunately it doesn't work. Can you let me know how you resolved this problem please?

Many thanks,

Tom

ADD REPLY
0
Entering edit mode

If the issue you encountered is the same as the issue reported above, then have you checked if your Rsubread version matches the version of R?
 

ADD REPLY

Login before adding your answer.

Traffic: 708 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6