Skip to content

Problem installing packages in newer versions of R

4 messages · Miha Staut, Hadley Wickham, Peter Dalgaard

#
Dear all,

I was wandering what could be wrong with my system (regularly updated Fedora core 8) so that installing packages does not succeed with almost every package. I follow the procedure specified in the help file R-admin section 6.3. This is not a feature new to the current version but happened (to me) in the previous version as well. Additionally R-help html pages try to follow wrong links for the packages that manage to get thorough install.packages() (e.g. RColorBrewer). Should I specify a different lib.loc during install.packages()? My base packages currently reside in /usr/lib/R/library, however, html links for the mentioned contributed package RColorBrewer try to follow a non-existent /usr/share/doc/library/RColorBrewer/html/00Index.html. Why? What should I set to make my default library location (for html links as well) /usr/lib/R/library and default R location /usr/lib/R? 

Are these two problems connected or the are not?

I have even built the rpm from src.rpm myself but with no change. 

Below you may find the (error) output from installing the akima package. It might give a clue. 

Thanks for your help.
Miha

-----------------
Warning in install.packages("akima", repos = "http://cran.r-project.org",  :
  argument 'lib' is missing: using '/usr/lib/R/library'
trying URL 'http://cran.r-project.org/src/contrib/akima_0.5-1.tar.gz'
Content type 'application/x-gzip' length 148838 bytes (145 Kb)
opened URL
==================================================
downloaded 145 Kb

* Installing *source* package 'akima' ...
** libs
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c akima433.f -o akima433.o
 In file akima433.f:49

        IF(X(I-1)-X(I))   11,95,96
                                                                       1
Warning: Obsolete: arithmetic IF statement at (1)
 In file akima433.f:38

    10 L0=L
    1
Warning: Label 1 at (1) defined but not used
 In file akima433.f:56

   20   IF(LM2.EQ.0)      GO TO 27
    1
Warning: Label 20 at (1) defined but not used
 In file akima433.f:63

   22   IMX=I
    1
Warning: Label 22 at (1) defined but not used
 In file akima433.f:79

   40   J=I
    1
Warning: Label 40 at (1) defined but not used
 In file akima433.f:166

   99 ERR = 10
    1
Warning: Label 99 at (1) defined but not used
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c akima697.f -o akima697.o
 In file akima697.f:88

   10 IF (ND.LE.1)   GO TO 90
    1
Warning: Label 10 at (1) defined but not used
 In file akima697.f:97

   20 NP0=MAX(3,NP)
    1
Warning: Label 20 at (1) defined but not used
 In file akima697.f:103

   30 DO 39  II=1,NI
    1
Warning: Label 30 at (1) defined but not used
 In file akima697.f:398

   99 ERR=10
    1
Warning: Label 99 at (1) defined but not used
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c akima.new.f -o akima.new.o
akima.new.f: In function ?sdplnl?:
akima.new.f:1904: warning: ?zii1? may be used uninitialized in this function
akima.new.f:1903: warning: ?y0? may be used uninitialized in this function
akima.new.f:1903: warning: ?wt2? may be used uninitialized in this function
akima.new.f:1903: warning: ?p50? may be used uninitialized in this function
akima.new.f:1903: warning: ?p41? may be used uninitialized in this function
akima.new.f:1902: warning: ?p40? may be used uninitialized in this function
akima.new.f:1902: warning: ?p31? may be used uninitialized in this function
akima.new.f:1902: warning: ?p32? may be used uninitialized in this function
akima.new.f:1903: warning: ?x0? may be used uninitialized in this function
akima.new.f:1902: warning: ?p22? may be used uninitialized in this function
akima.new.f:1902: warning: ?p21? may be used uninitialized in this function
akima.new.f:1902: warning: ?p23? may be used uninitialized in this function
akima.new.f:1902: warning: ?p13? may be used uninitialized in this function
akima.new.f:1902: warning: ?p14? may be used uninitialized in this function
akima.new.f:1901: warning: ?p12? may be used uninitialized in this function
akima.new.f:1902: warning: ?p20? may be used uninitialized in this function
akima.new.f:1901: warning: ?p10? may be used uninitialized in this function
akima.new.f:1901: warning: ?p04? may be used uninitialized in this function
akima.new.f:1901: warning: ?p02? may be used uninitialized in this function
akima.new.f:1901: warning: ?p03? may be used uninitialized in this function
akima.new.f:1901: warning: ?p05? may be used uninitialized in this function
akima.new.f:1901: warning: ?p11? may be used uninitialized in this function
akima.new.f:1902: warning: ?p30? may be used uninitialized in this function
akima.new.f:1901: warning: ?p00? may be used uninitialized in this function
akima.new.f:1900: warning: ?cp? may be used uninitialized in this function
akima.new.f:1899: warning: ?bp? may be used uninitialized in this function
akima.new.f:1898: warning: ?ap? may be used uninitialized in this function
akima.new.f:1900: warning: ?dp? may be used uninitialized in this function
akima.new.f:1901: warning: ?p01? may be used uninitialized in this function
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c idbvip.f -o idbvip.o
 In file idbvip.f:65

   10 MD0=MD
    1
Warning: Label 10 at (1) defined but not used
 In file idbvip.f:70

   20 IF(MD0.LT.1.OR.MD0.GT.3)           GO TO 90
    1
Warning: Label 20 at (1) defined but not used
 In file idbvip.f:102

   40 IF(MD0.GT.1)   GO TO 50
    1
Warning: Label 40 at (1) defined but not used
 In file idbvip.f:126

   80 ITPV=0
    1
Warning: Label 80 at (1) defined but not used
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c idcldp.f -o idcldp.o
 In file idcldp.f:2

      SUBROUTINE  IDCLDP(NDP,XD,YD,NCP,IPC)
                                                                       1
Warning: Line truncated at (1)
 In file idcldp.f:28

   10 NDP0=NDP
    1
Warning: Label 10 at (1) defined but not used
 In file idcldp.f:33

   20 DO 59  IP1=1,NDP0
    1
Warning: Label 20 at (1) defined but not used
 In file idcldp.f:76

   40   NCLPT=0
    1
Warning: Label 40 at (1) defined but not used
idcldp.f: In function ?idcldp?:
idcldp.f:47: warning: ?jmx? may be used uninitialized in this function
idcldp.f:90: warning: ?ip3mn? may be used uninitialized in this function
idcldp.f:87: warning: ?dsqmn? may be used uninitialized in this function
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c idgrid.f -o idgrid.o
 In file idgrid.f:90

            IF (SIDE(X1,Y1,X2,Y2,XII,YII)) 130, 40, 50
                                                                       1
Warning: Obsolete: arithmetic IF statement at (1)
 In file idgrid.f:92

   50       IF (SIDE(X2,Y2,X3,Y3,XII,YII)) 130, 60, 70
                                                                       1
Warning: Obsolete: arithmetic IF statement at (1)
 In file idgrid.f:94

   70       IF (SIDE(X3,Y3,X1,Y1,XII,YII)) 130, 80, 90
                                                                       1
Warning: Obsolete: arithmetic IF statement at (1)
 In file idgrid.f:154

            IF (SIDE(X1,Y1,X2,Y2,XII,YII)) 210, 200, 290
                                                                       1
Warning: Obsolete: arithmetic IF statement at (1)
 In file idgrid.f:156

  210       IF (SPDT(X2,Y2,X1,Y1,XII,YII)) 290, 220, 230
                                                                       1
Warning: Obsolete: arithmetic IF statement at (1)
 In file idgrid.f:158

  230       IF (SPDT(X1,Y1,X2,Y2,XII,YII)) 290, 240, 250
                                                                       1
Warning: Obsolete: arithmetic IF statement at (1)
 In file idgrid.f:213

            IF (SPDT(X1,Y1,X2,Y2,XII,YII)) 360, 350, 420
                                                                       1
Warning: Obsolete: arithmetic IF statement at (1)
 In file idgrid.f:215

  360       IF (SPDT(X3,Y3,X2,Y2,XII,YII)) 380, 370, 420
                                                                       1
Warning: Obsolete: arithmetic IF statement at (1)
idgrid.f: In function ?idgrid?:
idgrid.f:80: warning: ?iximn? may be used uninitialized in this function
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c idlctn.f -o idlctn.o
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c idpdrv.f -o idpdrv.o
 In file idpdrv.f:2

      SUBROUTINE  IDPDRV(NDP,XD,YD,ZD,NCP,IPC,PD)
                                                                       1
Warning: Line truncated at (1)
 In file idpdrv.f:23

   10 NDP0=NDP
    1
Warning: Label 10 at (1) defined but not used
 In file idpdrv.f:27

  20  DO 24  IP0=1,NDP0
   1
Warning: Label 20 at (1) defined but not used
 In file idpdrv.f:66

   30 DO 34  IP0=1,NDP0
    1
Warning: Label 30 at (1) defined but not used
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c idptip.f -o idptip.o
 In file idptip.f:43

   10 IT0=ITI
    1
Warning: Label 10 at (1) defined but not used
 In file idptip.f:60

   21 JIPT=3*(IT0-1)
    1
Warning: Label 21 at (1) defined but not used
 In file idptip.f:78

   24 X0=X(1)
    1
Warning: Label 24 at (1) defined but not used
 In file idptip.f:93

   25 AA=A*A
    1
Warning: Label 25 at (1) defined but not used
 In file idptip.f:111

   27 P00=Z(1)
    1
Warning: Label 27 at (1) defined but not used
 In file idptip.f:169

   31 P0=P00+V*(P01+V*(P02+V*(P03+V*(P04+V*P05))))
    1
Warning: Label 31 at (1) defined but not used
 In file idptip.f:183

   41 JIPL=3*(IL1-1)
    1
Warning: Label 41 at (1) defined but not used
 In file idptip.f:201

   44 X0=X(1)
    1
Warning: Label 44 at (1) defined but not used
 In file idptip.f:216

   45 AA=A*A
    1
Warning: Label 45 at (1) defined but not used
 In file idptip.f:234

   47 P00=Z(1)
    1
Warning: Label 47 at (1) defined but not used
 In file idptip.f:260

   51 P0=P00+V*(P01+V*(P02+V*(P03+V*(P04+V*P05))))
    1
Warning: Label 51 at (1) defined but not used
 In file idptip.f:270

   61 JIPL=3*IL2-2
    1
Warning: Label 61 at (1) defined but not used
 In file idptip.f:281

   67 P00=Z(1)
    1
Warning: Label 67 at (1) defined but not used
 In file idptip.f:292

   71 P0=P00+V*(P01+V*P02)
    1
Warning: Label 71 at (1) defined but not used
idptip.f: In function ?idptip?:
idptip.f:79: warning: ?y0? may be used uninitialized in this function
idptip.f:78: warning: ?x0? may be used uninitialized in this function
idptip.f:121: warning: ?p40? may be used uninitialized in this function
idptip.f:134: warning: ?p41? may be used uninitialized in this function
idptip.f:160: warning: ?p32? may be used uninitialized in this function
idptip.f:120: warning: ?p30? may be used uninitialized in this function
idptip.f:139: warning: ?p31? may be used uninitialized in this function
idptip.f:159: warning: ?p22? may be used uninitialized in this function
idptip.f:114: warning: ?p20? may be used uninitialized in this function
idptip.f:135: warning: ?p14? may be used uninitialized in this function
idptip.f:138: warning: ?p21? may be used uninitialized in this function
idptip.f:143: warning: ?p13? may be used uninitialized in this function
idptip.f:161: warning: ?p23? may be used uninitialized in this function
idptip.f:112: warning: ?p10? may be used uninitialized in this function
idptip.f:115: warning: ?p11? may be used uninitialized in this function
idptip.f:128: warning: ?p05? may be used uninitialized in this function
idptip.f:126: warning: ?p03? may be used uninitialized in this function
idptip.f:127: warning: ?p04? may be used uninitialized in this function
idptip.f:142: warning: ?p12? may be used uninitialized in this function
idptip.f:111: warning: ?p00? may be used uninitialized in this function
idptip.f:113: warning: ?p01? may be used uninitialized in this function
idptip.f:89: warning: ?cp? may be used uninitialized in this function
idptip.f:90: warning: ?dp? may be used uninitialized in this function
idptip.f:87: warning: ?ap? may be used uninitialized in this function
idptip.f:88: warning: ?bp? may be used uninitialized in this function
idptip.f:116: warning: ?p02? may be used uninitialized in this function
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c idptli.f -o idptli.o
 In file idptli.f:3

     1                   MISSII)
                                                                       1
Warning: Line truncated at (1)
 In file idptli.f:34

   10 IT0=ITI
    1
Warning: Label 10 at (1) defined but not used
 In file idptli.f:43

   21 JIPT=3*(IT0-1)
    1
Warning: Label 21 at (1) defined but not used
 In file idptli.f:55

   24 X0=X(1)
    1
Warning: Label 24 at (1) defined but not used
 In file idptli.f:2

      SUBROUTINE  IDPTLI(XD,YD,ZD,NDP,NT,IPT,NL,IPL,ITI,XII,YII,ZII,
                                                  1
Warning: Unused variable ipl declared at (1)
idptli.f: In function ?idptli?:
idptli.f:55: warning: ?x0? may be used uninitialized in this function
idptli.f:56: warning: ?y0? may be used uninitialized in this function
idptli.f:66: warning: ?cp? may be used uninitialized in this function
idptli.f:65: warning: ?bp? may be used uninitialized in this function
idptli.f:64: warning: ?ap? may be used uninitialized in this function
idptli.f:67: warning: ?dp? may be used uninitialized in this function
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c idsfft.f -o idsfft.o
 In file idsfft.f:69

   10 MD0=MD
    1
Warning: Label 10 at (1) defined but not used
 In file idsfft.f:75

   20 IF(MD0.LT.1.OR.MD0.GT.3)           GO TO 90
    1
Warning: Label 20 at (1) defined but not used
 In file idsfft.f:110

   40 IF(MD0.GT.1)   GO TO 50
    1
Warning: Label 40 at (1) defined but not used
 In file idsfft.f:129

   80 ITPV=0
    1
Warning: Label 80 at (1) defined but not used
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c idtang.f -o idtang.o
 In file idtang.f:2

      SUBROUTINE  IDTANG(NDP,XD,YD,NT,IPT,NL,IPL,IWL,IWP,WK)
                                                                       1
Warning: Line truncated at (1)
 In file idtang.f:53

   10 NDP0=NDP
    1
Warning: Label 10 at (1) defined but not used
 In file idtang.f:57

   20 DSQMN=DSQF(XD(1),YD(1),XD(2),YD(2))
    1
Warning: Label 20 at (1) defined but not used
 In file idtang.f:79

   30 JP1=2
    1
Warning: Label 30 at (1) defined but not used
 In file idtang.f:101

   35 AR=DSQ12*RATIO
    1
Warning: Label 35 at (1) defined but not used
 In file idtang.f:148

   50 DO 79  JP1=4,NDP0
    1
Warning: Label 50 at (1) defined but not used
 In file idtang.f:260

   70   NTT3P3=NTT3+3
    1
Warning: Label 70 at (1) defined but not used
 In file idtang.f:345

   80 DO 81  ITT3=3,NTT3,3
    1
Warning: Label 80 at (1) defined but not used
idtang.f: In function ?idtang?:
idtang.f:226: warning: ?nln? may be used uninitialized in this function
idtang.f:227: warning: ?nlnt3? may be used uninitialized in this function
gfortran -m32   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c idxchg.f -o idxchg.o
 In file idxchg.f:2

      FUNCTION  IDXCHG(X,Y,NDP,I1,I2,I3,I4)
                                                                       1
Warning: Line truncated at (1)
 In file idxchg.f:20

   10 X1=X(I1)
    1
Warning: Label 10 at (1) defined but not used
 In file idxchg.f:29

   20 IDX=0
    1
Warning: Label 20 at (1) defined but not used
gcc -m32 -std=gnu99 -I/usr/include/R  -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c init.c -o init.o
init.c:2:15: error: R.h: No such file or directory
init.c:3:24: error: Rinternals.h: No such file or directory
In file included from init.c:5:
akima.h:7: error: ?F77_NAME? declared as function returning a function
akima.h:7: warning: parameter names (without types) in function declaration
akima.h:12: error: ?F77_NAME? declared as function returning a function
akima.h:12: warning: parameter names (without types) in function declaration
akima.h:18: error: ?F77_NAME? declared as function returning a function
akima.h:18: warning: parameter names (without types) in function declaration
akima.h:23: error: ?F77_NAME? declared as function returning a function
akima.h:23: warning: parameter names (without types) in function declaration
akima.h:26: error: ?F77_NAME? declared as function returning a function
akima.h:26: warning: parameter names (without types) in function declaration
akima.h:29: error: ?F77_NAME? declared as function returning a function
akima.h:29: warning: parameter names (without types) in function declaration
init.c:7:28: error: R_ext/Rdynload.h: No such file or directory
init.c:11: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?idbvip_t?
init.c:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?sdbi3p_t?
init.c:46: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?idsfft_t?
init.c:63: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?sdsf3p_t?
init.c:83: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?uvip3p_t?
init.c:94: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?intrpl_t?
init.c:104: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?fortranMethods?
init.c:115: error: expected ?)? before ?*? token
make: *** [init.o] Error 1
ERROR: compilation failed for package 'akima'
** Removing '/usr/lib/R/library/akima'
Updating HTML index of packages in '.Library'
Warning message:
In install.packages("akima", repos = "http://cran.r-project.org",  :
  installation of package 'akima' had non-zero exit status
-----------------
#
Hi Miha,

One tip for diagnosing build problems is to ignore all warnings and
look for the first error.  In your case it's:

init.c:2:15: error: R.h: No such file or directory
init.c:3:24: error: Rinternals.h: No such file or directory

Which possibly suggests that you don't have the necessary headers.
One common reason for this is that you haven't installed the
development rpm for R which contains all the header files to compile
stuff - you probably just have the user package which allows you to
use R.

Hadley
On Thu, Sep 18, 2008 at 10:04 AM, Miha Staut <mihastaut at yahoo.co.uk> wrote:

  
    
#
Miha Staut wrote:
You need to install the R-devel RPM.
#
Thanks for your help Hadley and Peter. 

Your suggestions solved the question of installing new packages. But what can be done to get rid of the other mentioned problem in html help files. I am repeating what the problem is. After installation of new packages R-html help files try to follow non-existent links for new packages. The help files for akima, for instance, reside in /usr/lib/R/library/akima/html/00index.html, the link however leads to this address /usr/share/doc/library/akima/html/00index.html. 

I know it is a minor problem but I am used to query html help a lot and it bothers. 

Thanks again
Miha
--- On Thu, 18/9/08, hadley wickham <h.wickham at gmail.com> wrote: