[GRASS5] Darwin Pre2: PNGDriver

Glynn Clements glynn.clements at virgin.net
Mon Oct 15 09:16:39 EDT 2001


jeshua wrote:

> >> Will I have to re-build everything and start out with a "make
> >> distclean", or will I be able to just run configure and then build the
> >> PNGDriver?
> >
> > It should suffice to run configure then build PNGdriver.
> 
> Thank you!  I checked-out all of the config files and ran configure 
> again and it was apparently successful:
> 
> checking whether to use PNG... yes
> checking for location of PNG includes...
> checking for png.h... yes
> checking for location of PNG library...
> checking for png_read_image in -lpng... yes
> checking whether to use GD... yes
> checking for location of GD includes...
> checking for gd.h... yes
> checking for location of GD library...
> checking for gdImagePng in -lgd... no
> checking for gdImagePng in -lgd... yes
> checking for gdImagePng in -lgd... (cached) yes
> checking for gdImageGif in -lgd... no
> 
> Built then when I go to build the PNGDriver I run into trouble with 
> undefined symbols:
> 
> gcc  -o /usr/src/grass/dist.powerpc-apple-darwin1.4/driver/PNG 
> OBJ.powerpc-apple-darwin1.4/Can_do.o OBJ.powerpc-apple-darwin1.4/Color.o 
> OBJ.powerpc-apple-darwin1.4/Draw_line.o OBJ.powerpc-apple-
> darwin1.4/Get_w_box.o OBJ.powerpc-apple-darwin1.4/Get_w_line.o 
> OBJ.powerpc-apple-darwin1.4/Get_w_pnt.o OBJ.powerpc-apple-
> darwin1.4/Graph_Clse.o OBJ.powerpc-apple-darwin1.4/Graph_Set.o 
> OBJ.powerpc-apple-darwin1.4/Panel.o OBJ.powerpc-apple-
> darwin1.4/Polygn_abs.o OBJ.powerpc-apple-darwin1.4/Reset_clr.o 
> /usr/src/grass/src/display/devices/lib/LIB.powerpc-apple-
> darwin1.4/driverlib.a /usr/src/grass/src/libes/LIB.powerpc-apple-
> darwin1.4/libgis.a -lz  -L/usr/local/pgsql -L/usr/local/lib

Er, there's no "-lgd" in there.

I suspect that gmake5 is using the old make.rules file; try:

	cd /usr/src/grass
	rm -rf src/display/devices/PNGdriver/OBJ.powerpc-apple-darwin1.4
	gmake5 src/display/devices/PNGdriver

> And it seems like something is adding the underscores to the symbols, 
> messing things up. Unfortunately, I have no idea why.

I think that this is just the OS convention; some OSes add underscores
to the beginning of symbols.

> BTW: What does the PNGDriver do?

It allows you to direct the output of d.* commands to a PNG (or GIF)
image instead of a window.

> Is it optional?

Yes.

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



More information about the grass-dev mailing list