Note that GRASS 5.0 on Win32 is still experimental, so expect some functionality missing or not working.
You need:
Download the file setup.exe to a local disk, run it and follow the instructions. The setup.exe program will prompt you for one of three choices, if you never have loaded the Cygwin software, select download from internet. If you have a previous version you should know what to do. If you have never done this, it will prompt you for a directory to install the files.
If you are new to cygwin, you should look at some of the documentation available at this site.
When installing the Cygwin tools, please select all available packages, or at least:
Please select for the install directory a local drive on your computer with enough space for the entire cygwin distribution (150 MB without X11R6.4), the X11R6.4 installation (additional 65 MB), the grass source code (100 MB), the object files and libraries (around 100 MB) and the grass binaries (programs, 100 MB to 150 MB)). If you want to do real work, you need at least another 500 MB for GRASS data storage.
You need Perl for the manpage-generation with g.html2man. Perl 5.6 now is part of the contrib section, so install it with the main installation.
Now start CYGWIN (double-click the cygwin.bat). A new window will open.
Store the GRASS source code within the Cygwin environment (you can do that even from outside the Cygwin within the Explorer software).
Unpack the source code in any directory of your choice, e. g. in your home directory:
cd $HOME
mkdir grass.src
cd grass.srctar xzf /path/to/file/grass5.0*_src.tar.gz
Go to the root directory (cd /) and unpack this file:
tar xzf /where/ever/you/saved/this/sunrpc-4.0.cygwin1.bin.tar.gz
Please refer to the XFree install guide for further details.
Please check out yourself the actual version and source as this changes frequently.
Go to the root directory (cd /) and unpack this file:
tar xzf /where/ever/you/saved/this/xtcltk-*.tar.gz
ln -s /bin/less /bin/moreOtherwise the grass shell will not run correctly.
Move the ash and shell binary out of the way and create a softlink from bash to sh:
cd /bin
mv ash.exe ash.old
mv sh.exe ash.exe
ln -s bash.exe sh.exeThis fixes a problem with g.manual.
Sometimes 'libz.dll' is not found. Copy it over from /usr/X11R6/lib/libz.dll to /lib/libz.dll.
Do 'export MAKE_MODE=unix' from the command shell (sh, bash). This is usually the default, but it does not hurt to export it.
Add /usr/local/bin and /bin to your path if they are not included (echo $PATH to check, export PATH=/usr/local/bin:/usr/bin:$PATH to add). Please start the compile (see paragraph 7) from within the cygwin shell, not from a DOS/cmd shell under Windows.
For sure i have forgotten something. If a module doesn't compile, get back here and check.
cd /to/source/code/of/grass
./configure --with-postgres=no \ --x-includes=/usr/X11R6/include \ --x-libraries=/usr/X11R6/lib \ --with-tcltk-libs=/usr/local/lib \ --with-tcltk-includes=/usr/local/include
make
make installAll libraries and modules that do not build correctly are listed in the file error.log. Read this file and fix the errors in the source code. Re-run make from the top source directory or proceed from the according directory of the source code with:
gmake5if you already installed GRASS.
Please report any problems, errors and solutions to the GRASS developers mailing list at grass5@grass.itc.it.
Under some circumstances the X11 header files and libraries are not found. The X11 headers are in /usr/X11R6/include, but some stray files are in /usr/include/X11. You should rename or delete this directory, so that it is not found by configure. Please remember that you have to rename or delete this directory each time you update your cygwin installation. The lines in the GRASS header file should read:
XLIBPATH = -L/usr/X11R6/lib
XINCPATH = -I/usr/X11R6/include
and/orXCFLAGS = -I/usr/X11R6/include
No need to create a shell script /bin/yacc
with the contents:
#!/bin/sh
bison --yacc $@
and do a chmod a+x /usr/bin/yacc.
Configure now checks for bison too.
The ipc setup and the ipc-daemon are no longer needed, as sockets are now the default transport mechanism.
The netbpm header files are now part of the GRASS source, but netpbm-9.8 is very userful, so i recommend to install it.
The following libraries are now included in the contrib section for cygwin:
ncurses 5.0 is part of the cygwin distribution now (under contrib).
The check that the #define CURSORS_MAXY is not NONE and the definition of #define HAVE_CURSORS in the file src/include/config.h is already done with configure.
General problems with my build:
see sections PROBLEM in the above text,
g.html2man needs Perl, but Perl is not
included in the standard Cygwin distribution (and i have only installed
a Windows port of Perl).
src/fonts/for_grass: PROBLEM with the
program that converts the fonts to the GRASS internal binary format (only
with Win 9x, not with NT 4.0/2000).