[GRASS5] PNG driver: libgd2 pickup problem

Hi,

browsing the archive I found a bit of help to compile the PNG
driver against libgd2.x. But when I use it, it picks up
the libgd1.8...

d.mon PNG
PNG: GRASS_TRUECOLOR status: TRUE
/mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG:
relocation error: /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG:
undefined symbol: gdImageCreateTrueColor
No socket to connect to for monitor <PNG>.
Problem selecting PNG. Will try once more
No socket to connect to for monitor <PNG>.

nm /usr/local/lib/libgd.so.2.0.0 |grep gdImageCreateTrueColor
00004a18 T gdImageCreateTrueColor

This indicates, that libgd1.8 is used, but the driver compiled against
2.x. Any suggestions to solve this run-time problem?

ldd /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG
        libgd.so => /usr/lib/libgd.so (0x40017000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4004a000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40080000)
        libpng.so.2 => /usr/lib/libpng.so.2 (0x4009f000)
        libm.so.6 => /lib/libm.so.6 (0x400d6000)
        libc.so.6 => /lib/libc.so.6 (0x400f8000)
        libttf.so.2 => /usr/lib/libttf.so.2 (0x4022d000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40257000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Thanks,

Markus

On Tue, Apr 23, 2002 at 10:46:21AM +0200, Markus Neteler wrote:

Hi,

browsing the archive I found a bit of help to compile the PNG
driver against libgd2.x. But when I use it, it picks up
the libgd1.8...

d.mon PNG
PNG: GRASS_TRUECOLOR status: TRUE
/mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG:
relocation error: /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG:
undefined symbol: gdImageCreateTrueColor
No socket to connect to for monitor <PNG>.
Problem selecting PNG. Will try once more
No socket to connect to for monitor <PNG>.

nm /usr/local/lib/libgd.so.2.0.0 |grep gdImageCreateTrueColor
00004a18 T gdImageCreateTrueColor

This indicates, that libgd1.8 is used, but the driver compiled against
2.x. Any suggestions to solve this run-time problem?

ldd /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG
        libgd.so => /usr/lib/libgd.so (0x40017000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4004a000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40080000)
        libpng.so.2 => /usr/lib/libpng.so.2 (0x4009f000)
        libm.so.6 => /lib/libm.so.6 (0x400d6000)
        libc.so.6 => /lib/libc.so.6 (0x400f8000)
        libttf.so.2 => /usr/lib/libttf.so.2 (0x4022d000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40257000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Make sure the libpng library comes first when loading,
e.g. in LD_LIBRARY_PATH.
Ldd has to show the right one. Check the path,
e.g. following through on:
  ls -l /usr/lib/libpng.so.2
  ..
  

On Tue, Apr 23, 2002 at 11:37:08AM +0200, Bernhard Reiter wrote:

On Tue, Apr 23, 2002 at 10:46:21AM +0200, Markus Neteler wrote:
> Hi,
>
> browsing the archive I found a bit of help to compile the PNG
> driver against libgd2.x. But when I use it, it picks up
> the libgd1.8...
>
> d.mon PNG
> PNG: GRASS_TRUECOLOR status: TRUE
> /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG:
> relocation error: /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG:
> undefined symbol: gdImageCreateTrueColor
> No socket to connect to for monitor <PNG>.
> Problem selecting PNG. Will try once more
> No socket to connect to for monitor <PNG>.
>
> nm /usr/local/lib/libgd.so.2.0.0 |grep gdImageCreateTrueColor
> 00004a18 T gdImageCreateTrueColor
>
> This indicates, that libgd1.8 is used, but the driver compiled against
> 2.x. Any suggestions to solve this run-time problem?
>
> ldd /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG
> libgd.so => /usr/lib/libgd.so (0x40017000)
> libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4004a000)
> libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40080000)
> libpng.so.2 => /usr/lib/libpng.so.2 (0x4009f000)
> libm.so.6 => /lib/libm.so.6 (0x400d6000)
> libc.so.6 => /lib/libc.so.6 (0x400f8000)
> libttf.so.2 => /usr/lib/libttf.so.2 (0x4022d000)
> libz.so.1 => /usr/lib/libz.so.1 (0x40257000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Make sure the libpng library comes first when loading,
e.g. in LD_LIBRARY_PATH.
Ldd has to show the right one. Check the path,
e.g. following through on:
  ls -l /usr/lib/libpng.so.2

How easy... Thanks:

export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/software/GRASS5.0.0/lib

d.mon PNG
PNG: GRASS_TRUECOLOR status: TRUE
PNG: collecting to file: map.png,
     GRASS_WIDTH=640, GRASS_HEIGHT=480
Graphics driver [PNG] started

Bingo. Obviously I was confused by this comment:
http://grass.itc.it/pipermail/grass5/2002-March/002225.html
"Note: LD_LIBRARY_PATH won't affect which version is used; the two
libraries will have different sonames (libgd.so.1 vs libgd.so.2)."

According to config.log the correct libgd (2.x) is used after several tries,
But above statement seems not to be true, since your (Bernhard's) suggestion
works.

It is still a slightly unpleasant solution, since other programs started
inside GRASS session may fail now (not sure, perhaps 2.x is fully downward
compliant).

Anyway, for now I get my truecolor PNG.

Markus

On Tue, Apr 23, 2002 at 11:51:25AM +0200, Markus Neteler wrote:

> Make sure the libpng library comes first when loading,
> e.g. in LD_LIBRARY_PATH.
> Ldd has to show the right one. Check the path,
> e.g. following through on:
> ls -l /usr/lib/libpng.so.2

How easy... Thanks:

export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/software/GRASS5.0.0/lib

d.mon PNG
PNG: GRASS_TRUECOLOR status: TRUE
PNG: collecting to file: map.png,
     GRASS_WIDTH=640, GRASS_HEIGHT=480
Graphics driver [PNG] started

Bingo. Obviously I was confused by this comment:
http://grass.itc.it/pipermail/grass5/2002-March/002225.html
"Note: LD_LIBRARY_PATH won't affect which version is used; the two
libraries will have different sonames (libgd.so.1 vs libgd.so.2)."

The statement is correct, but for some reasons your libraries
do have the same name. They shouldn't, though.

According to config.log the correct libgd (2.x) is used after several tries,
But above statement seems not to be true, since your (Bernhard's) suggestion
works.

It is still a slightly unpleasant solution, since other programs started
inside GRASS session may fail now (not sure, perhaps 2.x is fully downward
compliant).

Markus Neteler wrote:

browsing the archive I found a bit of help to compile the PNG
driver against libgd2.x. But when I use it, it picks up
the libgd1.8...

d.mon PNG
PNG: GRASS_TRUECOLOR status: TRUE
/mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG:
relocation error: /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG:
undefined symbol: gdImageCreateTrueColor
No socket to connect to for monitor <PNG>.
Problem selecting PNG. Will try once more
No socket to connect to for monitor <PNG>.

nm /usr/local/lib/libgd.so.2.0.0 |grep gdImageCreateTrueColor
00004a18 T gdImageCreateTrueColor

This indicates, that libgd1.8 is used, but the driver compiled against
2.x. Any suggestions to solve this run-time problem?

ldd /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG
        libgd.so => /usr/lib/libgd.so (0x40017000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4004a000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40080000)
        libpng.so.2 => /usr/lib/libpng.so.2 (0x4009f000)
        libm.so.6 => /lib/libm.so.6 (0x400d6000)
        libc.so.6 => /lib/libc.so.6 (0x400f8000)
        libttf.so.2 => /usr/lib/libttf.so.2 (0x4022d000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40257000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Re-compile libgd 2.x to include an explicit soname. In the gd
Makefile, change:

  ld -shared -o libgd.so.${VERSION} ${LIBOBJS}
to:
  ld -shared -soname libgd.so.2 -o libgd.so.${VERSION} ${LIBOBJS}

Then, "ldd" will report e.g.:

  libgd.so.2 => /usr/local/lib/libgd.so.2 (0x4001c000)

and the loader will try to use libgd.so.2 in preference to libgd.so.

Also, you may be able to work around the problem by setting
LD_LIBRARY_PATH, but that may be undesirable (it will affect all
libraries, not just gd). Alternatively, you could put a link to
libgd.so into $GISBASE/lib, as the GRASS startup adds that directory
to LD_LIBRARY_PATH.

Note: at present, the GRASS shared libraries don't include explicit
sonames. That should be changed if we intend to release a binary
distribution using shared libraries, to prevent this sort of problem.

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

Markus Neteler wrote:

> > This indicates, that libgd1.8 is used, but the driver compiled against
> > 2.x. Any suggestions to solve this run-time problem?
> >
> > ldd /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG
> > libgd.so => /usr/lib/libgd.so (0x40017000)
> > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4004a000)
> > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40080000)
> > libpng.so.2 => /usr/lib/libpng.so.2 (0x4009f000)
> > libm.so.6 => /lib/libm.so.6 (0x400d6000)
> > libc.so.6 => /lib/libc.so.6 (0x400f8000)
> > libttf.so.2 => /usr/lib/libttf.so.2 (0x4022d000)
> > libz.so.1 => /usr/lib/libz.so.1 (0x40257000)
> > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
>
> Make sure the libpng library comes first when loading,
> e.g. in LD_LIBRARY_PATH.
> Ldd has to show the right one. Check the path,
> e.g. following through on:
> ls -l /usr/lib/libpng.so.2

How easy... Thanks:

export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/software/GRASS5.0.0/lib

d.mon PNG
PNG: GRASS_TRUECOLOR status: TRUE
PNG: collecting to file: map.png,
     GRASS_WIDTH=640, GRASS_HEIGHT=480
Graphics driver [PNG] started

Bingo. Obviously I was confused by this comment:
http://grass.itc.it/pipermail/grass5/2002-March/002225.html
"Note: LD_LIBRARY_PATH won't affect which version is used; the two
libraries will have different sonames (libgd.so.1 vs libgd.so.2)."

I had forgotten that I had to add the soname explicitly. Normally, the
soname will include the major version (in the above "ldd" output, this
is true for everything except libgd).

According to config.log the correct libgd (2.x) is used after several tries,
But above statement seems not to be true, since your (Bernhard's) suggestion
works.

Note that you only get the unversioned link (e.g. "libgd.so") if you
install the appropriate "-devel" package (e.g. "gd-devel"). The "user"
package (e.g. "gd") only includes a versioned link (e.g. "libgd.so.1").

The unversioned links are for compilation; if you give the linker a
switch such as "-lgd", it will search for "libgd.so" then "libgd.a".
If the resulting shared library has an embedded soname, that is what
is embedded into the executable, shown by "ldd", and used by the
loader to locate the library.

It is still a slightly unpleasant solution, since other programs started
inside GRASS session may fail now (not sure, perhaps 2.x is fully downward
compliant).

Anyway, for now I get my truecolor PNG.

I would still recommend re-linking libgd with an explicit soname.

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

On Tue, Apr 23, 2002 at 12:29:52PM +0100, Glynn Clements wrote:

Markus Neteler wrote:

> browsing the archive I found a bit of help to compile the PNG
> driver against libgd2.x. But when I use it, it picks up
> the libgd1.8...
>
> d.mon PNG
> PNG: GRASS_TRUECOLOR status: TRUE
> /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG:
> relocation error: /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG:
> undefined symbol: gdImageCreateTrueColor
> No socket to connect to for monitor <PNG>.
> Problem selecting PNG. Will try once more
> No socket to connect to for monitor <PNG>.
>
> nm /usr/local/lib/libgd.so.2.0.0 |grep gdImageCreateTrueColor
> 00004a18 T gdImageCreateTrueColor
>
> This indicates, that libgd1.8 is used, but the driver compiled against
> 2.x. Any suggestions to solve this run-time problem?
>
> ldd /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG
> libgd.so => /usr/lib/libgd.so (0x40017000)
> libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4004a000)
> libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40080000)
> libpng.so.2 => /usr/lib/libpng.so.2 (0x4009f000)
> libm.so.6 => /lib/libm.so.6 (0x400d6000)
> libc.so.6 => /lib/libc.so.6 (0x400f8000)
> libttf.so.2 => /usr/lib/libttf.so.2 (0x4022d000)
> libz.so.1 => /usr/lib/libz.so.1 (0x40257000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Re-compile libgd 2.x to include an explicit soname. In the gd
Makefile, change:

  ld -shared -o libgd.so.${VERSION} ${LIBOBJS}
to:
  ld -shared -soname libgd.so.2 -o libgd.so.${VERSION} ${LIBOBJS}

Then, "ldd" will report e.g.:

  libgd.so.2 => /usr/local/lib/libgd.so.2 (0x4001c000)

and the loader will try to use libgd.so.2 in preference to libgd.so.

[I have also seen your other mail]
The problem is that I am not "root" here. So I cannot do too much with
libgd.

A suggestion: Couldn't "configure" refer to the version -lgd.so.2
or so when the test for gdImageCreateTrueColor is successfull and
refer to -lgd otherwise?
Then it should be fine also for non-root users or all those who
do not know/want to recompile GD.

Also, you may be able to work around the problem by setting
LD_LIBRARY_PATH, but that may be undesirable (it will affect all
libraries, not just gd). Alternatively, you could put a link to
libgd.so into $GISBASE/lib, as the GRASS startup adds that directory
to LD_LIBRARY_PATH.

Note: at present, the GRASS shared libraries don't include explicit
sonames. That should be changed if we intend to release a binary
distribution using shared libraries, to prevent this sort of problem.

Markus

On Tue, Apr 23, 2002 at 01:01:06PM +0100, Glynn Clements wrote:

Markus Neteler wrote:

> > > This indicates, that libgd1.8 is used, but the driver compiled against
> > > 2.x. Any suggestions to solve this run-time problem?
> > >
> > > ldd /mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/driver/PNG
> > > libgd.so => /usr/lib/libgd.so (0x40017000)
> > > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4004a000)
> > > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40080000)
> > > libpng.so.2 => /usr/lib/libpng.so.2 (0x4009f000)
> > > libm.so.6 => /lib/libm.so.6 (0x400d6000)
> > > libc.so.6 => /lib/libc.so.6 (0x400f8000)
> > > libttf.so.2 => /usr/lib/libttf.so.2 (0x4022d000)
> > > libz.so.1 => /usr/lib/libz.so.1 (0x40257000)
> > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> >
> >
> > Make sure the libpng library comes first when loading,
> > e.g. in LD_LIBRARY_PATH.
> > Ldd has to show the right one. Check the path,
> > e.g. following through on:
> > ls -l /usr/lib/libpng.so.2
>
> How easy... Thanks:
>
> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/software/GRASS5.0.0/lib
>
> d.mon PNG
> PNG: GRASS_TRUECOLOR status: TRUE
> PNG: collecting to file: map.png,
> GRASS_WIDTH=640, GRASS_HEIGHT=480
> Graphics driver [PNG] started
>
>
> Bingo. Obviously I was confused by this comment:
> http://grass.itc.it/pipermail/grass5/2002-March/002225.html
> "Note: LD_LIBRARY_PATH won't affect which version is used; the two
> libraries will have different sonames (libgd.so.1 vs libgd.so.2)."

I had forgotten that I had to add the soname explicitly. Normally, the
soname will include the major version (in the above "ldd" output, this
is true for everything except libgd).

> According to config.log the correct libgd (2.x) is used after several tries,
> But above statement seems not to be true, since your (Bernhard's) suggestion
> works.

Note that you only get the unversioned link (e.g. "libgd.so") if you
install the appropriate "-devel" package (e.g. "gd-devel"). The "user"
package (e.g. "gd") only includes a versioned link (e.g. "libgd.so.1").

The unversioned links are for compilation; if you give the linker a
switch such as "-lgd", it will search for "libgd.so" then "libgd.a".
If the resulting shared library has an embedded soname, that is what
is embedded into the executable, shown by "ldd", and used by the
loader to locate the library.

> It is still a slightly unpleasant solution, since other programs started
> inside GRASS session may fail now (not sure, perhaps 2.x is fully downward
> compliant).
>
> Anyway, for now I get my truecolor PNG.

I would still recommend re-linking libgd with an explicit soname.

Well, I am no root here unfortunately (or fortunately?).

This solution works:

gcc -L/hardmnt/thuille1/ssi/cvsgrass_exp/src/libes/LIB.i686-pc-linux-gnu
-o\ /ssi0/ssi/neteler/cvsgrass_exp/dist.i686-pc-linux-gnu/driver/PNG\
OBJ.i686-pc-linux-gnu/Can_do.o OBJ.i686-pc-linux-gnu/Clr_table.o\
OBJ.i686-pc-linux-gnu/Color.o OBJ.i686-pc-linux-gnu/Draw_line.o\
OBJ.i686-pc-linux-gnu/Get_w_box.o OBJ.i686-pc-linux-gnu/Get_w_line.o\
OBJ.i686-pc-linux-gnu/Get_w_pnt.o OBJ.i686-pc-linux-gnu/Graph_Clse.o\
OBJ.i686-pc-linux-gnu/Graph_Set.o OBJ.i686-pc-linux-gnu/Panel.o\
OBJ.i686-pc-linux-gnu/Polygn_abs.o -ldriver -lgis\
/usr/local/lib/libgd.so.2.0.0 -lfreetype -ljpeg -lpng -lz -lm\

ldd /ssi0/ssi/neteler/cvsgrass_exp/dist.i686-pc-linux-gnu/driver/PNG
        /usr/local/lib/libgd.so.2.0.0 => /usr/local/lib/libgd.so.2.0.0 (0x40017000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40050000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40086000)
        libpng.so.2 => /usr/lib/libpng.so.2 (0x400a5000)
        libz.so.1 => /usr/lib/libz.so.1 (0x400c6000)
        libm.so.6 => /lib/libm.so.6 (0x400ea000)
        libc.so.6 => /lib/libc.so.6 (0x4010c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Looks dirty but working. So if "configure" would only do that for the
truecolor support, the workaround is done (if that's possible to do in
configure).

Markus

Markus Neteler wrote:

> Re-compile libgd 2.x to include an explicit soname. In the gd
> Makefile, change:
>
> ld -shared -o libgd.so.${VERSION} ${LIBOBJS}
> to:
> ld -shared -soname libgd.so.2 -o libgd.so.${VERSION} ${LIBOBJS}
>
> Then, "ldd" will report e.g.:
>
> libgd.so.2 => /usr/local/lib/libgd.so.2 (0x4001c000)
>
> and the loader will try to use libgd.so.2 in preference to libgd.so.

[I have also seen your other mail]
The problem is that I am not "root" here. So I cannot do too much with
libgd.

A suggestion: Couldn't "configure" refer to the version -lgd.so.2
or so when the test for gdImageCreateTrueColor is successfull and
refer to -lgd otherwise?

No. -lgd.so.2 would cause the linker to look for libgd.so.2.so then
libgd.so.2.a, neither of which will be found.

Then it should be fine also for non-root users or all those who
do not know/want to recompile GD.

Bear in mind that GD 2.x is currently labelled as "beta". Hopefully
the problem will be fixed before it is officially "released".

Until then, building GD 2.0.1 with the supplied Makefile results in a
library which simply doesn't coexist well with an existing version of
GD.

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

Markus Neteler wrote:

> I would still recommend re-linking libgd with an explicit soname.

Well, I am no root here unfortunately (or fortunately?).

You could compile a "private" copy of libgd. It would only need to be
used when building the PNG driver, so that the executable gets the
correct soname. Thereafter, the loader should successfully locate the
system's copy of libgd.so.2.

This solution works:

gcc -L/hardmnt/thuille1/ssi/cvsgrass_exp/src/libes/LIB.i686-pc-linux-gnu
-o\ /ssi0/ssi/neteler/cvsgrass_exp/dist.i686-pc-linux-gnu/driver/PNG\
OBJ.i686-pc-linux-gnu/Can_do.o OBJ.i686-pc-linux-gnu/Clr_table.o\
OBJ.i686-pc-linux-gnu/Color.o OBJ.i686-pc-linux-gnu/Draw_line.o\
OBJ.i686-pc-linux-gnu/Get_w_box.o OBJ.i686-pc-linux-gnu/Get_w_line.o\
OBJ.i686-pc-linux-gnu/Get_w_pnt.o OBJ.i686-pc-linux-gnu/Graph_Clse.o\
OBJ.i686-pc-linux-gnu/Graph_Set.o OBJ.i686-pc-linux-gnu/Panel.o\
OBJ.i686-pc-linux-gnu/Polygn_abs.o -ldriver -lgis\
/usr/local/lib/libgd.so.2.0.0 -lfreetype -ljpeg -lpng -lz -lm\

ldd /ssi0/ssi/neteler/cvsgrass_exp/dist.i686-pc-linux-gnu/driver/PNG
        /usr/local/lib/libgd.so.2.0.0 => /usr/local/lib/libgd.so.2.0.0 (0x40017000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40050000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40086000)
        libpng.so.2 => /usr/lib/libpng.so.2 (0x400a5000)
        libz.so.1 => /usr/lib/libz.so.1 (0x400c6000)
        libm.so.6 => /lib/libm.so.6 (0x400ea000)
        libc.so.6 => /lib/libc.so.6 (0x4010c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Looks dirty but working. So if "configure" would only do that for the
truecolor support, the workaround is done (if that's possible to do in
configure).

But that screws people who have a working copy of GD; the resulting
executable will cease to work if the GD library is moved or upgraded.

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