[GRASSLIST:2772] Re: compiling grass and gd includes

Glynn Clements glynn.clements at virgin.net
Fri Dec 7 15:17:46 EST 2001


cmbarton wrote:

> >> Should I let the configure script default to without gdal?
> >
> > At present, r.in.gdal is always included in the build. --with-gdal
> > simply tries to link it to libgdal at build time. Without this switch,
> > r.in.gdal will attempt to load it via dlopen(). This will probably
> > fail on MacOSX; the code expects the library to have one of the
> > following names:
> >
> > 	libgdal.1.1.so
> > 	gdal.1.0.so
> > 	gdal.so.1.0
> > 	libgdal.so.1
> >
> > If you need r.in.gdal, I'd suggest editing the file src/CMD/head/head
> > after running "configure" but before running "make". But, AFAICT, this
> > approach requires the GDAL headers to be installed.
> 
> I would like to have r.in.gdal. I'll check the head file as you suggest. 
> Interestingly, I am running r.in.gdal on the precompiled Mac OSX binary 
> with only the gdal dylib.

That's to be expected. The headers are only needed for compilation;
only the dynamic library is required to run the resulting executable.

> I had to change my login shell script to set 
> the DYLD_LIBRARY_PATH environment variable, but that was it.

> Maybe I should let it compile without linking to gdal and not worry
> about it???

There's no harm in trying. If the resulting executable doesn't run,
try changing the definition of papszSOFilenames in the file
src/raster/r.in.gdal/gdalbridge.c to use ".dylib" instead of ".so".

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list