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

Hi Jürgen,

-----Ursprüngliche Nachricht-----
Von: "Helmut Kudrnovsky"

indeed, I'm going through step by step through your patch from #1271.

thanks for your hint, I will try this part of the patch

I've added your suggestion to package.sh, this problem is solved.

but now there seems to some problems with the added gdal_config in your patch:

from package.log
[...]
checking whether to use GDAL... yes
checking for gdal-config... /osgeo4w/usr/src/grass64svn/mswindows/osgeo4w/gdal-config
configure: error: *** Unable to locate GDAL library.

from config.log
[...]
configure:8040: checking whether to use GDAL
configure:8058: checking for gdal-config
configure:8120: gcc -o conftest.exe -g -O2 -I/c/OSGeo4W/include -I/c/OSGeo4W/include -Wl,--export-dynamic,--enable-runtime-pseudo-reloc -L/c/OSGeo4W/lib -L/osgeo4w/usr/src/grass64svn/mswindows/osgeo4w/lib conftest.c /c/OSGeo4W/lib/gdal_i.lib 1>&5
In file included from c:/OSGeo4W/include/direct.h:22,
from c:/OSGeo4W/include/cpl_port.h:133,
from c:/OSGeo4W/include/gdal.h:41,
from configure:8114:
c:/OSGeo4W/include/io.h:41: error: redefinition of typedef 'intptr_t'
c:/OSGeo4W/include/cpl_config.h:113: error: previous declaration of 'intptr_t' was here
configure: failed program was:
#line 8113 "configure"
#include "confdefs.h"
#include <gdal.h>
int main() {
GDALOpen("foo", GA_ReadOnly);
; return 0; }
configure:8136: gcc -o conftest.exe -g -O2 -I/c/OSGeo4W/include -I/c/OSGeo4W/include -Wl,--export-dynamic,--enable-runtime-pseudo-reloc -L/c/OSGeo4W/lib -L/osgeo4w/usr/src/grass64svn/mswindows/osgeo4w/lib conftest.c /c/OSGeo4W/lib/gdal_i.lib /c/OSGeo4W/lib/libpng13.lib /c/OSGeo4W/lib/zlib.lib 1>&5
In file included from c:/OSGeo4W/include/direct.h:22,
from c:/OSGeo4W/include/cpl_port.h:133,
from c:/OSGeo4W/include/gdal.h:41,
from configure:8130:
c:/OSGeo4W/include/io.h:41: error: redefinition of typedef 'intptr_t'
c:/OSGeo4W/include/cpl_config.h:113: error: previous declaration of 'intptr_t' was here
gcc.exe: c:/OSGeo4W/lib/libpng13.lib: No such file or directory
configure: failed program was:
#line 8129 "configure"
#include "confdefs.h"
#include <gdal.h>
int main() {
GDALOpen("foo", GA_ReadOnly);
; return 0; }

if I look - after update by the osgeo4w-setup - in C:\OSGeo4W\lib there are
following png-related files:

10.01.2009 19:29 201.398 libpng.a
10.01.2009 19:29 228.158 libpng.dll.a
10.01.2009 19:29 947 libpng.la
10.01.2009 19:29 201.398 libpng12.a
10.01.2009 19:29 228.896 libpng12.dll.a
10.01.2009 19:29 947 libpng12.la

but no libpng13.lib.

in the gdal-config of your patch in track #1271 there following lines:

+CONFIG_LIBS="$OSGEO4W_ROOT_MSYS/lib/gdal_i.lib"
+CONFIG_DEP_LIBS="$OSGEO4W_ROOT_MSYS/lib/libpng13.lib $OSGEO4W_ROOT_MSYS/lib/zlib.lib"
+CONFIG_PREFIX="$OSGEO4W_ROOT_MSYS"
+CONFIG_CFLAGS="-I$OSGEO4W_ROOT_MSYS/include"

any hint what should be changed?

best

___________________________________________________________
Empfehlen Sie WEB.DE DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.web.de

Hi Helmut,

On Sat, 12. Feb 2011 at 19:05:31 +0100, Helmut Kudrnovsky wrote:

c:/OSGeo4W/include/io.h:41: error: redefinition of typedef 'intptr_t'

Where is that io.h from? I don't have one - so it's probably not from
osgeo4w.

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

Hi Helmut,

On Sat, 12. Feb 2011 at 19:05:31 +0100, Helmut Kudrnovsky wrote:

gcc.exe: c:/OSGeo4W/lib/libpng13.lib: No such file or directory

libpng13.lib is in libpng-devel-vc.

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