[GRASSLIST:5037] RE: error compiling PNGdriver

John Gillette JGillette at rfmd.com
Fri Nov 22 11:33:18 EST 2002

I have PNG driver working. Here's how.

Compile GD2.0.7
  ./configure --prefix=/scratch/local  [create a local library]
  make install
  get rid of all but libgd.a [I'm doing a static linked library]

Recompile Grass 5.0.0
  ./configure ... --with-gdal-includes=/scratch/local/include --with-gdal-libs='/scratch/local/lib /usr/ucblib' ...
  [I found the ucblib hiding in /usr/ucblib, libpng requires this.]
  Edit ".../src/CMD/head/head.sparc-sun-solaris2.7" On GDLIB line, added -lm

  make install

Everything compiles/links.  PNG driver fails.
  In .cshrc file: setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:/usr/ucblib to add a search path

PNG driver now works.

 (1) On my system GD is configured as:
     Support for PNG library:           yes
     Support for JPG library:           yes
     Support for Freetype 2.x library:  no  
     Support for Xpm library:           no

 (2) GD2.0.7 I think tries to improve its library support (?)
     It installs libgd.a,libgd.so.2.0.0 as well as 2 links libgd.so, libgd.so.2 both
     linked to libgd.so.2.0.0.
     There is also a file libgd.la which is related to the "GNU libtool" stuff.
     Within libgd.la is a dependency_libs line.
     On my system this is: -L/usr/openwin/lib /usr/local/lib/libjpeg.la -lpng -lz -lm
 (3) There are 2 different true color environment variables involved.
     XDRIVER_TRUECOLOR controls the display driver use of true color (not actually needed for PNG driver)
     GRASS_TRUECOLOR controls the PNG driver use of true color

Thanks, Glynn Clements, for your help.


More information about the grass-user mailing list