OS X install updates

This commit is contained in:
William Kyngesburye 2012-04-04 21:24:25 -05:00
parent 0353514182
commit bd916b1bf9
3 changed files with 1835 additions and 196 deletions

1635
doc/INSTALL Normal file

File diff suppressed because it is too large Load Diff

View File

@ -80,13 +80,13 @@ label{ background-color: #FFFFCC;
<DIV CLASS="header" ID="header"> <DIV CLASS="header" ID="header">
<H1>Quantum GIS (QGIS)</H1> <H1>Quantum GIS (QGIS)</H1>
<H2>Building QGIS from source - step by step</H2> <H2>Building QGIS from source - step by step</H2>
<H3>Monday February 06, 2012</H3> <H3>Wednesday April 04, 2012</H3>
</DIV> </DIV>
<DIV CLASS="body" ID="body"> <DIV CLASS="body" ID="body">
<P> <P>
Last Updated: Monday February 06, 2012 Last Updated: Wednesday April 04, 2012
Last Change : Wednesday February 01, 2012 Last Change : Monday December 26, 2011
</P> </P>
<DIV CLASS="toc"> <DIV CLASS="toc">
@ -113,14 +113,15 @@ Last Change : Wednesday February 01, 2012
</UL> </UL>
<LI><A HREF="#toc17">Building on MacOS X</A> <LI><A HREF="#toc17">Building on MacOS X</A>
<UL> <UL>
<LI><A HREF="#toc18">5.1. Install Qt4 from disk image</A> <LI><A HREF="#toc18">5.1. Install Developer Tools</A>
<LI><A HREF="#toc19">5.2. Install development frameworks for QGIS dependencies</A> <LI><A HREF="#toc19">5.2. Install Qt4 from disk image</A>
<LI><A HREF="#toc20">5.3. Install CMake for OSX</A> <LI><A HREF="#toc20">5.3. Install development frameworks for QGIS dependencies</A>
<LI><A HREF="#toc21">5.4. QGIS source</A> <LI><A HREF="#toc21">5.4. Install CMake for OSX</A>
<LI><A HREF="#toc22">5.5. Configure the build</A> <LI><A HREF="#toc22">5.5. QGIS source</A>
<LI><A HREF="#toc23">5.6. Building</A> <LI><A HREF="#toc23">5.6. Configure the build</A>
<LI><A HREF="#toc24">5.7. Building</A>
</UL> </UL>
<LI><A HREF="#toc24">Authors and Acknowledgments</A> <LI><A HREF="#toc25">Authors and Acknowledgments</A>
</OL> </OL>
</DIV> </DIV>
@ -1652,9 +1653,12 @@ In this approach I will try to avoid as much as possible building dependencies
from source and rather use frameworks wherever possible. from source and rather use frameworks wherever possible.
</P> </P>
<P> <P>
The base system here is Mac OS X 10.4 (<U>Tiger</U>), with a single architecture The base system here is Mac OS X 10.4 (<U>Tiger</U>), with a single, default,
build. Included are notes for building on Mac OS X 10.5 (<U>Leopard</U>), 10.6 architecture build. "Universal", SDK and non-default arch builds require
more complex options and some fiddling with the system.
Included are notes for building on Mac OS X 10.5 (<U>Leopard</U>), 10.6
(<U>Snow Leopard</U>) and 10.7 (<U>Lion</U>). (<U>Snow Leopard</U>) and 10.7 (<U>Lion</U>).
(These names will be used throughout the instructions.)
Make sure to read each section completely before typing the first command you see. Make sure to read each section completely before typing the first command you see.
</P> </P>
<P> <P>
@ -1688,12 +1692,41 @@ ie: Macbook Pro i5 (hyperthreading) = 2 cores X 2 = 4
</P> </P>
<A NAME="toc18"></A> <A NAME="toc18"></A>
<H2>5.1. Install Qt4 from disk image</H2> <H2>5.1. Install Developer Tools</H2>
<P>
Developer tools are not a part of a standard OS X installation. Up through
Snow Leopard, the Developer Tools, later called Xcode, were included with the
system install disks, though it's best to download the latest version compatible
with your system to get important updates fixing various issues.
Starting with Lion, Xcode is available as a download and from the App Store.
BUT, there is really no need for the full Xcode on Lion, and in fact could be
tricky to use for compiling QGIS.
</P>
<P>
Downloading Xcode/Developer Tools requires a free developer account at
developer.apple.com. Up through Snow Leopard, get the latest <U>Xcode</U> that is
supported for your system. For Lion, all you need is the much smaller
<U>Command Line Tools for Xcode</U> (you don't get the IDE or system SDKs but they are not
necessary for QGIS). When installing Xcode up through Snow Leopard, make sure to
do a custom install and install the Unix Development or Command Line Tools option.
</P>
<P>
On Lion, if you have installed Xcode 4.0 - 4.2 and are upgrading to 4.3, it's
a good idea to uninstall the old version first with:
</P>
<div class="code"><PRE>
sudo /Developer/Library/uninstall-devtools
</PRE></div>
<A NAME="toc19"></A>
<H2>5.2. Install Qt4 from disk image</H2>
<P> <P>
You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need
for the full Qt SDK, so save yourself some download time and get the frameworks for the full Qt SDK, so save yourself some download time and get the frameworks
only. only. This is available in the Libraries section of the Qt download page.
</P> </P>
<P> <P>
<U>Snow Leopard+ note:</U> If you are building on Snow Leopard+, you will need to <U>Snow Leopard+ note:</U> If you are building on Snow Leopard+, you will need to
@ -1716,13 +1749,17 @@ If you want debug frameworks, Qt also provides a separate download with these.
These are in addition to the non-debug frameworks. These are in addition to the non-debug frameworks.
</P> </P>
<P> <P>
Earlier OS X systems may need an old Qt version - check the requirements of the
current Qt version. To get old Qt downloads, there is an FTP link at the bottom
of the download page. Files are in the qt/source (yes, even the binary packages).
</P>
<P>
Once downloaded open the disk image and run the installer. Note you need admin Once downloaded open the disk image and run the installer. Note you need admin
privileges to install. privileges to install.
</P> </P>
<P> <P>
<U>Qt note:</U> Starting in Qt 4.4, libQtCLucene was added, and in 4.5 <U>Leopard note:</U> Qt includes a couple non-framework libraries in /usr/lib.
libQtUiTools was added, both in /usr/lib. When using a system SDK When using a system SDK these libraries will not be found. To fix this problem,
these libraries will not be found. To fix this problem,
add symlinks to /usr/local: add symlinks to /usr/local:
</P> </P>
@ -1732,13 +1769,13 @@ sudo ln -s /usr/lib/libQtCLucene.dylib /usr/local/lib/
</PRE></div> </PRE></div>
<P> <P>
These should then be found automatically on Leopard and above. Earlier systems These should then be found automatically. Earlier systems
may need some help by adding '-L/usr/local/lib' to CMAKE_SHARED_LINKER_FLAGS, may need some help by adding '-L/usr/local/lib' to CMAKE_SHARED_LINKER_FLAGS,
CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS in the cmake build. CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS in the cmake build.
</P> </P>
<A NAME="toc19"></A> <A NAME="toc20"></A>
<H2>5.2. Install development frameworks for QGIS dependencies</H2> <H2>5.3. Install development frameworks for QGIS dependencies</H2>
<P> <P>
Download William Kyngesburye's excellent GDAL Complete package that includes Download William Kyngesburye's excellent GDAL Complete package that includes
@ -1766,8 +1803,12 @@ Also available is a GRASS application:
<P> <P>
<A HREF="http://www.kyngchaos.com/wiki/software/grass">http://www.kyngchaos.com/wiki/software/grass</A> <A HREF="http://www.kyngchaos.com/wiki/software/grass">http://www.kyngchaos.com/wiki/software/grass</A>
</P> </P>
<P>
Old versions of these packages for older systems are available in the
software archive section.
</P>
<H3>5.2.1. Additional Dependencies: General compatibility note</H3> <H3>5.3.1. Additional Dependencies: General compatibility note</H3>
<P> <P>
There are some additional dependencies that, at the time of writing, are not There are some additional dependencies that, at the time of writing, are not
@ -1783,7 +1824,7 @@ Stable release versions are preferred. Beta and other development versions may
have problems and you are on your own with those. have problems and you are on your own with those.
</P> </P>
<H3>5.2.2. Additional Dependencies: Expat</H3> <H3>5.3.2. Additional Dependencies: Expat</H3>
<P> <P>
<U>Snow Leopard+ note:</U> Snow Leopard includes a usable expat, so this step is <U>Snow Leopard+ note:</U> Snow Leopard includes a usable expat, so this step is
@ -1806,7 +1847,7 @@ make
sudo make install sudo make install
</PRE></div> </PRE></div>
<H3>5.2.3. Additional Dependencies: Python</H3> <H3>5.3.3. Additional Dependencies: Python</H3>
<P> <P>
<U>Leopard+ note:</U> Starting with Leopard a usable Python is included <U>Leopard+ note:</U> Starting with Leopard a usable Python is included
@ -1815,7 +1856,7 @@ So there is no need to install Python on Leopard and newer.
You can still install Python from python.org if preferred. You can still install Python from python.org if preferred.
</P> </P>
<P> <P>
If installing from python.org, make sure you install at least the latest Python If installing from python.org, make sure you install the latest Python
2.x from 2.x from
</P> </P>
<P> <P>
@ -1826,7 +1867,7 @@ Python 3 is a major change, and may have compatibility issues, so try it at
your own risk. your own risk.
</P> </P>
<H3>5.2.4. Additional Dependencies: SIP</H3> <H3>5.3.4. Additional Dependencies: SIP</H3>
<P> <P>
Retrieve the python bindings toolkit SIP from Retrieve the python bindings toolkit SIP from
@ -1862,7 +1903,7 @@ python configure.py -n -d /Library/Python/2.5/site-packages -b /usr/local/bin \
</PRE></div> </PRE></div>
<P> <P>
<U>Snow Leopard+ system Python</U> <U>Snow Leopard system Python</U>
</P> </P>
<P> <P>
Similar to Leopard, you should install outside the system Python path. Similar to Leopard, you should install outside the system Python path.
@ -1889,6 +1930,20 @@ python2.6 configure.py -n -d /Library/Python/2.6/site-packages -b /usr/local/bin
-e /usr/local/include -v /usr/local/share/sip --arch=x86_64 -s MacOSX10.6.sdk -e /usr/local/include -v /usr/local/share/sip --arch=x86_64 -s MacOSX10.6.sdk
</PRE></div> </PRE></div>
<P>
<U>Lion system Python</U>
</P>
<P>
Similar to Snow Leopard, you should install outside the system Python path.
There is no need for the SDK option (the CLI tools for Lion don't inlcude SDKs)
or arch option:
</P>
<div class="code"><PRE>
python2.7 configure.py -d /Library/Python/2.7/site-packages -b /usr/local/bin \
-e /usr/local/include -v /usr/local/share/sip
</PRE></div>
<P> <P>
<U>continue...</U> <U>continue...</U>
</P> </P>
@ -1901,7 +1956,7 @@ make
sudo make install sudo make install
</PRE></div> </PRE></div>
<H3>5.2.5. Additional Dependencies: PyQt</H3> <H3>5.3.5. Additional Dependencies: PyQt</H3>
<P> <P>
Retrieve the python bindings toolkit for Qt from Retrieve the python bindings toolkit for Qt from
@ -1935,7 +1990,7 @@ python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
</PRE></div> </PRE></div>
<P> <P>
<U>Snow Leopard+ system Python</U> <U>Snow Leopard system Python</U>
</P> </P>
<P> <P>
Similar to Leopard, you should install outside the system Python path. Similar to Leopard, you should install outside the system Python path.
@ -1961,21 +2016,19 @@ python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --
</PRE></div> </PRE></div>
<P> <P>
<U>continue...</U> <U>Snow Leopard system Python</U>
</P> </P>
<P> <P>
There is a problem with the configuration that needs to be fixed now Similar to Snow Leopard, you should install outside the system Python path.
(it affects PyQwt compilation later). Edit pyqtconfig.py and change the qt_dir But you don't need the arch option:
line to:
</P> </P>
<div class="code"><PRE> <div class="code"><PRE>
'qt_dir': '/usr', python2.7 configure.py -d /Library/Python/2.7/site-packages -b /usr/local/bin
</PRE></div> </PRE></div>
<P> <P>
Then continue with compilation and installation (this is a good place to use <U>continue...</U>
parallel compilation, if you can):
</P> </P>
<div class="code"><PRE> <div class="code"><PRE>
@ -1989,74 +2042,42 @@ QtOpenGL/makefile and add -undefined dynamic_lookup to LFLAGS.
Then make again. Then make again.
</P> </P>
<H3>5.2.6. Additional Dependencies: Qwt/PyQwt</H3> <H3>5.3.6. Additional Dependencies: Qwt</H3>
<P> <P>
The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt. The GPS tracking feature uses Qwt.
You can take care of both with the PyQwt source from:
</P> </P>
<P> <P>
<A HREF="http://pyqwt.sourceforge.net/">http://pyqwt.sourceforge.net/</A> NOTE: PyQwt is not compatible with PyQt 4.9, so we will skip that.
</P> </P>
<P> <P>
Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 Download the latest Qwt 5.x source (6.x is untested) from:
(comes with Qwt 5.2.1). Normal compilation does both Qwt and PyQwt at the same
time, but Qwt is statically linked into PyQwt, and QGIS can't use it. So, we
need to split the build.
</P> </P>
<P> <P>
Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build <A HREF="http://sourceforge.net/projects/qwt">http://sourceforge.net/projects/qwt</A>
and install: </P>
<P>
Double-click the tarball to unpack it.
</P>
<P>
Now, cd to the qwt source folder in a Terminal. Type these commands to build
and install (assumes v5.2.2, adjust commands for other version as needed):
</P> </P>
<div class="code"><PRE> <div class="code"><PRE>
cat &gt;&gt; qwtconfig.pri &lt;&lt;EOF
CONFIG += release QwtDll
EOF
qmake -spec macx-g++ qmake -spec macx-g++
make make
sudo make install sudo make install
sudo install_name_tool -id /usr/local/qwt-5.2.1-svn/lib/libqwt.5.dylib \ sudo install_name_tool -id /usr/local/qwt-5.2.2/lib/libqwt.5.dylib \
/usr/local/qwt-5.2.1-svn/lib/libqwt.5.dylib /usr/local/qwt-5.2.2/lib/libqwt.5.dylib
</PRE></div> </PRE></div>
<P> <P>
The Qwt shared library is now installed in /usr/local/qwt-5.x.x[-svn] (x.x is The Qwt shared library is now installed in /usr/local/qwt-5.x.x (x.x is
the minor.point version, and it may be an SVN version). Remember this for the minor.point version). Remember this for QGIS configuration.
QGIS and PyQwt configuration.
</P>
<P>
Now for PyQwt. Still in the Terminal (for all Pythons, except see Snow Leopard
Carbon note below):
</P> </P>
<div class="code"><PRE> <H3>5.3.7. Additional Dependencies: Bison</H3>
cd ../configure
python configure.py --extra-include-dirs=/usr/local/qwt-5.2.1-svn/include \
--extra-lib-dirs=/usr/local/qwt-5.2.1-svn/lib --extra-libs=qwt
make
sudo make install
</PRE></div>
<P>
Make sure to use the qwt install path from the Qwt build above.
</P>
<P>
<U>Snow Leopard+ note</U>
</P>
<P>
If using Qt Carbon, you need to specify which architectures to build, otherwise
it will default to a combination that does not work (ie x86_64 for a Carbon Qt).
This is not needed for Qt Cocoa. Configure as follows:
</P>
<div class="code"><PRE>
python configure.py --extra-cflags="-arch i386" --extra-cxxflags="-arch i386" \
--extra-lflags="-arch i386" --extra-include-dirs=/usr/local/qwt-5.2.1-svn/include \
--extra-lib-dirs=/usr/local/qwt-5.2.1-svn/lib --extra-libs=qwt
</PRE></div>
<H3>5.2.7. Additional Dependencies: Bison</H3>
<P> <P>
The version of bison available by default on Mac OS X is too old so you The version of bison available by default on Mac OS X is too old so you
@ -2078,8 +2099,8 @@ make
sudo make install sudo make install
</PRE></div> </PRE></div>
<A NAME="toc20"></A> <A NAME="toc21"></A>
<H2>5.3. Install CMake for OSX</H2> <H2>5.4. Install CMake for OSX</H2>
<P> <P>
Get the latest source release from here: Get the latest source release from here:
@ -2101,8 +2122,8 @@ make
sudo make install sudo make install
</PRE></div> </PRE></div>
<A NAME="toc21"></A> <A NAME="toc22"></A>
<H2>5.4. QGIS source</H2> <H2>5.5. QGIS source</H2>
<P> <P>
Unzip the QGIS source tarball to a working folder of your choice Unzip the QGIS source tarball to a working folder of your choice
@ -2125,8 +2146,8 @@ select <U>Download .tar.gz</U>.
Double-click the tarball to unzip it. Double-click the tarball to unzip it.
</P> </P>
<A NAME="toc22"></A> <A NAME="toc23"></A>
<H2>5.5. Configure the build</H2> <H2>5.6. Configure the build</H2>
<P> <P>
CMake supports out of source build so we will create a 'build' dir for the CMake supports out of source build so we will create a 'build' dir for the
@ -2143,33 +2164,17 @@ cd build
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \ cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
-D CMAKE_BUILD_TYPE=MinSizeRel \ -D CMAKE_BUILD_TYPE=MinSizeRel \
-D WITH_INTERNAL_SPATIALITE=FALSE \ -D WITH_INTERNAL_SPATIALITE=FALSE \
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \ -D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \ -D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
-D BISON_EXECUTABLE=/usr/local/bin/bison \ -D BISON_EXECUTABLE=/usr/local/bin/bison \
.. ..
</PRE></div> </PRE></div>
<P> <P>
This will automatically find and use the previously installed frameworks, and This will automatically find and use the previously installed frameworks, and
the GRASS application if installed. the GRASS application if installed. Remember to change the Qwt version if a
different version was compiled.
</P> </P>
<P>
Or, to use a Unix-style build of GRASS, use the following cmake invocation
(minimum GRASS version as stated in the QGIS requirements, substitute the GRASS
path and version as required):
</P>
<div class="code"><PRE>
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_BUILD_TYPE=MinSizeRel \
-D WITH_INTERNAL_SPATIALITE=FALSE \
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
-D GRASS_PREFIX=/user/local/grass-6.4.1 \
-D BISON_EXECUTABLE=/usr/local/bin/bison \
..
</PRE></div>
<P> <P>
<U>Snow Leopard note:</U> To handle 32-bit Qt (Carbon), create a 32bit python wrapper <U>Snow Leopard note:</U> To handle 32-bit Qt (Carbon), create a 32bit python wrapper
script and add arch flags to the configuration: script and add arch flags to the configuration:
@ -2233,8 +2238,8 @@ non-standard, libs (ie postgres' libpq) bump the bundle number to 2:
-D QGIS_MACAPP_BUNDLE=2 \ -D QGIS_MACAPP_BUNDLE=2 \
</PRE></div> </PRE></div>
<A NAME="toc23"></A> <A NAME="toc24"></A>
<H2>5.6. Building</H2> <H2>5.7. Building</H2>
<P> <P>
Now we can start the build process (remember the parallel compilation note at Now we can start the build process (remember the parallel compilation note at
@ -2261,7 +2266,7 @@ or, for an /Applications build:
sudo make install sudo make install
</PRE></div> </PRE></div>
<A NAME="toc24"></A> <A NAME="toc25"></A>
<H1>6. Authors and Acknowledgments</H1> <H1>6. Authors and Acknowledgments</H1>
<P> <P>
@ -2311,5 +2316,5 @@ The following people have contributed to this document:
</DIV> </DIV>
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) --> <!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -o INSTALL.html -t html INSTALL.t2t --> <!-- cmdline: txt2tags -t html -o INSTALL.html INSTALL.t2t -->
</BODY></HTML> </BODY></HTML>

View File

@ -4,9 +4,12 @@
In this approach I will try to avoid as much as possible building dependencies In this approach I will try to avoid as much as possible building dependencies
from source and rather use frameworks wherever possible. from source and rather use frameworks wherever possible.
The base system here is Mac OS X 10.4 (__Tiger__), with a single architecture The base system here is Mac OS X 10.4 (__Tiger__), with a single, default,
build. Included are notes for building on Mac OS X 10.5 (__Leopard__), 10.6 architecture build. "Universal", SDK and non-default arch builds require
more complex options and some fiddling with the system.
Included are notes for building on Mac OS X 10.5 (__Leopard__), 10.6
(__Snow Leopard__) and 10.7 (__Lion__). (__Snow Leopard__) and 10.7 (__Lion__).
(These names will be used throughout the instructions.)
Make sure to read each section completely before typing the first command you see. Make sure to read each section completely before typing the first command you see.
__General note on Terminal usage:__ When I say "cd" to a folder in a Terminal, __General note on Terminal usage:__ When I say "cd" to a folder in a Terminal,
@ -32,11 +35,35 @@ ie: Mac Pro "8 Core" model (2 quad core processors) = 8
ie: Macbook Pro i5 (hyperthreading) = 2 cores X 2 = 4 ie: Macbook Pro i5 (hyperthreading) = 2 cores X 2 = 4
== Install Developer Tools ==
Developer tools are not a part of a standard OS X installation. Up through
Snow Leopard, the Developer Tools, later called Xcode, were included with the
system install disks, though it's best to download the latest version compatible
with your system to get important updates fixing various issues.
Starting with Lion, Xcode is available as a download and from the App Store.
BUT, there is really no need for the full Xcode on Lion, and in fact could be
tricky to use for compiling QGIS.
Downloading Xcode/Developer Tools requires a free developer account at
developer.apple.com. Up through Snow Leopard, get the latest __Xcode__ that is
supported for your system. For Lion, all you need is the much smaller
__Command Line Tools for Xcode__ (you don't get the IDE or system SDKs but they are not
necessary for QGIS). When installing Xcode up through Snow Leopard, make sure to
do a custom install and install the Unix Development or Command Line Tools option.
On Lion, if you have installed Xcode 4.0 - 4.2 and are upgrading to 4.3, it's
a good idea to uninstall the old version first with:
```
sudo /Developer/Library/uninstall-devtools
```
== Install Qt4 from disk image == == Install Qt4 from disk image ==
You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need
for the full Qt SDK, so save yourself some download time and get the frameworks for the full Qt SDK, so save yourself some download time and get the frameworks
only. only. This is available in the Libraries section of the Qt download page.
__Snow Leopard+ note:__ If you are building on Snow Leopard+, you will need to __Snow Leopard+ note:__ If you are building on Snow Leopard+, you will need to
decide between 32-bit support in the older Qt Carbon branch, or 64-bit decide between 32-bit support in the older Qt Carbon branch, or 64-bit
@ -54,12 +81,15 @@ http://qt.nokia.com/downloads
If you want debug frameworks, Qt also provides a separate download with these. If you want debug frameworks, Qt also provides a separate download with these.
These are in addition to the non-debug frameworks. These are in addition to the non-debug frameworks.
Earlier OS X systems may need an old Qt version - check the requirements of the
current Qt version. To get old Qt downloads, there is an FTP link at the bottom
of the download page. Files are in the qt/source (yes, even the binary packages).
Once downloaded open the disk image and run the installer. Note you need admin Once downloaded open the disk image and run the installer. Note you need admin
privileges to install. privileges to install.
__Qt note:__ Starting in Qt 4.4, libQtCLucene was added, and in 4.5 __Leopard note:__ Qt includes a couple non-framework libraries in /usr/lib.
libQtUiTools was added, both in /usr/lib. When using a system SDK When using a system SDK these libraries will not be found. To fix this problem,
these libraries will not be found. To fix this problem,
add symlinks to /usr/local: add symlinks to /usr/local:
``` ```
@ -67,7 +97,7 @@ sudo ln -s /usr/lib/libQtUiTools.a /usr/local/lib/
sudo ln -s /usr/lib/libQtCLucene.dylib /usr/local/lib/ sudo ln -s /usr/lib/libQtCLucene.dylib /usr/local/lib/
``` ```
These should then be found automatically on Leopard and above. Earlier systems These should then be found automatically. Earlier systems
may need some help by adding '-L/usr/local/lib' to CMAKE_SHARED_LINKER_FLAGS, may need some help by adding '-L/usr/local/lib' to CMAKE_SHARED_LINKER_FLAGS,
CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS in the cmake build. CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS in the cmake build.
@ -93,6 +123,9 @@ Also available is a GRASS application:
http://www.kyngchaos.com/wiki/software/grass http://www.kyngchaos.com/wiki/software/grass
Old versions of these packages for older systems are available in the
software archive section.
=== Additional Dependencies: General compatibility note === === Additional Dependencies: General compatibility note ===
There are some additional dependencies that, at the time of writing, are not There are some additional dependencies that, at the time of writing, are not
@ -131,7 +164,7 @@ in the system. This Python 2.5, 2.6 and 2.7, respectively for Leo, Snow and Lio
So there is no need to install Python on Leopard and newer. So there is no need to install Python on Leopard and newer.
You can still install Python from python.org if preferred. You can still install Python from python.org if preferred.
If installing from python.org, make sure you install at least the latest Python If installing from python.org, make sure you install the latest Python
2.x from 2.x from
http://www.python.org/download/ http://www.python.org/download/
@ -166,7 +199,7 @@ python configure.py -n -d /Library/Python/2.5/site-packages -b /usr/local/bin \
-e /usr/local/include -v /usr/local/share/sip -s MacOSX10.5.sdk -e /usr/local/include -v /usr/local/share/sip -s MacOSX10.5.sdk
``` ```
__Snow Leopard+ system Python__ __Snow Leopard system Python__
Similar to Leopard, you should install outside the system Python path. Similar to Leopard, you should install outside the system Python path.
Also, you need to specify the architecture you want (requires at least SIP Also, you need to specify the architecture you want (requires at least SIP
@ -188,6 +221,17 @@ python2.6 configure.py -n -d /Library/Python/2.6/site-packages -b /usr/local/bin
-e /usr/local/include -v /usr/local/share/sip --arch=x86_64 -s MacOSX10.6.sdk -e /usr/local/include -v /usr/local/share/sip --arch=x86_64 -s MacOSX10.6.sdk
``` ```
__Lion system Python__
Similar to Snow Leopard, you should install outside the system Python path.
There is no need for the SDK option (the CLI tools for Lion don't inlcude SDKs)
or arch option:
```
python2.7 configure.py -d /Library/Python/2.7/site-packages -b /usr/local/bin \
-e /usr/local/include -v /usr/local/share/sip
```
__continue...__ __continue...__
Then continue with compilation and installation: Then continue with compilation and installation:
@ -222,7 +266,7 @@ More configuration is needed to install outside the system path:
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
``` ```
__Snow Leopard+ system Python__ __Snow Leopard system Python__
Similar to Leopard, you should install outside the system Python path. Similar to Leopard, you should install outside the system Python path.
Also, you need to specify the architecture you want (requires at least PyQt 4.6), Also, you need to specify the architecture you want (requires at least PyQt 4.6),
@ -242,19 +286,17 @@ For 64-bit Qt (Qt Cocoa), use this configure line:
python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64 python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64
``` ```
__Snow Leopard system Python__
Similar to Snow Leopard, you should install outside the system Python path.
But you don't need the arch option:
```
python2.7 configure.py -d /Library/Python/2.7/site-packages -b /usr/local/bin
```
__continue...__ __continue...__
There is a problem with the configuration that needs to be fixed now
(it affects PyQwt compilation later). Edit pyqtconfig.py and change the qt_dir
line to:
```
'qt_dir': '/usr',
```
Then continue with compilation and installation (this is a good place to use
parallel compilation, if you can):
``` ```
make make
sudo make install sudo make install
@ -265,60 +307,31 @@ QtOpenGL/makefile and add ""-undefined dynamic_lookup"" to LFLAGS.
Then make again. Then make again.
=== Additional Dependencies: Qwt/PyQwt === === Additional Dependencies: Qwt ===
The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt. The GPS tracking feature uses Qwt.
You can take care of both with the PyQwt source from:
http://pyqwt.sourceforge.net/ NOTE: PyQwt is not compatible with PyQt 4.9, so we will skip that.
Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 Download the latest Qwt 5.x source (6.x is untested) from:
(comes with Qwt 5.2.1). Normal compilation does both Qwt and PyQwt at the same
time, but Qwt is statically linked into PyQwt, and QGIS can't use it. So, we
need to split the build.
Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build http://sourceforge.net/projects/qwt
and install:
Double-click the tarball to unpack it.
Now, cd to the qwt source folder in a Terminal. Type these commands to build
and install (assumes v5.2.2, adjust commands for other version as needed):
``` ```
cat >> qwtconfig.pri <<EOF
CONFIG += release QwtDll
EOF
qmake -spec macx-g++ qmake -spec macx-g++
make make
sudo make install sudo make install
sudo install_name_tool -id /usr/local/qwt-5.2.1-svn/lib/libqwt.5.dylib \ sudo install_name_tool -id /usr/local/qwt-5.2.2/lib/libqwt.5.dylib \
/usr/local/qwt-5.2.1-svn/lib/libqwt.5.dylib /usr/local/qwt-5.2.2/lib/libqwt.5.dylib
``` ```
The Qwt shared library is now installed in /usr/local/qwt-5.x.x[-svn] (x.x is The Qwt shared library is now installed in /usr/local/qwt-5.x.x (x.x is
the minor.point version, and it may be an SVN version). Remember this for the minor.point version). Remember this for QGIS configuration.
QGIS and PyQwt configuration.
Now for PyQwt. Still in the Terminal (for all Pythons, except see Snow Leopard
Carbon note below):
```
cd ../configure
python configure.py --extra-include-dirs=/usr/local/qwt-5.2.1-svn/include \
--extra-lib-dirs=/usr/local/qwt-5.2.1-svn/lib --extra-libs=qwt
make
sudo make install
```
Make sure to use the qwt install path from the Qwt build above.
__Snow Leopard+ note__
If using Qt Carbon, you need to specify which architectures to build, otherwise
it will default to a combination that does not work (ie x86_64 for a Carbon Qt).
This is not needed for Qt Cocoa. Configure as follows:
```
python configure.py --extra-cflags="-arch i386" --extra-cxxflags="-arch i386" \
--extra-lflags="-arch i386" --extra-include-dirs=/usr/local/qwt-5.2.1-svn/include \
--extra-lib-dirs=/usr/local/qwt-5.2.1-svn/lib --extra-libs=qwt
```
=== Additional Dependencies: Bison === === Additional Dependencies: Bison ===
@ -389,29 +402,15 @@ cd build
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \ cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
-D CMAKE_BUILD_TYPE=MinSizeRel \ -D CMAKE_BUILD_TYPE=MinSizeRel \
-D WITH_INTERNAL_SPATIALITE=FALSE \ -D WITH_INTERNAL_SPATIALITE=FALSE \
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \ -D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \ -D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
-D BISON_EXECUTABLE=/usr/local/bin/bison \ -D BISON_EXECUTABLE=/usr/local/bin/bison \
.. ..
``` ```
This will automatically find and use the previously installed frameworks, and This will automatically find and use the previously installed frameworks, and
the GRASS application if installed. the GRASS application if installed. Remember to change the Qwt version if a
different version was compiled.
Or, to use a Unix-style build of GRASS, use the following cmake invocation
(minimum GRASS version as stated in the QGIS requirements, substitute the GRASS
path and version as required):
```
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_BUILD_TYPE=MinSizeRel \
-D WITH_INTERNAL_SPATIALITE=FALSE \
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
-D GRASS_PREFIX=/user/local/grass-6.4.1 \
-D BISON_EXECUTABLE=/usr/local/bin/bison \
..
```
__Snow Leopard note:__ To handle 32-bit Qt (Carbon), create a 32bit python wrapper __Snow Leopard note:__ To handle 32-bit Qt (Carbon), create a 32bit python wrapper
script and add arch flags to the configuration: script and add arch flags to the configuration: