[GRASSLIST:5131] RE: error compiling PNGdriver

Glynn,

I erased my grass5.0.0 source and untared it to have a fresh copy.
I ./configure with the appropriate paths to GD. This time the -lm
was added by configure to GDLIB.

So perhaps you don't need to add another permutation.

John

GD needs libm (the math library), but configure doesn't appear to
check for it[1].

Possible solutions include:

2. Edit src/CMD/head/head.sparc-sun-solaris2.7, and add "-lm" to the
definition of GDLIB, e.g.

GDLIB = -lgd -lm

[1] Currently, configure checks for four additional libraries (Xpm,
FreeType, JPEG, PNG), resulting in 16 permutations; I need to add
libm, which will result in 32 permutations (and running "autoconf"
will probably take longer than actually compiling GRASS; damn).

> Also, is it possible to compile the PNGdriver such that the
gd lib is
> included in the driver such that I can erase the gd lib and
include files
> when I am done? (statically linked?)

If you only have a static GD library, then that will be used. There
isn't any way to link a specific library statically while linking the
others dynamically.

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

John Gillette wrote:

I erased my grass5.0.0 source and untared it to have a fresh copy.
I ./configure with the appropriate paths to GD. This time the -lm
was added by configure to GDLIB.

So perhaps you don't need to add another permutation.

No, I do. GD 2.x depends directly upon atan2, cos, sin, and sqrt, so
libm should be tested as a dependency.

The reason why we got away with it for so long is that one of the
other dependencies (JPEG, PNG, FreeType or Xpm) had libm as a
dependency, so the dependency was satisfied "accidentally".

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