[GRASS5] GRASS compilation on cygwin and IRIX

Andreas Lange Andreas.Lange at Rhein-Main.de
Wed Sep 5 12:39:05 EDT 2001


Hi Glynn, 

thanks for your comments.

Glynn Clements wrote:
> You should just be able to use
> 
>         --with-libs=/usr/freeware/lib32 \
>         --with-includes=/usr/freeware/include \

I'll check this another time.

> 
> > If i put -lpng -lm to the header file, r.in.png and r.out.png compile.
> > But the PNGdriver does not compile at all:
> 
> PNGdriver needs the GD library; and it has to be found by configure.
> 
> Check config.log for the actual error messages produced by the tests.

Problem is on cygwin:
my configure line:
./configure --prefix=$INST --with-postgres-root=/usr \
--with-postgres-includes=/usr/include/postgresql \
--with-postgres-libs=/usr/lib \
--x-includes=/usr/X11R6/include \
--x-libraries=/usr/X11R6/lib \
--with-tcltk-libs=/usr/local/lib \
--with-tcltk-includes=/usr/local/include \
--with-gd-libs=/usr/local/lib \
--with-gd-includes=/usr/local/include \
--with-png-libs=/lib \
--with-png-includes=/usr/local/include 

sinppet from config.log:

configure:4546: checking for location of PNG includes
configure:4578: checking for png.h
configure:4588: gcc -E  -I/usr/local/include conftest.c >/dev/null
2>conftest.out
configure:4618: checking for location of PNG library
configure:4647: checking for png_read_png in -lpng
configure:4666: gcc -o conftest -g -O2    conftest.c -lpng -lz   1>&5
configure:4696: checking for location of GD includes
configure:4728: checking for gd.h
configure:4738: gcc -E  -I/usr/local/include conftest.c >/dev/null
2>conftest.out
configure:4768: checking for location of GD library
configure:4797: checking for gdImageCreate in -lgd
configure:4816: gcc -o conftest -g -O2    conftest.c -lgd   1>&5
configure:4889: checking for gdImageGif
configure:4917: gcc -o conftest -g -O2    -lgd conftest.c  1>&5
/cygdrive/c/DOKUME~1/ADMINI~1/LOKALE~1/Temp/ccgn0CNd.o: In function
`main':
/home/Administrator/cygwin/extra/grass-5/tmp/grass/configure:4911:
undefined reference to `gdImageGif'
collect2: ld returned 1 exit status
configure: failed program was:
#line 4894 "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:4889: checking for gdImagePng
configure:4917: gcc -o conftest -g -O2    -lgd conftest.c  1>&5
/cygdrive/c/DOKUME~1/ADMINI~1/LOKALE~1/Temp/ccqOKwxV.o: In function
`main':
/home/Administrator/cygwin/extra/grass-5/tmp/grass/configure:4911:
undefined reference to `gdImagePng'
collect2: ld returned 1 exit status
configure: failed program was:
#line 4894 "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

First, why is gdImageGif checked? GIF support was officially dropped in
gd some time ago. 
The gdImagePng(); test fails, even if i manually compile a test program.
But the test programs from gd-1.8.4 all compile. I have at the moment no
time to investigate further.


Now i re-run configure on Linux and the gd library is not found, too:

configure:4783: checking for gd.h
configure:4793: gcc -E  -I/usr/local/include conftest.c >/dev/null
2>conftest.ou
t
configure:4823: checking for location of GD library
configure:4852: checking for gdImageCreate in -lgd
configure:4871: gcc -o conftest -g -O2    conftest.c -lgd   1>&5
/usr/lib/gcc-lib/i686-redhat-linux/2.96/../../../libgd.so: undefined
reference t
o `uncompress'
/usr/lib/gcc-lib/i686-redhat-linux/2.96/../../../libgd.so: undefined
reference t
o `sqrt'
/usr/lib/gcc-lib/i686-redhat-linux/2.96/../../../libgd.so: undefined
reference t
o `jpeg_read_scanlines'
/usr/lib/gcc-lib/i686-redhat-linux/2.96/../../../libgd.so: undefined
reference t
o `jpeg_simple_progression'
/usr/lib/gcc-lib/i686-redhat-linux/2.96/../../../libgd.so: undefined
reference t
o `png_get_rowbytes'
/usr/lib/gcc-lib/i686-redhat-linux/2.96/../../../libgd.so: undefined
reference t
o `png_set_strip_16'
/usr/lib/gcc-lib/i686-redhat-linux/2.96/../../../libgd.so: undefined
reference t
o `floor'
/usr/lib/gcc-lib/i686-redhat-linux/2.96/../../../libgd.so: undefined
reference t
o `png_create_read_struct'
/usr/lib/gcc-lib/i686-redhat-linux/2.96/../../../libgd.so: undefined
reference t
:



More information about the grass-dev mailing list