[Rd] Install R 2.0 package on R 1.9.1

stefano iacus stefano.iacus at unimi.it
Tue Apr 5 23:31:10 CEST 2005


On 05/apr/05, at 22:51, Paul English wrote:

>
> Hi,
> 	I'm wondering if it is possible to install a package for R 2.0 on R  
> 1.9.1 on Mac OS X?

no, not even on other platforms, R-2.0.x requires packages built for  
these releases

>  I'm getting this error which seems to be known issue:
>
> library("quantreg")
> Error in firstlib(which.lib.loc, package) :
>         couldn't find function "lazyLoad"
> In addition: Warning message:
> package quantreg was built under R version 2.0.1
> Error in library("quantreg") : .First.lib failed
>
> However, on CRAN, the Mac OS X "1.9" directory is just a symlink to  
> the Mac OS X "2.0" directory - there is no separate directory for 1.9  
> packages as best I can tell.
this is not true,
have a look at
http://cran.r-project.org/bin/macosx/2.0
http://cran.r-project.org/bin/macosx/1.9
they are just different (and 1.9 has not been updated since oct 2004)


>
> I did also try building the source package, but that failed. I emailed  
> the packager asking for help, but it can't hurt to ask here as well.  
> The problem is that the package build can't find -lfrtbegin. On Mac OS  
> X this comes from fink so it is installed in /sw. So I untarred the  
> package and edited Makevars to tell the build to look at -L/sw/lib,  
> but interestingly enough that only worked for one gcc line, and not  
> the final linking stage. As you can see below, the final linking stage  
> is also looking for /usr/local/lib/gcc/powerpc-apple-darwin6.6/3.4  
> which doesn't exist. I'm not sure where it is getting that from. I can  
> only guess that autoconf or something is messed up on this machine:
>
> R CMD INSTALL quantreg_3.76.tar.gz
> * Installing *source* package 'quantreg' ...
> ** libs
> g77   -fno-common  -g -O2 -c akj.f -o akj.o
> g77   -fno-common  -g -O2 -c boot.f -o boot.o
> g77   -fno-common  -g -O2 -c bound.f -o bound.o
> g77   -fno-common  -g -O2 -c boundc.f -o boundc.o
> g77   -fno-common  -g -O2 -c chlfct.f -o chlfct.o
> g77   -fno-common  -g -O2 -c cholesky.f -o cholesky.o
> g77   -fno-common  -g -O2 -c extract.f -o extract.o
> gcc -no-cpp-precomp  
> -I/Library/Frameworks/R.framework/Resources/include  
> -I/usr/local/include  -L/opt/sw -fno-common  -g -O2 -c mcmb.c -o  
> mcmb.o
> g77   -fno-common  -g -O2 -c penalty.f -o penalty.o
> g77   -fno-common  -g -O2 -c rls.f -o rls.o
> g77   -fno-common  -g -O2 -c rq1.f -o rq1.o
> g77   -fno-common  -g -O2 -c rqbr.f -o rqbr.o
> g77   -fno-common  -g -O2 -c rqfn.f -o rqfn.o
> g77   -fno-common  -g -O2 -c rqfnb.f -o rqfnb.o
> g77   -fno-common  -g -O2 -c rqfnc.f -o rqfnc.o
> g77   -fno-common  -g -O2 -c sparskit2.f -o sparskit2.o
> g77   -fno-common  -g -O2 -c srqfn.f -o srqfn.o
> g77   -fno-common  -g -O2 -c srqfnc.f -o srqfnc.o
> g77   -fno-common  -g -O2 -c srtpai.f -o srtpai.o
> g77   -fno-common  -g -O2 -c xlapack.f -o xlapack.o
> gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o  
> quantreg.so akj.o boot.o bound.o boundc.o chlfct.o cholesky.o  
> extract.o mcmb.o penalty.o rls.o rq1.o rqbr.o rqfn.o rqfnb.o rqfnc.o  
> sparskit2.o srqfn.o srqfnc.o srtpai.o xlapack.o -framework vecLib  
> -L/usr/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin6.6/3.4  
> -L/usr/local/lib/gcc/powerpc-apple-darwin6.6/3.4/../../.. -lfrtbegin  
> -lg2c -lSystem -lcc_dynamic -framework R
> ld: warning -L: directory name  
> (/usr/local/lib/gcc/powerpc-apple-darwin6.6/3.4) does not exist
> ld: warning -L: directory name  
> (/usr/local/lib/gcc/powerpc-apple-darwin6.6/3.4/../../..) does not  
> exist
> ld: can't locate file for: -lfrtbegin
> make: *** [quantreg.so] Error 1
> ERROR: compilation failed for package 'quantreg'
> ** Removing  
> '/Library/Frameworks/R.framework/Versions/1.9.1/Resources/library/ 
> quantreg'
>

this problem comes from the fact that you have system configured  
differently from how the R binaries has been built, so config files  
distributed with it reflect these differences (in particular this  
folder is relative to the gcc shipped with OS X 10.2, you should  
replace it with the one pointing to the right gcc for your system)
My suggestions is to build R from sources as well following the notes  
on the Faq for Mac OS X or asking to R-sig-Mac.

In any case, you should give us more details on the version of R you  
are using, the OS X version, etc to leave us be helpful.

stefano


> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list