[GRASS-dev] compiling in osgeo4w - configure: error: *** Unable to locate zlib library.

hi,

I'm trying to compile a recent grass64svn in the osgeo4w-stack.

compiling fails with

"
[...]
checking for location of zlib includes...
checking for zlib.h... yes
checking for location of zlib library...
checking for deflate in -lz... no
configure: error: *** Unable to locate zlib library."

from config.log

"[...]
int main() {
socket()
; return 0; }
configure:6867: checking for location of zlib includes
configure:6893: checking for zlib.h
configure:6901: gcc -E -I/c/OSGeo4W/apps/gdal-16/include -I/c/OSGeo4W/include conftest.c >/dev/null 2>conftest.out
configure:6935: checking for location of zlib library
configure:6960: checking for deflate in -lz
configure:6977: gcc -o conftest.exe -g -O2 -I/c/OSGeo4W/apps/gdal-16/include -I/c/OSGeo4W/include -Wl,--export-dynamic,--enable-runtime-pseudo-reloc -L/c/OSGeo4W/apps/gdal-16/lib -L/c/OSGeo4W/lib conftest.c -lz 1>&5
c:\OSGeo4W\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lz
collect2: ld returned 1 exit status
configure: failed program was:
#line 6966 "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 deflate();

int main() {
deflate()
; return 0; }"

there are following files
C:\OSGeo4W\include\zlib.h
C:\OSGeo4W\lib\zlib.lib
C:\OSGeo4W\bin\zlib1.dll
C:\OSGeo4W\bin\zlib_osgeo.dll

(06.02.2008 01:38 73.728 zlib1.dll
04.02.2008 06:16 73.728 zlib_osgeo.dll)

just a few weeks ago, compiling in the osge4w-stack was ok. I can't remember that
I've changed anything with zlib in the osgeo4w-stack.

any hints?

best regards
Helmut

___________________________________________________________
WEB.DE DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt mit
gratis Handy-Flat! http://produkte.web.de/go/DSL_Doppel_Flatrate/2

Hi Helmut,

On Sat, 12. Feb 2011 at 00:22:51 +0100, Helmut Kudrnovsky wrote:

"
[...]
checking for location of zlib includes...
checking for zlib.h... yes
checking for location of zlib library...
checking for deflate in -lz... no
configure: error: *** Unable to locate zlib library."

The MinGW cruft was removed from osgeo4w (maybe still not complete, but
anyway). I updated my package.sh accordingly (see ticket #1271).

For starters the mingw-libs package with the library copies (foo.lib =>
libfoo.a) are gone and package.sh now copies them before running configure.
That's probably what hits you here.

Jürgen

--
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-20
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden http://www.norbit.de

--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502