Re: [GRASS-stats] Initiation Error: dyld: Library not loaded (rgrass7)

2015-03-06 Thread Rainer M Krug
Benjamin Holland ben.holl...@gmail.com writes:

Hi Benjamin,

Please keep the discussion on the mailing list as others might benefit
From it.

 Thanks, Rainer. Did you install Grass 7 with homebrew. Or are you using
 6.4?

Grass70, grass 64, R gdal, proj - everything via homebrew.

See https://github.com/OSGeo/homebrew-osgeo4mac tap for the formulas -
very useful tap!


 Just to clarify, you're saying that a command needs to be run within R that
 sets the library path? I ran the command line code mentioned earlier. Is
 there something additional to do in R?

The code I used in R is as follow:

--8---cut here---start-8---
switch(
Sys.info()[['sysname']],
Windows = { print(I'm a Windows PC.) },
Linux   = { print(I'm a Penguin.) },
Darwin  = { print(I'm a Mac.);
Sys.setenv( DYLD_LIBRARY_PATH = paste(

/Applications/GRASS-7.0.app/Contents/MacOS/lib,

/Users/rainerkrug/Library/GRASS/7.0/Modules/lib,
/Library/GRASS/7.0/Modules/lib,

/Applications/GRASS-7.0.app/Contents/MacOS/lib/FFTW3.framework/Versions/3,
:DYLD_LIBRARY_PATH,
sep = :
)
   )
}
)
--8---cut here---end---8---

This should be done before you start using grass from R. 

Please be aware that you might have to change some paths. 
Also, if you start R in grass, you don't need this as it is done by
GRASS GIS. It also depends which commands you are using in GRASS -
different some commands require additional paths.

The reason is that the frameworks are kind of isolated containers which
contain everything, including libraries. To avoid conflicts between
different installation (Frameworks or .app folders - they are in these
respect similar), they are not in the universal paths - which is also
the reason that they are not available easily as in Linux from the
terminal. SO programs have to set the paths so that they can find the
libraries in the frameworks.

Homebrew kind of avoids this and has a linux approach with all libraries
which are installed via homebrew are available globally as they are in
the path.

So as I see it, homebrew provides a more consistent environment for the
kind of work one is doing with R and grass.

Hope this helps,

Rainer


 Thanks,

 Ben

 On Thu, Mar 5, 2015 at 3:37 PM, Rainer M Krug r.m.k...@gmail.com wrote:



 Envoyé de mon iPhone

 Le 5 mars 2015 à 20:57, Benjamin Holland ben.holl...@gmail.com a écrit :

 Hi, Rainer,

 I downloaded and installed Grass 7.0 (stable) from here:
 http://grassmac.wikidot.com/downloads

 Up until now, I've been using the Grass 7.0 GUI.

 I'm using R version 3.1.2Installed rgrass7 with this
 command: install.packages(rgrass7, repos=http://R-Forge.R-project.org;,
 type=source)

 Here is the command I ran to initiate:

 initGRASS(gisBase ='/Applications/GRASS-7.0.app/Contents/MacOS',

   location = 'test', mapset = 'test',

   gisDbase = '/Users/benholland/grassdata', override = TRUE)

 The complete error message I received a few minutes ago:

 dyld: Library not loaded:
 /Applications/GRASS/GRASS-7.0.app/Contents/MacOS/lib/libgrass_gis.7.0.0.dylib

   Referenced from: /Applications/GRASS-7.0.app/Contents/MacOS/bin/g.gisenv

   Reason: no suitable image found.  Did find:

 /Applications/GRASS/GRASS-7.0.app/Contents/MacOS/lib/libgrass_gis.7.0.0.dylib:
 stat() failed with errno=13


 When I open the Grass 7 GUI, there is a new location, so part of this code
 is working. However, there is no mapset.


 Thanks for the info.

 I remember having the same problem when using grass installed from the dmg
 file. (I am now using homebrew). You have to set a library path from R so
 that the libraries can be found. I can see if I can find the code tomorrow
 afternoon.

 Cheers,

 Rainer



 Thanks,

 Ben

 On Thu, Mar 5, 2015 at 12:46 PM, Rainer M Krug r.m.k...@gmail.com wrote:



 Envoyé de mon iPhone

 Le 5 mars 2015 à 19:39, Benjamin Holland ben.holl...@gmail.com a
 écrit :

 Hi, all. After some research, I've seen that the dyld error is quite
 common. After successfully installing rgrass7 from source, I tried to
 initiate GRASS in R. This is my first time trying this, so I could be doing
 some things incorrectly. I'm running on OSX Yosemite.


 What is the exact error message?
 When do you get it?
 Which commands did you execute?
 How did you install grass, R, gdal, ... ?
 Which versions?

 More information is needed to provide any help.

 Cheers,

 Rainer

 I tried the troubleshooting suggestion on the grass wiki, but after
 establishing the link to /user/local/lib I'm still getting the same error.
 Does anyone have any suggestions?

 Thanks,

 Ben Holland


 ___
 grass-stats mailing list
 

Re: [GRASS-stats] Initiation Error: dyld: Library not loaded (rgrass7)

2015-03-05 Thread Benjamin Holland
Hi, Rainer,

I downloaded and installed Grass 7.0 (stable) from here:
http://grassmac.wikidot.com/downloads

Up until now, I've been using the Grass 7.0 GUI.

I'm using R version 3.1.2Installed rgrass7 with this
command: install.packages(rgrass7, repos=http://R-Forge.R-project.org;,
type=source)

Here is the command I ran to initiate:

initGRASS(gisBase ='/Applications/GRASS-7.0.app/Contents/MacOS',

  location = 'test', mapset = 'test',

  gisDbase = '/Users/benholland/grassdata', override = TRUE)

The complete error message I received a few minutes ago:

dyld: Library not loaded:
/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/lib/libgrass_gis.7.0.0.dylib

  Referenced from: /Applications/GRASS-7.0.app/Contents/MacOS/bin/g.gisenv

  Reason: no suitable image found.  Did find:

/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/lib/libgrass_gis.7.0.0.dylib:
stat() failed with errno=13


When I open the Grass 7 GUI, there is a new location, so part of this code
is working. However, there is no mapset.


Thanks,

Ben

On Thu, Mar 5, 2015 at 12:46 PM, Rainer M Krug r.m.k...@gmail.com wrote:



 Envoyé de mon iPhone

 Le 5 mars 2015 à 19:39, Benjamin Holland ben.holl...@gmail.com a écrit :

 Hi, all. After some research, I've seen that the dyld error is quite
 common. After successfully installing rgrass7 from source, I tried to
 initiate GRASS in R. This is my first time trying this, so I could be doing
 some things incorrectly. I'm running on OSX Yosemite.


 What is the exact error message?
 When do you get it?
 Which commands did you execute?
 How did you install grass, R, gdal, ... ?
 Which versions?

 More information is needed to provide any help.

 Cheers,

 Rainer

 I tried the troubleshooting suggestion on the grass wiki, but after
 establishing the link to /user/local/lib I'm still getting the same error.
 Does anyone have any suggestions?

 Thanks,

 Ben Holland


 ___
 grass-stats mailing list
 grass-stats@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-stats


___
grass-stats mailing list
grass-stats@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-stats