[GRASS-dev] WinGRASS Wiki Hacking

Glynn Clements glynn at gclements.plus.com
Fri Jun 27 08:53:11 EDT 2008


Marco Pasetti wrote:

> > Also at some stage I think we need to update the "Compiling by yourself" 
> > section to reflect that lots of the libraries are available from Gnuwin32 
> > at http://gnuwin32.sourceforge.net/.
> 
> I'm afraid to come again on this topic, but I definetely checked that many 
> binaries from the GNUWin32 project don't work as expected when building 
> GRASS or other libraries. I can give you many examples: zlib, libpng, 
> libtiff, libjpeg and others... I don't know why, but when I tried to build 
> both GDAL and GRASS with them, they failed... while if I use my builds (from 
> source) they compile! I'm not stubborn, nor I want to reinvent the wheel 
> each time, but I tried... and sometimes they don't work! That's my work 
> procedure: try prebuilt libs first! if they don't work as expected, try 
> build them from source.... and if I say in my guide to build from source 
> instead of use prebuilt binaries, there's actually a reason...

FWIW, I've just built GRASS (SVN head) under MSys/MinGW, and the only
libraries which I needed to compile from source were XDR, PROJ, GDAL
and Tcl/Tk[1]. For the others, I used either the project's own
binaries, or those from GnuWin32.

The resulting binaries have:

  NVIZ:                       yes	[1]
  C++ support:                yes
  FFTW support:               yes	[2]
  FreeType support:           yes
  GDAL support:               yes	[3]
  JPEG support:               yes
  Large File support (LFS):   yes
  NLS support:                yes
  OGR support:                yes
  OpenGL support:             yes
  PNG support:                yes
  Readline support:           yes
  Tcl/Tk support:             yes	[4]
  TIFF support:               yes

And lack:

  BLAS support:               no
  Cairo support:              no	[5]
  DWG support:                no
  FFMPEG support:             no
  GLw support:                no
  LAPACK support:             no
  Motif support:              no
  MySQL support:              no
  ODBC support:               no
  PostgreSQL support:         no
  Python support:             no
  SQLite support:             no
  wxWidgets support:          no
  X11 support:                no

[1] I had to commit a fix to NVIZ to get it to compile; the previous
change neglected to conditionalise some X11-specific code.

[2] I had to copy libfftw3-3.dll to libfftw3.dll. I suppose that we
could extend the configure check to try -lfftw3-3.

[3] For GDAL, I used its internal versions of the Zlib/TIFF/JPEG/PNG
libraries, and no other dependencies. So far as compiling GRASS is
concerned, you only need a minimal version of GDAL. You can always
replace the GDAL DLL with a more feature-rich version later.

[4] Actually, I haven't tried using a pre-compiled Tcl/Tk binary. I'm
not sure that we should recommend the ActiveState version due to the
licensing terms.

[5] The Cairo checks need pkg-config; however, after manually hacking
Platform.make, I got lib/cairodriver to compile after a minor fix
(which I have committed). I'm thinking that it may be worth adding
--with-cairo-{cflags,ldflags}= options to eliminate the requirement
for pkg-config.

Once I get over the resulting Windows fatigue, I'll look into enabling
some more features.

GLw and Motif depend upon X11; GLw is no longer used, Motif is only
used for xganim. AFAIK, BLAS/LAPACK still aren't actually used for
anything which is part of GRASS itself.

I suppose that wxPython is probably the most important omission. The
main issue here is the lack of python-config on Windows.

AFAICT, SQLite will need to be compiled from source; the only binary
package I could find only contains the DLL, not the headers.

In the meantime, can we put the binaries for XDR, PROJ, GDAL and
Tcl/Tk on the GRASS site? We really shouldn't be forcing people to
compile these themselves before they can even start trying to compile
GRASS. Especially XDR, PROJ, and GDAL, which are mandatory
dependencies.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list