[GRASS-windows] Compiling grass7 on msys/mingw?

Moritz Lennert mlennert at club.worldonline.be
Wed Dec 17 13:48:56 EST 2008


On 17/12/08 19:17, Colin Nielsen wrote:
> I compiled my own grass 6.3 long ago using the steps provided by Marco
> Pasetti using the following:
> ./configure  --prefix=/usr/local --with-includes=/usr/local/include
> --with-libs=/usr/local/lib --disable-x11 --without-jpeg --without-x
> --with-cxx --enable-shared --enable-largefile --with-opengl=windows
> --with-fftw --with-freetype --with-proj-share=/usr/local/share/proj
> --with-gdal=/usr/local/bin/gdal-config --with-tcltk
> --with-tcltk-includes=/usr/local/tcl-tk/include
> --with-tcltk-libs=/usr/local/tcl-tk/bin --with-sqlite
> --with-sqlite-includes=/usr/local/sqlite/include
> --with-sqlite-libs=/usr/local/sqlite/lib --with-postgres
> --with-postgres-includes=/usr/local/pgsql/include
> --with-postgres-libs=/usr/local/pgsql/lib
> 
> This worked well although as I remember I made a modification or two
> from the original instructions. So now with the same instructions I'm
> trying to compile grass7. It stops when it hits an error on XDR:
> checking for xdrmem_create... no
> checking for xdrmem_create in -lsun... no
> checking for xdrmem_create in -lnsl... no
> checking for xdrmem_create in -lrpclib... no
> checking for xdrmem_create in -lxdr... no
> configure: error: *** Unable to locate XDR functions.
> 
> I originally installed the "xdr-4.0-mingw2" package and also just
> tried "sunrpc-4.0-bin" as I saw on a list somewhere but neither seem
> to fix it. In /usr/local/include/rpc there is xdr.h but for some
> reason configure isn't finding it. Any advice? Are there other reasons
> I should give up on a grass7 build that I'm not aware of? Thanks.

XDR has repeatedly been a problem under windows. Try this (from 
http://www.stjohnspoint.co.uk/grass/README.extralibs)

xdrlib
------

xdr-4.0-mingw2
http://wiki.qgis.org/qgiswiki/BuildingWindowsBinaryOnLinux?action=AttachFile&do=get&target=xdr-4.0-mingw2.tar.gz
(special stripped-down version with networking code removed)

Copy in the config.guess file from the GRASS distribution.
CFLAGS="-O2 -s" CXXFLAGS="-O2 -s" LDFLAGS=-s ./configure 
--prefix=/c/grass/extra
make
make install
(Must compile this as a static library because of obscure problems with 
shared)


Marco, maybe you could update 
http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html#Xdr to 
reflect this better ? Or have you been able to do this differently ?

Moritz


More information about the grass-windows mailing list