Changes between Initial Version and Version 1 of MacOS


Ignore:
Timestamp:
Jan 26, 2009, 12:31:01 PM (15 years ago)
Author:
jmckenna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MacOS

    v1 v1  
     1= Compiling !MapServer on !MacOS X =
     2
     3(New link for building on Macos 10.3.x is at bottom of this document.) (New link for building on Macos 10.2.3 is at bottom of this document.)
     4
     5Successfully compiling MapServer requires certain pre-requisites to be in place. Needless to say, you need the latest and greatest version of MacOS X (currently 10.1.2) with developer tools (available as a free download from http://developer.apple.com if you register for a free developer account). The developer tools give you a bunch of goodies including cc, the all important c compiler which replaces gcc on MacOS X.
     6
     7Another good place to visit is http://www.darwinfo.org which has available additional developer tools that Apple forgot ;-) to include. Btw, 10.1.2 comes with Apache, Perl, and PHP pre-installed.
     8
     9MapServer itself depends upon other libraries of software to do the many things it does. Some of these are (version numbers given here are the latest that are known to work with MapServer) --
     10
     11    * gd 1.8.4 (mandatory) available at http://boutell.com. The easiest instructions for building gd on MacOS X are at http://www.stepwise.com/Articles/Workbench/2001-06-12.01.html
     12          o libpng 1.2.1 available at http://www.libpng.org
     13                + zlib (fortunately provided by Apple) - libpng depends upon zlib.
     14          o libjpeg-6b
     15    * libtiff
     16    * PostgresQL? (for PostGIS support). The best and easiest PostgresQL? installation package for MacOS X has been created by Marc Liyanage at http://www.entropy.ch. Marc's website is also the best source for a MySQL installation package for MacOS X if MySQL support is required in your MapServer website.
     17    * GDAL 1.1.5 (for raster data support). Maintained by Frank Warmerdam at http://www.remotesensing.org/gdal.
     18    * Proj 4.4.4
     19    * Perl for MapScript support. Perl 5.6.0 is already built and installed with 10.1. If Perl 5.6.1 is desired then it needs to be built from scratch. Notes coming soon.
     20    * PHP 4.0.6 for MapScript support. PHP is already built and installed with 10.1. PHP/Mapscript? will not work on OS X at this time because dynamic libraries are not yet supported on PHP on MacOS X. See link http://developer.apple.com/internet/macosx/php.html. Also, keep in mind that PHP/MapScript? does not yet work with PHP 4.1.x. Latest information on PHP/MapScript? is available at http://www.dmsolutions.ca where Daniel Morrisette maintains it.
     21    * FreeType? 1.3.1 for Truetype font support
     22
     23== Compiling on OS 10.2 ==
     24=== Using Default Mac Compiler (GCC 3.1) ===
     25
     26Before you start, read the developer docs that come with the Mac OS X Developer package. A couple important tips that I picked up from these docs are that you should be using -fPIC and -no-cpp-precomp in your compile and link flag options and that you may need a dummy 'malloc.h' from time to time. The Mac compiler searches /usr/local/lib and include by default and you can head off many warnings by removing these paths from include and lib dirs in your makefiles.
     27
     28These are not detailed instructions, just a list of 'gotchas' that I (Sean Gillies, sgillies@frii.com) have encountered:
     29
     30GD-2.0.1
     31
     32Unless you really want WBMP, disable it when you configure. I built libgd as static and shared object (.so), but not as a .dylib. I've found that gd-2.0.1 works well with the libfreetype that comes with XDarwin and is installed under /usr/X11R6/lib.
     33
     34PROJ-4.4.5
     35
     36The configure script for proj-4 doesn't work properly for OS X. There's no *darwin* target and this leaves you a bit stranded when it comes to building shared libs. I built a static libproj.a and link against it. The apps ('cs2cs' etc) work fine.
     37
     38It seems that there *is* a darwin target by installing proj-4.4.6 on darwin6.4 (OS X v10.2.4).
     39
     40GDAL-1.1.7
     41
     42Unless you really want the Python mod, disable it when you configure. You'll need to make some changes to your GDALmake.opt file. I added -DPROJ_STATIC to the C- and CXX_OPTFLAGS. You may need to add -dl to the LIBS. Your LD_SHARED should be = g++ -dynamiclib.
     43
     44Libwww-5.4.0
     45
     46This seemed to build OK, but I wasn't able to link it to mapserver. Haven't had time to work it out, so I'm not using it for now.
     47
     48Mapserver
     49
     50I've been able to build mapserver from the July 22 2002 CVS without too much trouble. You will probably need to use g++ as your linker rather than gcc, so this means replacing CC with CXX further towards the end of the makefile where the mapserver utilities are being linked. If you are getting errors like 'missing symbol __gxx_personality_v0', then you need to replace CC with CXX.
     51
     52== Cookbook Instructions for MacOS 10.2.3 ==
     53
     54A new set of instructions for building PHP 4.3.1, !MapServer, !PHP/Mapscript, postgresql and postGIS on macos 10.2.3 has been compiled and posted at http://home.nc.rr.com/wwheaton . (It is not posted in the WIKI due to formatting issues.) Note that !PHP/Mapscript does compile and work with PHP4.3.1 and Macos 10.2.3 so Macos users now can build fully functional web-mapping systems.
     55
     56== Fink ==
     57
     58There is a package manager for OS X with many OSS ports for OS X, maybe someone will make a fink package? ;-)
     59
     60http://fink.sourceforge.net
     61
     62== Building and Installing MapServer for Mac OS 10.3.x ==
     63
     64Includes instructions for !MapServer CGI & PHP-MapScript, and for building all necessary support libraries (graphics libs, geotiff, gdal, PHP, proj, pdflib, libgrass) and a basic outline to building PostGIS (that one's not a high priority for me, but I may do something detailed in the future for completeness). Kept up-to-date to current versions of all related parts.
     65
     66http://webpages.charter.net/kyngchaos/macosx/index.html