Question: Nonexistent include directory
0
gravatar for kkp7700
3.4 years ago by
kkp77000
kkp77000 wrote:

I compiled my package with "source","binary" in rstudio.

I'm trying to install my package in linux, but I have an error like this.

In windows, installing is good. 

> install.packages("/home/kkp/rvsel_0.1.tar.gz",type="source",dependencies=TRUE)
Installing package into ‘/home/kkp/R/x86_64-redhat-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
inferring 'repos = NULL' from 'pkgs'
* installing *source* package ‘rvsel’ ...
** libs
gfortran -m64  -fpic -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules  -c  maxcorr.f90 -o maxcorr.o
f951: Warning: Nonexistent include directory ‘/usr/lib64/gfortran/modules’ [-Wmissing-include-dirs]
maxcorr.f90:9:12:

       ncard=ncard+2*in(j)-1
            1
Warning: Possible change of value in conversion from REAL(4) to INTEGER(4) at (1) [-Wconversion]
maxcorr.f90:39:26:

       real sx(no),y(no),zs
                          1
Warning: Unused variable ‘zs’ declared at (1) [-Wunused-variable]
gfortran -m64 -shared -L/usr/lib64/R/lib -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o rvsel.so maxcorr.o -L/usr/lib64/R/lib -lR
installing to /home/kkp/R/x86_64-redhat-linux-gnu-library/3.2/rvsel/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package ‘rvsel’
    finding HTML links ... done
    rvsel                                   html  
** building package indices
** testing if installed package can be loaded
* DONE (rvsel)
> library(rvsel)
Loading required package: Matrix

 

ADD COMMENTlink modified 3.4 years ago by Martin Morgan ♦♦ 23k • written 3.4 years ago by kkp77000

Does it work to do this?
 

sudo apt-get install gfortran

 

ADD REPLYlink written 3.4 years ago by Dan Tenenbaum8.2k

Thank you.

Although I have a gcc in /usr/lib, I should install gfortran in lib64?

And I have a question. If users don't have gfortran, they can't install my package?

I want to submit my package to R-CRAN. What should I do?

ADD REPLYlink modified 3.4 years ago • written 3.4 years ago by kkp77000

It seems like your package has fortran code in it, correct (there are .f90 files in src)? Therefore users who build the package from source will need gfortran. On Mac and Windows they can install the CRAN pre-built binaries.

Probably you should put

SystemRequirements: gfortran 

in your DESCRIPTION file, maybe even mentioning the packages that will fulfill this for popular Linux distributions.

 

 

ADD REPLYlink written 3.4 years ago by Dan Tenenbaum8.2k
Thank you so much.....
ADD REPLYlink written 3.4 years ago by kkp77000

Ask CRAN about CRAN package policies using the R-package-devel mailing list for questions. Use the bioc-devel mailing list for questions about submission to Bioconductor.

ADD REPLYlink modified 3.4 years ago • written 3.4 years ago by Martin Morgan ♦♦ 23k
Thank you!!...... :)
ADD REPLYlink written 3.4 years ago by kkp77000
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 242 users visited in the last hour