[GRASS5] Re: GDAL binaries for OSX
Hamish
hamish_nospam at yahoo.com
Tue Dec 9 20:13:27 EST 2003
> I'd like to help out on this, and have started writing a page on notes
> specific to setting up GRASS on OS X. I'll make it available for
> previewing soon, would like to get comments.
Here a some of my notes which may be useful for your write-up.
This is for a binary only install.
GRASS 5.7 on OSX 10.3
1) Install Apple's X11 and friends
Our new system came with OSX 10.3 preinstalled, and past the point of custom
install so I had to download Apple's X11 from their website[1]. After
installing that, I headed over to Applications/Installers/Developer Tools
and double clicked Developer.mpkg; from the custom install list I
choose Devel Tools Software, MacOSX SDK, BSD SDK, and X11 SDK.
2) Setup a root password
Open Apps/Utilities/Terminal and type 'sudo su' and set a strong password.
3) Install R-statistics[2]
This is optional, but useful for geostats. Click on CRAN, choose a mirror,
click on R Binaries, macosx, and download RAqua.dmg. Double click on that
package and install tcltk, libreadline, and finally RAqua. This installs
the OSX port of R to Applications/StartR. I made a link to this application
so I could start R from the command line by typing "R":
(as root)
mkdir /usr/local/bin (if it doesn't already exist)
ln -s /Applications/StartR.app/Contents/MacOS/StartR /usr/local/bin/R
Next, start R and type:
install.packages("akima")
install.packages("VR")
install.packages("GRASS")
install.packages("RODBC")
install.packages("grasper")
install.packages("mgcv")
install.packages("shapefiles")
.. and any other packages that might look interesting to you
The GRASS website has a useful R primer[3].
4) Setup X startup files.
OSX's Terminal looks for .bash_profile but not .bashrc. Apple's X11 looks for
.bashrc but not .bash_profile. Solution (kludge) follows:
.bash_profile:
. ~/.bashrc # does this need to be a hard path for the GRASS init script?
.bashrc:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias ls='ls -FG'
alias ll='ls -la'
alias la='ls -A'
alias dir='/bin/ls'
PATH="$PATH":/usr/local/bin
I also disabled the xterm& in /etc/X11/xinit/xinitrc.
5) Install Fink[4]
Download & run the Fink Installer. Double click on "Fink 0.6.2 Installer.pkg"
and after that is setup, drag the FinkCommander folder to your desktop.
Check this line has been added to all users' .bashrc:
. /sw/bin/init.sh
I ran 'fink configure' to setup which Fink mirror to talk to, but that's not
a strict requirement.
May need to log out & back in to take effect.
6) Run FinkCommander
Setup to use stable packages, it has already guessed to use the 10.3 branch.
This branch is missing some packages as of this writing, but saves time vs.
compiles. I installed: wget, gimp, dlcompat-shlibs (needed for Gimp),
tcklk (yes, again), and gmt. I would have installed nedit and octave if they
were in the stable archive at the time in binary form. Gimp brings down a lot
of goodies like the netpbm tools and libpng which will probably be needed
later. Someone noted about needing the TclTk from unstable for compile??
7) Install PROJ.4 and GDAL
Download[5] and follow Markus's instructions to install PROJ and GDAL.
Then as root, make the following two links:
ln -s /sw/lib/libgdal.1.1.9.dylib /usr/local/lib/libgdal.1.1.dylib
Forget what the second one was, thought it for Proj. What breaks?
These are probably better dealt with by getting /sw/lib added to OSX's
ld path, where ever that lives.
8) Install GRASS
Download[5] and follow Markus's instructions. I found it better to use
wget instead of Safari to do the download to keep the MD5 hash the same
as Safari automatically unpacks the archive.
(as root)
grass57-20_11_2003-powerpc-apple-darwin6.8-install.sh \
grass57-20_11_2003-powerpc-apple-darwin6.8-bin.tar.gz \
/usr/local/grass57
mkdir ~/grassdata
and install the Spearfish, Leics, and Radim's g51test data sets there.
9) Add links to the X11 menu
Start X11 (Apps/Utilities), choose Customize.. from the Applications menu.
Add Item, Add Item. Double click on blanks & fill in:
Name Command
GRASS 5.7 xterm -geometry 123x25+5+400 -e grass57
The GIMP gimp
10) Enjoy. Everything seems to work, even NVIZ.
[1] http://www.apple.com/macosx/features/x11/download/
[2] http://www.r-project.org/
[3] http://grass.ibiblio.org/statsgrass/grass_geostats.html
[4] http://fink.sourceforge.net/
[5] http://mpa.itc.it/markus/grass57/macosx/ [TEMPORARY]
Hamish
More information about the grass-dev
mailing list