[GRASS-stats] problem installing spgrass6 in R
Roger Bivand
Roger.Bivand at nhh.no
Sun Oct 4 08:31:48 EDT 2009
On Sun, 4 Oct 2009, Tim Holland wrote:
>
> Dear Roger,
>
> I am sorry to keep asking for your time, but I have (what I hope is) a
> fairly simple question if you have a moment.
>
> I reinstalled everything from scratch, using all binaries from KyngChaos and
> what I think was the correct order of installation. And I still had the
> same problem with spgrass6 and rgdal failing on installation. So now I want
> to try what you suggested about using the configure arguments in
> install.packages.
>
> In GRASS, I did the following
>
> GRASS 6.4.0RC5 (mapset):~ > gdal-config --libs
> -L/Library/Frameworks/GDAL.framework/Versions/1.6/unix/lib -lgdal
> GRASS 6.4.0RC5 (mapset):~ > gdal-config --cflags
> -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers
>
> I then wanted to use those paths in R in install.packages. I tried
>
Install rgdal first:
install.packages("rgdal", type="source",
configure.args=c(--with-gdal-config="<where gdal-config is>",
--with-proj-include="<where the proj headers are>",
--with-proj-lib=<where the proj libs are>"))
or something like that. Didn't it seem sensible to install the rgdal OSX
binaries from kyngchaos?
Once rgdal is installed, just install spgrass6 as a source package, no
dependencies, please, and no configure arguments. These are two separate
packages, where rgdal is what spgrass6 uses to do some of its work.
Hope this helps.
Roger
>
> However, I ended up with the same error messages as always regarding
> spgrass6 and rgdal failing to install. Was I doing the right thing with
> 'configure.args'? Was that the right syntax / the right elements?
>
> Thanks for the help,
> Best,
> Tim
>
>
>
> Tim,
>
> One way of handling this might be - if you will only use rgdal from
> "within" GRASS, is to run the install from the rgdal source package in
> that environment. Alternatively, use gdal-config within GRASS to find the
> the GDAL libs (--libs) and headers (--cflags) strings to pass to the
> configure arguments in install.packages() in R outside GRASS. Here rgdal
> will fail after installation if the GDAL shared objects are not on the
> PATH R can see.
>
> Hope this helps,
>
> Roger
>
>
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the grass-stats
mailing list