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

Glynn Clements glynn.clements at virgin.net
Fri Dec 7 05:34:05 EST 2001


cmbarton wrote:

> Thanks again. Here is some info and a question. I hope that this helps 
> with the configure script (as well as helping me compile grass).

> Here is the relevant section of config.log. It seems OK, but there may 
> be something I am missing.
> 
> -L/usr/lib  conftest.c -lfftw   1>&5
> configure:7925: checking whether to use BLAS
> configure:8078: checking whether to use LAPACK
> configure:8231: checking whether to use Motif
> configure:8399: checking whether to use FreeType
> configure:8418: checking for location of FreeType includes
> configure:8444: checking for ft2build.h
> configure:8452: cc -E -traditional-cpp   -I/sw/include -I/usr/include  
> -I/sw/include conftest.c >/dev/null 2>conftest.out
> In file included from configure:8448:
> /sw/include/ft2build.h:55: freetype/config/ftheader.h: No such file or 
> directory

This implies that FreeType isn't installed correctly.

The directory in which ft2build.h resides should also contain a
subdirectory called "freetype". In turn, that subdirectory should
contain several freetype headers, plus subdirectories called "cache",
"config" and "internal":

  $ ls -R /usr/X11R6/include/freetype2
  /usr/X11R6/include/freetype2:
  freetype/  ft2build.h
  
  /usr/X11R6/include/freetype2/freetype:
  cache/      ftcache.h   ftlist.h    ftnames.h   ftsynth.h   t1tables.h
  config/     fterrors.h  ftmac.h     ftoutln.h   ftsystem.h  ttnameid.h
  freetype.h  ftglyph.h   ftmm.h      ftrender.h  fttypes.h   tttables.h
  ftbbox.h    ftimage.h   ftmodule.h  ftsnames.h  internal/   tttags.h
  
  /usr/X11R6/include/freetype2/freetype/cache:
  ftcchunk.h  ftcglyph.h  ftcimage.h  ftcmanag.h  ftcsbits.h  ftlru.h
  
  /usr/X11R6/include/freetype2/freetype/config:
  ftbuild.h  ftconfig.h  ftheader.h  ftmodule.h  ftoption.h
  
  /usr/X11R6/include/freetype2/freetype/internal:
  autohint.h  ftcalc.h    ftmemory.h  pcftypes.h  t1errors.h  tterrors.h
  cfferrs.h   ftdebug.h   ftobjs.h    psaux.h     t1types.h   tttypes.h
  cfftypes.h  ftdriver.h  ftstream.h  psnames.h   t2errors.h
  fnttypes.h  ftextend.h  internal.h  sfnt.h      t2types.h

> >> Also, I have had to put in --without-blas and --without-lapack.
> >
> > That *is* a bug in configure; these were meant to be off by default
> > (along with freetype and motif). I've committed a fix to CVS.
> >
> 
> So I should just ./configure with all turned off -- including freetype?

Yes. You can use --without-blas and --without-lapack with no loss of
functionality. --without-freetype only disables d.text.freetype, and
--without-motif only disables xganim.

> > Note: If an argument is passed to --with-gdal, it should be the path
> > to the "gdal-config" script, e.g. "--with-gdal=/sw/bin/gdal-config".
> 
> I had to use the precompiled binary of gdal for OSX. It only comes with 
> a dynamic library (libgdal.1.1.dylib). No gdal-config.

What about headers (gdal.h, cpl_*.h)? Although, it appears that
r.in.gdal will compile without them when not using --with-gdal.

> 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.

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



More information about the grass-user mailing list