[GRASS5] PNG driver: libgd2 pickup problem

Glynn Clements glynn.clements at virgin.net
Tue Apr 23 09:48:05 EDT 2002


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 at virgin.net>



More information about the grass-dev mailing list