Changes between Initial Version and Version 1 of BuildingOnMac


Ignore:
Timestamp:
Mar 6, 2012, 3:56:48 PM (12 years ago)
Author:
jorgearevalo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingOnMac

    v1 v1  
     1First of all, you can find a compiled version of GDAL in KyngChaos wiki (http://www.kyngchaos.com). Here, the links:[[BR]]
     2- GDAL 1.9: http://www.kyngchaos.com/files/software/frameworks/GDAL_Complete-1.9.dmg [[BR]]
     3- GDAL 1.8: http://www.kyngchaos.com/files/software/frameworks/GDAL_Complete-1.8.dmg [[BR]]
     4
     5But if you're a GDAL developer, you probably want to compile GDAL by yourself. It is possible to compile GDAL in Mac OS, following the instructions from http://www.kyngchaos.com/macosx/build/gdal, but some important things must be taken into account. These are the steps I've followed:
     6
     7My machine: MacBook with Mac OS X 10.6.8 (Snow Leopard).
     8
     91.- Install UNIX Tools for Mac, needed to compile. You can find them with XCode, as an option during installation
     10
     112.- Install GDAL pre-requisites. All of them can be found as dmg images in KyngChaos wiki except one: Expat. You must compile it. So:
     12 2.1 - Install dmg images (these are the versions for Snow Leopard, but use the ones you need from http://www.kyngchaos.com/software/frameworks):
     13   - UnixImageIO Framework: http://www.kyngchaos.com/files/software/frameworks/UnixImageIO_Framework-1.3.2.dmg
     14   - PROJ Framework: http://www.kyngchaos.com/files/software/frameworks/PROJ_Framework-4.7.0-2-snow.dmg
     15   - GEOS Framework: http://www.kyngchaos.com/files/software/frameworks/GEOS_Framework-3.3.2-1.dmg
     16 2.2 - Compile Expat, following these instructions: http://www.kyngchaos.com/macosx/build/expat
     17
     183.- All the Frameworks are installed in /Library/Frameworks. Now, you're ready to compile GDAL. The instructions are here: http://www.kyngchaos.com/macosx/build/gdal. '''BUT'''...
     19
     20The paths shown in the instructions page may not work for you. If you followed the previous steps, the configure line you need to use is:
     21
     22
     23{{{
     24./configure --with-threads --disable-static --without-grass --with-jasper=/Library/Frameworks/UnixImageIO.framework/unix \
     25--with-libtiff=/Library/Frameworks /UnixImageIO.framework/unix --with-jpeg=/Library/Frameworks/UnixImageIO.framework/unix \
     26--with-gif=/Library/Frameworks/UnixImageIO.framework/unix --with-png=/Library/Frameworks/UnixImageIO.framewok/unix \
     27--with-geotiff=/Library/Frameworks/UnixImageIO.framework/unix --with-sqlite3=/Library/Frameworks/SQLite3.framework/unix --with-odbc \
     28--with-pcraster=internal --with-geos=/Library/Frameworks/GEOS.framework/unix/bin/geos-config --with-static-proj4=/Library/Frameworks/PROJ.framework/unix\
     29 --with-expat=/usr/local --with-curl --with-python --with-macosx-framework --with-pg=/Library/PostgreSQL/9.1/bin/pg_config --without-libtool \
     30CFLAGS="-Os -arch i386 -arch x86_64" CXXFLAGS="-Os -arch i386 -arch x86_64" LDFLAGS="-arch i386 -arch x86_64"
     31}}}
     32
     334.- Execute make & sudo make install.
     34
     35After that, your GDAL library should be correctly installed in /Library/Frameworks/GDAL.framework. Now you can add /Library/Frameworks/GDAL.framework/unix/bin to your PATH enviroment variable, in order to execute GDAL apps.