[Mapserver-users] unsuccessful with gdal-1.1.9 on MacOS X

William K woklist at charter.net
Wed Aug 27 13:59:28 EDT 2003


I have Mapserver successfully built with gdal on Mac OS X.  I started 
putting together some pages on the whole process last week, and may yet 
get them finished and up soon.  I don't use fink or darwinports.  What 
I've found is that GDAL needs a couple patches and some environment 
variables set to build properly to be usable by other applications.

Also, are you using the new gcc 3.3 yet?

Here are the details on the patching:

edit GDALmake.opt.in:

on line 17, add '@LDFLAGS@' before -lm.  I got this from Fink, but I 
don't remember what it fixes.  It should now be:

LIBS	=	@LIBS@ @LDFLAGS@ -lm

on line 204, add '-lgeotiff -ltiff' to CONFIG_LIBS_INS:

CONFIG_LIBS_INS	=	-L$(INST_LIB) -lgdal.$(GDAL_VER) -lgeotiff -ltiff

This tells other software how to link to GDAL, which is probably why 
Mapserver configure is failing.


edit GNUmakefile:

add a line before line 21 (for the $(GDAL_SLIB): target):

	$(RANLIB) $(OGRFRMTS_LIB)

I found that in the middle of building, it stopped because the 'table 
of contents was out of date', and needed an extra ranlib applied to it.


for the environment and config options:

% setenv CFLAGS "-O3 -fno-common -no-cpp-precomp"
% setenv CXXFLAGS "-O3 -fno-common -no-cpp-precomp"
% ./configure --mandir=/usr/local/share/man --with-libz=/usr 
--with-libtiff=/usr/local \
  -> --with-geotiff=/usr/local --with-jpeg=/usr/local 
--with-gif=/usr/local \
  -> --with-png=/usr/local --without-python --without-ogdi --with-threads


then make and install, of course.  This works for me.  I didn't use any 
internal libs - already have them installed external since I need them 
for GRASS also.


On Sunday, August 24, 2003, at 11:27  PM, pkishor_98 wrote:

> [lucknow:~/Projects/mapserver/gdal-1.1.9] pkishor% ./configure --with-
> libtiff=internal --with-geotiff=internal --without-python
>
> and then make produces the following kind of messages --
>
> ..
> /usr/bin/ld: warning dynamic shared library: 
> /usr/local/lib/libpng.dylib not made a
> weak library in output with MACOSX_DEPLOYMENT_TARGET environment 
> variable set
> to: 10.1
> /usr/bin/ld: warning dynamic shared library: /usr/lib/libz.dylib not 
> made a weak
> library in output with MACOSX_DEPLOYMENT_TARGET environment variable 
> set to:
> 10.1
> /usr/bin/ld: warning dynamic shared library: 
> /usr/local/lib/libdl.dylib not made a
> weak library in output with MACOSX_DEPLOYMENT_TARGET environment 
> variable set
> to: 10.1
> gcc -I/Users/pkishor/Projects/mapserver/gdal-1.1.9 
> -I/Users/pkishor/Projects/
> mapserver/gdal-1.1.9/port 
> -I/Users/pkishor/Projects/mapserver/gdal-1.1.9/gcore -
> I/Users/pkishor/Projects/mapserver/gdal-1.1.9/ogr 
> -I/Users/pkishor/Projects/
> mapserver/gdal-1.1.9/frmts 
> -I/Users/pkishor/Projects/mapserver/gdal-1.1.9/alg -c
> -Wall -fPIC -O2    gdalwarp.c -o gdalwarp.o
> g++  gdalwarp.o  \
>         -L/Users/pkishor/Projects/mapserver/gdal-1.1.9 -lgdal.1.1 
> -ljpeg -lpng -lz -
> lm -ldl -lm -o gdalwarp
> /usr/bin/ld: warning dynamic shared library: 
> /usr/local/lib/libjpeg.dylib not made a
> weak library in output with MACOSX_DEPLOYMENT_TARGET environment 
> variable set
> to: 10.1
> /usr/bin/ld: warning dynamic shared library: 
> /usr/local/lib/libpng.dylib not made a
> weak library in output with MACOSX_DEPLOYMENT_TARGET environment 
> variable set
> to: 10.1
> /usr/bin/ld: warning dynamic shared library: /usr/lib/libz.dylib not 
> made a weak
> library in output with MACOSX_DEPLOYMENT_TARGET environment variable 
> set to:
> 10.1
> /usr/bin/ld: warning dynamic shared library: 
> /usr/local/lib/libdl.dylib not made a
> weak library in output with MACOSX_DEPLOYMENT_TARGET environment 
> variable set
> to: 10.1
>
> and then configuring MapServer --with-gdal results in failure.
>
> Will explore more later.
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>
-----
William Kyngesburye <kyngchaos at charter.net>
http://webpages.charter.net/kyngchaos/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect
RIP Douglas Adams 1952-2001




More information about the mapserver-users mailing list