Opened 23 years ago

Last modified 23 years ago

#76 closed defect (fixed)

Configure doesn't find zlib correctly

Reported by: tpoindex@… Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

Hi Frank,

I found a small problem with GDAL's configure.
Here are the configure options I used:

./configure  \
  --with-libz=/usr/local  \
  --with-grass=/usr/local \
  --with-png=/usr/local \
  --with-libtiff=/usr/local \
  --with-jpeg=/usr/local \
  --with-geotiff=/usr/local \
  --with-gif=internal \
  --with-pg=/usr/local/pgsql/bin/pg_config
Relevant output from configure:

checking for 64bit file io... no
using /usr/local for libz.
using libgrass from /usr/local.
checking for ffopen in -lcfitsio... no
libcfitsio not found - FITS support disabled
using libpng from /usr/local.

Make then fails when trying to link 8211view, the
first program it tries.  Note that the zlib
specification is faulty:

ranlib libiso8211.a
c++ -c -Wall -fPIC -O2  -I. -I../../port 8211view.cpp -o 8211view.o
c++ -O2  8211view.o \
	libiso8211.a ../../port/cpl.a -L/usr/local -L/usr/local/lib -ljpeg
-L/usr/local/lib -lgeotiff -L/usr/local/lib -ltiff -L/usr/local -L/usr/local/lib
-lpng -L/usr/local -L/usr/local/lib -lgrass5 /usr/local -lm -ldl
-L/usr/local/lib -lm -o 8211view
/usr/local: file not recognized: Is a directory
collect2: ld returned 1 exit status
make[4]: *** [8211view] Error 1
ranlib libiso8211.a
c++ -c -Wall -fPIC -O2  -I. -I../../port 8211view.cpp -o 8211view.o
c++ -O2  8211view.o \
	libiso8211.a ../../port/cpl.a -L/usr/local -L/usr/local/lib -ljpeg
-L/usr/local/lib -lgeotiff -L/usr/local/lib -ltiff -L/usr/local -L/usr/local/lib
-lpng -L/usr/local -L/usr/local/lib -lgrass5 /usr/local -lm -ldl
-L/usr/local/lib -lm -o 8211view
/usr/local: file not recognized: Is a directory
collect2: ld returned 1 exit status
make[4]: *** [8211view] Error 1


Of course, as a work-around, one can use configure
--with-zlib="-L/usr/local/lib -lz"

Change History (1)

comment:1 by warmerdam, 23 years ago

Tom,

I will conceed that the --with-libz is not consistant with many of the
other --with directives in that you are expected to give a value
of internal, or link arguments (as per the help message).  
I have modifed the configure.in to add "-L$with_libz/lib -L$with_libz -lz"
to LIBS instead of directly just adding with_libz.  This means the argument
now is the directory containing the libz library, or the tree with a lib 
subdirectory.

Unfortunately this didn't make it into GDAL 1.1.5 released earlier today. :-(

Note: See TracTickets for help on using tickets.