[GRASS5] Darwin Pre2: PNGDriver

jeshua jeshua at SierraMaps.com
Sat Oct 13 06:02:03 EDT 2001


On Thursday, September 13, 2001, at 04:27  PM, Markus Neteler wrote:

>    o compile PNGDriver (requires "libgd1.8.x" from
>      http://www.boutell.com/gd/, usually shipping with Linux distros):
>        gmake5 -i src/display/devices/PNGdriver

Hello all,

*I apologize for the length of this message*

I'm back and I have successfully built 100% of the modules (hooray!); 
until I attempt the above step (compile PNGDriver) on Darwin 1.4 (Mac OS 
X 10.1), at which point I get:

[localhost:display/devices/PNGdriver] root# gcc -O2 
-I/usr/src/grass/src/include -I/usr/local/include -I../lib -I/sw/include 
-c Color.c -o OBJ.powerpc-apple-darwin1.4/Color.o
png.h:23: Neither PNG nor GIF supported
cpp-precomp: warning: errors during smart preprocessing, retrying in 
basic mode


Any ideas?

I suppose it is related to the failed "gdImageGif"  and "gdImagePng"  
config section:


checking for location of PNG includes... /usr/local/include
checking for png.h... yes
checking for location of PNG library... /usr/local/lib
checking for png_read_png in -lpng... no
configure: warning: *** Unable to locate PNG library.
checking for location of GD includes... /usr/local/include
checking for gd.h... yes
checking for location of GD library... /usr/local/lib
checking for gdImageCreate in -lgd... yes
checking for gdImageGif... no
checking for gdImagePng... no


Note that I have built and installed GD successfully with PNG support 
and without GIF support (GIF is no longer supported by GD for obvious 
reasons).

To successfully build the PNG modules I had to hard-code libpng.a in as 
in:

  [localhost:src/raster/r.out.png] root# cc  -o 
/usr/src/grass/dist.powerpc-apple-darwin1.4/etc/bin/cmd/r.out.png 
OBJ.powerpc-apple-darwin1.4/r.out.png.o 
/usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.4/libgis.a 
-I/usr/local -L/usr/local /usr/local/lib/libpng.a -lz


Here is the related config.log:

configure:4080: checking if we should build directly against GDAL
configure:4153: checking for location of TIFF includes
configure:4185: checking for tiffio.h
configure:4195: gcc -E -traditional-cpp   conftest.c >/dev/null 
2>conftest.out
configure:4227: checking for location of TIFF library
configure:4257: checking for TIFFOpen in -ltiff
configure:4276: gcc -o conftest -O2    conftest.c -ltiff   1>&5
configure:4607: checking for location of PNG includes
configure:4639: checking for png.h
configure:4649: gcc -E -traditional-cpp  -I/usr/local/include conftest.c 
 >/dev/null 2>conftest.out
configure:4681: checking for location of PNG library
configure:4710: checking for png_read_png in -lpng
configure:4729: gcc -o conftest -O2    conftest.c -lpng -lz   1>&5
/usr/bin/ld: Undefined symbols:
_png_read_png
configure: failed program was:
#line 4718 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
char png_read_png();

int main() {
png_read_png()
; return 0; }
configure:4759: checking for location of GD includes
configure:4791: checking for gd.h
configure:4801: gcc -E -traditional-cpp  -I/usr/local/include conftest.c 
 >/dev/null 2>conftest.out
configure:4833: checking for location of GD library
configure:4862: checking for gdImageCreate in -lgd
configure:4881: gcc -o conftest -O2    conftest.c -lgd   1>&5
configure:5040: checking for gdImageGif
configure:5068: gcc -o conftest -O2    -lgd conftest.c  1>&5
/usr/bin/ld: Undefined symbols:
_gdImageGif
configure: failed program was:
#line 5045 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gdImageGif(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
char gdImageGif();

int main() {

/* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
#if defined (__stub_gdImageGif) || defined (__stub___gdImageGif)
choke me
#else
gdImageGif();
#endif

; return 0; }
configure:5040: checking for gdImagePng
configure:5068: gcc -o conftest -O2    -lgd conftest.c  1>&5
/usr/bin/ld: Undefined symbols:
_gdImagePng
configure: failed program was:
#line 5045 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gdImagePng(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
char gdImagePng();

int main() {

/* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
#if defined (__stub_gdImagePng) || defined (__stub___gdImagePng)
choke me
#else
gdImagePng();
#endif


I appreciate any help.


Kind regards,

Jeshua Lacock                                http://OpenOSX.com
Programmer/Owner                     http://SierraMaps.com
Phone: (760) 935-4736            http://3dTopoMaps.com




More information about the grass-dev mailing list