Skip to content

Commit 3d15e67

Browse files
committedApr 1, 2013
OS X install updates
1 parent a0e9f89 commit 3d15e67

File tree

3 files changed

+260
-104
lines changed

3 files changed

+260
-104
lines changed
 

‎INSTALL

Lines changed: 84 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Quantum GIS (QGIS)
22
Building QGIS from source - step by step
3-
Friday January 04, 2013
3+
Monday April 01, 2013
44

55

6-
Last Updated: Friday January 04, 2013
7-
Last Change : Friday January 04, 2013
6+
Last Updated: Monday April 01, 2013
7+
Last Change : Saturday December 08, 2012
88

99

1010
1. Introduction
@@ -650,8 +650,9 @@ box, browse to the top level QGIS directory.
650650
In the Where to build the binaries: box, browse to the 'build' directory you
651651
created.
652652

653-
Adjust the path to bison and flex so that the shortened C:/Progra~1 is used
654-
rather than C:/Program Files.
653+
If the path to bison and flex contains blanks, you need to use the short name
654+
for the directory (i.e. C:\Program Files should be rewritten to
655+
C:\Progra~n, where n is the number as shown in `dir /x C:\``).
655656

656657
Verify that the 'BINDINGS_GLOBAL_INSTALL' option is not checked, so that python
657658
bindings are placed into the output directory when you run the INSTALL target.
@@ -1225,7 +1226,10 @@ On Lion and Mt. Lion, using Xcode 4.4+, the developer command line tools can be
12251226
installed via the Xcode preferences. The tools now appear to require an install
12261227
of Xcode, regardless of using a separate DMG installer for just the tools.
12271228

1228-
Xcode 4.4+ also introduces the clang frontend to the LLVM compiler as default.
1229+
Xcode 4.3+ also introduces the clang frontend to the LLVM compiler as default.
1230+
1231+
Note: In XCODE 4.5 installed from the app store, you need to install the
1232+
command line tools from XCode -> Preferences -> Downloads and choose command line tools.
12291233

12301234
http://clang.llvm.org/
12311235

@@ -1243,7 +1247,7 @@ If you have trouble building some of the dependencies listed below with clang
12431247
5.2. Install Qt4 from disk image
12441248
================================
12451249

1246-
You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need
1250+
You need a minimum of Qt-4.4.0. I suggest getting the latest (Qt 4, not 5). There is no need
12471251
for the full Qt SDK, so save yourself some download time and get the frameworks
12481252
only. This is available in the Libraries section of the Qt download page.
12491253

@@ -1253,15 +1257,17 @@ support in the Qt Cocoa branch. Appropriate installers are available for both
12531257
as of Qt-4.5.2, though they stopped making Carbon packages at Qt 4.7.4.
12541258
Qt 4.6+ is recommended for Cocoa.
12551259
Starting with Lion, Carbon may not work properly, if at all.
1260+
Starting with Qt 4.8, only 64bit Cocoa installers are available.
12561261

1257-
Mt. Lion note: Any Qt version < 4.8.3 will cause a 'This version of Mac OS X
1258-
is unsupported' error when building QGIS.
1262+
General note: Support for new system versions in any given Qt version may
1263+
not be present and may cause a 'This version of Mac OS X
1264+
is unsupported' error when building QGIS. Try the next Qt version.
12591265

12601266
PPC note: The readymade Qt Cocoa installers don't include PPC support, you'd
12611267
have to compile Qt yourself. But, there appear to be issues with Qt Cocoa on
12621268
PPC Macs anyways. Qt Carbon is recommended on PPC Macs.
12631269

1264-
http://qt.nokia.com/downloads
1270+
http://qt-project.org/downloads
12651271

12661272
If you want debug frameworks, Qt also provides a separate download with these.
12671273
These are in addition to the non-debug frameworks.
@@ -1273,7 +1279,7 @@ of the download page. Files are in the qt/source (yes, even the binary packages
12731279
Once downloaded open the disk image and run the installer. Note you need admin
12741280
privileges to install.
12751281

1276-
Leopard note: Qt includes a couple non-framework libraries in /usr/lib.
1282+
Leopard+ note: Qt includes a couple non-framework libraries in /usr/lib.
12771283
When using a system SDK these libraries will not be found. To fix this problem,
12781284
add symlinks to /usr/local:
12791285

@@ -1296,7 +1302,7 @@ Binary installers are available for OS X, but they are not recommended
12961302
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
12971303
strange application). Instead, download the source.
12981304
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
1299-
Double-click the source tarball, then cd to the source folder and:
1305+
Double-click the source tarball to unpack it, then cd to the source folder and:
13001306

13011307
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
13021308
make -j [#cpus]
@@ -1347,9 +1353,9 @@ osgEarth), try bypassing ccache.
13471353

13481354
Download William Kyngesburye's excellent GDAL Complete package that includes
13491355
PROJ, GEOS, GDAL, SQLite3, Spatialite, and image libraries, as frameworks.
1350-
There is also a GSL framework.
1356+
There are also GSL and FreeType frameworks.
13511357

1352-
http://www.kyngchaos.com/wiki/software/frameworks
1358+
http://www.kyngchaos.com/software/frameworks
13531359

13541360
Once downloaded, open and install the frameworks.
13551361

@@ -1358,11 +1364,11 @@ support). QGIS just needs the libpq client library, so unless you want to
13581364
setup the full Postgres + PostGIS server, all you need is the client-only
13591365
package. It's available here:
13601366

1361-
http://www.kyngchaos.com/wiki/software/postgres
1367+
http://www.kyngchaos.com/software/postgres
13621368

13631369
Also available is a GRASS application:
13641370

1365-
http://www.kyngchaos.com/wiki/software/grass
1371+
http://www.kyngchaos.com/software/grass
13661372

13671373
Old versions of these packages for older systems are available in the
13681374
software archive section.
@@ -1387,7 +1393,7 @@ have problems and you are on your own with those.
13871393
=====================================
13881394

13891395
Snow Leopard+ note: Snow Leopard includes a usable expat, so this step is
1390-
not necessary on Snow Leopard or Lion.
1396+
not necessary on Snow Leopard or above.
13911397

13921398
Get the expat sources:
13931399

@@ -1420,7 +1426,7 @@ source folder and:
14201426
======================================
14211427

14221428
Leopard+ note: Starting with Leopard a usable Python is included
1423-
in the system. This Python 2.5, 2.6 and 2.7, respectively for Leo, Snow and Lion.
1429+
in the system. This is Python 2.5, 2.6 and 2.7, respectively for Leo, Snow and Lion+.
14241430
So there is no need to install Python on Leopard and newer.
14251431
You can still install Python from python.org if preferred.
14261432

@@ -1475,11 +1481,10 @@ For 64-bit Qt (Qt Cocoa), use this configure line:
14751481
python2.6 configure.py -n -d /Library/Python/2.6/site-packages -b /usr/local/bin \
14761482
-e /usr/local/include -v /usr/local/share/sip --arch=x86_64 -s MacOSX10.6.sdk
14771483

1478-
Lion system Python
1484+
Lion+ system Python
14791485

14801486
Similar to Snow Leopard, you should install outside the system Python path.
1481-
There is no need for the SDK option (the CLI tools for Lion don't include SDKs)
1482-
or arch option:
1487+
There is no need for the SDK option or arch option:
14831488

14841489
python2.7 configure.py -d /Library/Python/2.7/site-packages -b /usr/local/bin \
14851490
-e /usr/local/include -v /usr/local/share/sip
@@ -1519,14 +1524,14 @@ Edit QScintilla-gpl-2.x.x/Qt4Qt5/qscintilla.pro in the following manner:
15191524
target.path = $$[QT_INSTALL_LIBS] --> target.path = /usr/local/lib
15201525
header.path = $$[QT_INSTALL_HEADERS] --> header.path = /usr/local/include
15211526

1522-
Save the qscintilla.pro file and build the QScintilla2 C++ library:
1527+
Save the qscintilla.pro file and build the QScintilla2 C++ library (adjust the install_name_tool command for the version installed):
15231528

15241529
qmake -spec macx-g++ qscintilla.pro
15251530
make -j [#cpus]
15261531
sudo make install
15271532

1528-
sudo install_name_tool -id /usr/local/lib/libqscintilla2.8.dylib \
1529-
/usr/local/lib/libqscintilla2.8.dylib
1533+
sudo install_name_tool -id /usr/local/lib/libqscintilla2.9.dylib \
1534+
/usr/local/lib/libqscintilla2.9.dylib
15301535

15311536
This installs QScintilla2's dylib in /usr/local/lib/ and the header files in
15321537
/usr/local/include/Qsci/, both of which should be automatically found when
@@ -1585,7 +1590,7 @@ For 64-bit Qt (Qt Cocoa), use this configure line:
15851590

15861591
python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64
15871592

1588-
Lion system Python
1593+
Lion and Mt. Lion system Python
15891594

15901595
Similar to Snow Leopard, you should install outside the system Python path.
15911596
But you don't need the arch option:
@@ -1606,12 +1611,16 @@ Then make again.
16061611
=========================================================
16071612

16081613
This will create the Qsci.so module in /Library/Python/2.x/site-packages/PyQt4.
1614+
Like PyQt, it needs help to not install in system locations.
16091615

16101616
Snow Leopard: substitute '2.6' for Python version
16111617

16121618
cd <QScintilla2 source dir>
16131619
cd Python
1614-
python2.7 configure.py -o /usr/local/lib -n /usr/local/include
1620+
python2.7 configure.py -o /usr/local/lib -n /usr/local/include \
1621+
-d /Library/Python/2.7/site-packages/PyQt4 -v /usr/local/share/sip/PyQt4 \
1622+
--pyqt-sipdir=/usr/local/share/sip/PyQt4
1623+
qmake -spec macx-g++ Qsci.pro
16151624
make -j [#cpus]
16161625
sudo make install
16171626

@@ -1651,7 +1660,26 @@ Qwt 6.x.x is similarly built, but defaults to being installed as a framework:
16511660
qmake -spec macx-g++
16521661
make -j [#cpus]
16531662
sudo make install
1654-
1663+
1664+
TODO: Remedy for :
1665+
1666+
shrub:qwt-6.1-rc3 timlinux$ sudo make install
1667+
Password:
1668+
cd src/ && make -f Makefile install
1669+
rm -f -r "/usr/local/qwt-6.1.0-rc3/lib/qwt.framework"
1670+
cp -f -R "../lib/qwt.framework" "/usr/local/qwt-6.1.0-rc3/lib/qwt.framework"
1671+
cp -f -R /Users/timlinux/dev/cpp/qwt-6.1-rc3/doc/html /usr/local/qwt-6.1.0-rc3/doc/
1672+
cp -f -R /Users/timlinux/dev/cpp/qwt-6.1-rc3/doc/man /usr/local/qwt-6.1.0-rc3/doc/
1673+
cd textengines/ && make -f Makefile install
1674+
make[1]: Nothing to be done for `install'.
1675+
cd designer/ && make -f Makefile install
1676+
rm -f libqwt_designer_plugin.dylib
1677+
linking plugins/designer/libqwt_designer_plugin.dylib
1678+
ld: library not found for -lqwt
1679+
collect2: ld returned 1 exit status
1680+
make[1]: *** [plugins/designer/libqwt_designer_plugin.dylib] Error 1
1681+
make: *** [sub-designer-install_subtargets-ordered] Error 2
1682+
16551683
sudo install_name_tool -id /usr/local/qwt-6.0.1/lib/qwt.framework/Versions/6/qwt \
16561684
/usr/local/qwt-6.0.1/lib/qwt.framework/Versions/6/qwt
16571685

@@ -1713,14 +1741,8 @@ tarball to unpack it, then cd to the source folder and:
17131741

17141742
If you want the Globe plugin in QGIS (default OFF), OSG and osgEarth are needed.
17151743

1716-
First, OpenSceneGraph. The main site is:
1717-
1718-
http://www.openscenegraph.org/
1719-
1720-
Get the tarball (or zip) for the the latest 3.x version.
1721-
Binary availability is unknown at this time as the site is down.
1722-
1723-
Another place to get the source is github:
1744+
First, OpenSceneGraph. The main site is very out of date, just go to
1745+
github:
17241746

17251747
http://github.com/openscenegraph/osg/tags
17261748

@@ -1734,13 +1756,39 @@ temporary location first. You could stage it to the folder that the OSG source
17341756
folder is in, or a common staging area like /Users/Shared/unix/osg. Pick a
17351757
folder not hidden and that doesn't need admin permissions to write to for simplicity.
17361758

1759+
If you are building on Leopard, its configure forces a old ppc/i386 32bit build.
1760+
If you want 64bit you need to fix CMakeLists.txt - in a text editor, find the
1761+
if-block that starts with:
1762+
1763+
ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.6" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.5")
1764+
1765+
In that section before the next ELSEIF, change:
1766+
1767+
ppc;i386
1768+
1769+
to:
1770+
1771+
i386;x86_64
1772+
1773+
and change:
1774+
1775+
mmacosx-version-min=10.5
1776+
1777+
to:
1778+
1779+
mmacosx-version-min=10.6
1780+
17371781
In a new Terminal cd to the source folder and:
17381782

17391783
mkdir build
17401784
cd build
17411785
cmake -D CMAKE_INSTALL_PREFIX=/path/to/some/staging/folder \
17421786
-D OSG_COMPILE_FRAMEWORKS=ON \
17431787
-D OSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS=OFF \
1788+
-D JASPER_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
1789+
-D JASPER_INCLUDE_DIR=/Library/Frameworks/UnixImageIO.framework/Headers \
1790+
-D TIFF_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
1791+
-D TIFF_INCLUDE_DIR=/Library/Frameworks/UnixImageIO.framework/Headers \
17441792
..
17451793
make
17461794
make install
@@ -1750,7 +1798,7 @@ Enter the staging path you chose for the CMAKE_INSTALL_PREFIX option above.
17501798

17511799
Now move all .frameworks from the lib/ folder in the staging area to /Library/Frameworks. Move the files in the osgPlugins folder in the lib/ folder
17521800
to /Library/Application Support/OpenSceneGraph/PlugIns. The bin/ executables
1753-
can be left where they are, we don't need them.
1801+
can be left where they are.
17541802

17551803
Next up is libzip. Get the latest tarball at:
17561804

‎doc/INSTALL.html

Lines changed: 112 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
66
<TITLE>Quantum GIS (QGIS)</TITLE>
77

8-
<!-- Included /home/fischer/src/qgis/doc/style.css -->
8+
<!-- Included style.css -->
99
<STYLE TYPE="text/css">
1010
body{ background: white;
1111
color: black;
@@ -77,13 +77,13 @@
7777
<DIV CLASS="header" ID="header">
7878
<H1>Quantum GIS (QGIS)</H1>
7979
<H2>Building QGIS from source - step by step</H2>
80-
<H3>Friday January 04, 2013</H3>
80+
<H3>Monday April 01, 2013</H3>
8181
</DIV>
8282

8383
<DIV CLASS="body" ID="body">
8484
<P>
85-
Last Updated: Friday January 04, 2013
86-
Last Change : Friday January 04, 2013
85+
Last Updated: Monday April 01, 2013
86+
Last Change : Saturday December 08, 2012
8787
</P>
8888
<DIV CLASS="toc">
8989

@@ -1021,8 +1021,9 @@ <H3>4.1.3. Setting up the Visual Studio project with CMake</H3>
10211021
created.
10221022
</P>
10231023
<P>
1024-
Adjust the path to bison and flex so that the shortened <CODE>C:/Progra~1</CODE> is used
1025-
rather than <CODE>C:/Program Files</CODE>.
1024+
If the path to bison and flex contains blanks, you need to use the short name
1025+
for the directory (i.e. <CODE>C:\Program Files</CODE> should be rewritten to
1026+
<CODE>C:\Progra~n</CODE>, where <CODE>n</CODE> is the number as shown in `dir /x C:\``).
10261027
</P>
10271028
<P>
10281029
Verify that the 'BINDINGS_GLOBAL_INSTALL' option is not checked, so that python
@@ -1746,7 +1747,11 @@ <H2>5.1. Install Developer Tools</H2>
17461747
of Xcode, regardless of using a separate DMG installer for just the tools.
17471748
</P>
17481749
<P>
1749-
Xcode 4.4+ also introduces the clang frontend to the LLVM compiler as default.
1750+
Xcode 4.3+ also introduces the clang frontend to the LLVM compiler as default.
1751+
</P>
1752+
<P>
1753+
<B>Note:</B> In XCODE 4.5 installed from the app store, you need to install the
1754+
command line tools from XCode -&gt; Preferences -&gt; Downloads and choose command line tools.
17501755
</P>
17511756
<P>
17521757
<A HREF="http://clang.llvm.org/">http://clang.llvm.org/</A>
@@ -1771,7 +1776,7 @@ <H2>5.1. Install Developer Tools</H2>
17711776
<H2>5.2. Install Qt4 from disk image</H2>
17721777

17731778
<P>
1774-
You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need
1779+
You need a minimum of Qt-4.4.0. I suggest getting the latest (Qt 4, not 5). There is no need
17751780
for the full Qt SDK, so save yourself some download time and get the frameworks
17761781
only. This is available in the Libraries section of the Qt download page.
17771782
</P>
@@ -1782,18 +1787,20 @@ <H2>5.2. Install Qt4 from disk image</H2>
17821787
as of Qt-4.5.2, though they stopped making Carbon packages at Qt 4.7.4.
17831788
Qt 4.6+ is recommended for Cocoa.
17841789
Starting with Lion, Carbon may not work properly, if at all.
1790+
Starting with Qt 4.8, only 64bit Cocoa installers are available.
17851791
</P>
17861792
<P>
1787-
<U>Mt. Lion note:</U> Any Qt version &lt; 4.8.3 will cause a 'This version of Mac OS X
1788-
is unsupported' error when building QGIS.
1793+
<U>General note:</U> Support for new system versions in any given Qt version may
1794+
not be present and may cause a 'This version of Mac OS X
1795+
is unsupported' error when building QGIS. Try the next Qt version.
17891796
</P>
17901797
<P>
17911798
<U>PPC note:</U> The readymade Qt Cocoa installers don't include PPC support, you'd
17921799
have to compile Qt yourself. But, there appear to be issues with Qt Cocoa on
17931800
PPC Macs anyways. Qt Carbon is recommended on PPC Macs.
17941801
</P>
17951802
<P>
1796-
<A HREF="http://qt.nokia.com/downloads">http://qt.nokia.com/downloads</A>
1803+
<A HREF="http://qt-project.org/downloads">http://qt-project.org/downloads</A>
17971804
</P>
17981805
<P>
17991806
If you want debug frameworks, Qt also provides a separate download with these.
@@ -1809,7 +1816,7 @@ <H2>5.2. Install Qt4 from disk image</H2>
18091816
privileges to install.
18101817
</P>
18111818
<P>
1812-
<U>Leopard note:</U> Qt includes a couple non-framework libraries in /usr/lib.
1819+
<U>Leopard+ note:</U> Qt includes a couple non-framework libraries in /usr/lib.
18131820
When using a system SDK these libraries will not be found. To fix this problem,
18141821
add symlinks to /usr/local:
18151822
</P>
@@ -1839,7 +1846,7 @@ <H2>5.3. Install CMake for OSX</H2>
18391846
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
18401847
strange application). Instead, download the source.
18411848
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
1842-
Double-click the source tarball, then cd to the source folder and:
1849+
Double-click the source tarball to unpack it, then cd to the source folder and:
18431850
</P>
18441851

18451852
<div class="code"><PRE>
@@ -1908,10 +1915,10 @@ <H2>5.4. Install development frameworks for QGIS dependencies</H2>
19081915
<P>
19091916
Download William Kyngesburye's excellent GDAL Complete package that includes
19101917
PROJ, GEOS, GDAL, SQLite3, Spatialite, and image libraries, as frameworks.
1911-
There is also a GSL framework.
1918+
There are also GSL and FreeType frameworks.
19121919
</P>
19131920
<P>
1914-
<A HREF="http://www.kyngchaos.com/wiki/software/frameworks">http://www.kyngchaos.com/wiki/software/frameworks</A>
1921+
<A HREF="http://www.kyngchaos.com/software/frameworks">http://www.kyngchaos.com/software/frameworks</A>
19151922
</P>
19161923
<P>
19171924
Once downloaded, open and install the frameworks.
@@ -1923,13 +1930,13 @@ <H2>5.4. Install development frameworks for QGIS dependencies</H2>
19231930
package. It's available here:
19241931
</P>
19251932
<P>
1926-
<A HREF="http://www.kyngchaos.com/wiki/software/postgres">http://www.kyngchaos.com/wiki/software/postgres</A>
1933+
<A HREF="http://www.kyngchaos.com/software/postgres">http://www.kyngchaos.com/software/postgres</A>
19271934
</P>
19281935
<P>
19291936
Also available is a GRASS application:
19301937
</P>
19311938
<P>
1932-
<A HREF="http://www.kyngchaos.com/wiki/software/grass">http://www.kyngchaos.com/wiki/software/grass</A>
1939+
<A HREF="http://www.kyngchaos.com/software/grass">http://www.kyngchaos.com/software/grass</A>
19331940
</P>
19341941
<P>
19351942
Old versions of these packages for older systems are available in the
@@ -1956,7 +1963,7 @@ <H3>5.4.2. Additional dependencies: Expat</H3>
19561963

19571964
<P>
19581965
<U>Snow Leopard+ note:</U> Snow Leopard includes a usable expat, so this step is
1959-
not necessary on Snow Leopard or Lion.
1966+
not necessary on Snow Leopard or above.
19601967
</P>
19611968
<P>
19621969
Get the expat sources:
@@ -1998,7 +2005,7 @@ <H3>5.4.4. Additional dependencies: Python</H3>
19982005

19992006
<P>
20002007
<U>Leopard+ note:</U> Starting with Leopard a usable Python is included
2001-
in the system. This Python 2.5, 2.6 and 2.7, respectively for Leo, Snow and Lion.
2008+
in the system. This is Python 2.5, 2.6 and 2.7, respectively for Leo, Snow and Lion+.
20022009
So there is no need to install Python on Leopard and newer.
20032010
You can still install Python from python.org if preferred.
20042011
</P>
@@ -2078,12 +2085,11 @@ <H3>5.4.5. Additional dependencies: SIP</H3>
20782085
</PRE></div>
20792086

20802087
<P>
2081-
<U>Lion system Python</U>
2088+
<U>Lion+ system Python</U>
20822089
</P>
20832090
<P>
20842091
Similar to Snow Leopard, you should install outside the system Python path.
2085-
There is no need for the SDK option (the CLI tools for Lion don't include SDKs)
2086-
or arch option:
2092+
There is no need for the SDK option or arch option:
20872093
</P>
20882094

20892095
<div class="code"><PRE>
@@ -2142,16 +2148,16 @@ <H3>5.4.6. Additional dependencies: QScintilla2</H3>
21422148
</PRE></div>
21432149

21442150
<P>
2145-
Save the qscintilla.pro file and build the QScintilla2 C++ library:
2151+
Save the qscintilla.pro file and build the QScintilla2 C++ library (adjust the install_name_tool command for the version installed):
21462152
</P>
21472153

21482154
<div class="code"><PRE>
21492155
qmake -spec macx-g++ qscintilla.pro
21502156
make -j [#cpus]
21512157
sudo make install
21522158

2153-
sudo install_name_tool -id /usr/local/lib/libqscintilla2.8.dylib \
2154-
/usr/local/lib/libqscintilla2.8.dylib
2159+
sudo install_name_tool -id /usr/local/lib/libqscintilla2.9.dylib \
2160+
/usr/local/lib/libqscintilla2.9.dylib
21552161
</PRE></div>
21562162

21572163
<P>
@@ -2238,7 +2244,7 @@ <H3>5.4.7. Additional dependencies: PyQt</H3>
22382244
</PRE></div>
22392245

22402246
<P>
2241-
<U>Lion system Python</U>
2247+
<U>Lion and Mt. Lion system Python</U>
22422248
</P>
22432249
<P>
22442250
Similar to Snow Leopard, you should install outside the system Python path.
@@ -2268,6 +2274,7 @@ <H3>5.4.8. Additional dependencies: QScintilla2 Python Module</H3>
22682274

22692275
<P>
22702276
This will create the Qsci.so module in /Library/Python/2.x/site-packages/PyQt4.
2277+
Like PyQt, it needs help to not install in system locations.
22712278
</P>
22722279
<P>
22732280
<U>Snow Leopard:</U> substitute '2.6' for Python version
@@ -2276,7 +2283,10 @@ <H3>5.4.8. Additional dependencies: QScintilla2 Python Module</H3>
22762283
<div class="code"><PRE>
22772284
cd &lt;QScintilla2 source dir&gt;
22782285
cd Python
2279-
python2.7 configure.py -o /usr/local/lib -n /usr/local/include
2286+
python2.7 configure.py -o /usr/local/lib -n /usr/local/include \
2287+
-d /Library/Python/2.7/site-packages/PyQt4 -v /usr/local/share/sip/PyQt4 \
2288+
--pyqt-sipdir=/usr/local/share/sip/PyQt4
2289+
qmake -spec macx-g++ Qsci.pro
22802290
make -j [#cpus]
22812291
sudo make install
22822292
</PRE></div>
@@ -2330,7 +2340,32 @@ <H3>5.4.9. Additional dependencies: Qwt</H3>
23302340
qmake -spec macx-g++
23312341
make -j [#cpus]
23322342
sudo make install
2343+
</PRE></div>
2344+
2345+
<P>
2346+
<B>TODO:</B> Remedy for :
2347+
</P>
23332348

2349+
<div class="code"><PRE>
2350+
shrub:qwt-6.1-rc3 timlinux$ sudo make install
2351+
Password:
2352+
cd src/ &amp;&amp; make -f Makefile install
2353+
rm -f -r "/usr/local/qwt-6.1.0-rc3/lib/qwt.framework"
2354+
cp -f -R "../lib/qwt.framework" "/usr/local/qwt-6.1.0-rc3/lib/qwt.framework"
2355+
cp -f -R /Users/timlinux/dev/cpp/qwt-6.1-rc3/doc/html /usr/local/qwt-6.1.0-rc3/doc/
2356+
cp -f -R /Users/timlinux/dev/cpp/qwt-6.1-rc3/doc/man /usr/local/qwt-6.1.0-rc3/doc/
2357+
cd textengines/ &amp;&amp; make -f Makefile install
2358+
make[1]: Nothing to be done for `install'.
2359+
cd designer/ &amp;&amp; make -f Makefile install
2360+
rm -f libqwt_designer_plugin.dylib
2361+
linking plugins/designer/libqwt_designer_plugin.dylib
2362+
ld: library not found for -lqwt
2363+
collect2: ld returned 1 exit status
2364+
make[1]: *** [plugins/designer/libqwt_designer_plugin.dylib] Error 1
2365+
make: *** [sub-designer-install_subtargets-ordered] Error 2
2366+
</PRE></div>
2367+
2368+
<div class="code"><PRE>
23342369
sudo install_name_tool -id /usr/local/qwt-6.0.1/lib/qwt.framework/Versions/6/qwt \
23352370
/usr/local/qwt-6.0.1/lib/qwt.framework/Versions/6/qwt
23362371
</PRE></div>
@@ -2409,17 +2444,8 @@ <H3>5.4.13. Optional dependencies: OSG &amp; osgEarth</H3>
24092444
If you want the Globe plugin in QGIS (default OFF), OSG and osgEarth are needed.
24102445
</P>
24112446
<P>
2412-
First, <B>OpenSceneGraph</B>. The main site is:
2413-
</P>
2414-
<P>
2415-
<A HREF="http://www.openscenegraph.org/">http://www.openscenegraph.org/</A>
2416-
</P>
2417-
<P>
2418-
Get the tarball (or zip) for the the latest 3.x version.
2419-
Binary availability is unknown at this time as the site is down.
2420-
</P>
2421-
<P>
2422-
Another place to get the source is github:
2447+
First, <B>OpenSceneGraph</B>. The main site is very out of date, just go to
2448+
github:
24232449
</P>
24242450
<P>
24252451
<A HREF="http://github.com/openscenegraph/osg/tags">http://github.com/openscenegraph/osg/tags</A>
@@ -2436,6 +2462,48 @@ <H3>5.4.13. Optional dependencies: OSG &amp; osgEarth</H3>
24362462
folder is in, or a common staging area like /Users/Shared/unix/osg. Pick a
24372463
folder not hidden and that doesn't need admin permissions to write to for simplicity.
24382464
</P>
2465+
<P>
2466+
If you are building on Leopard, its configure forces a old ppc/i386 32bit build.
2467+
If you want 64bit you need to fix CMakeLists.txt - in a text editor, find the
2468+
if-block that starts with:
2469+
</P>
2470+
2471+
<div class="code"><PRE>
2472+
ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.6" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.5")
2473+
</PRE></div>
2474+
2475+
<P>
2476+
In that section before the next ELSEIF, change:
2477+
</P>
2478+
2479+
<div class="code"><PRE>
2480+
ppc;i386
2481+
</PRE></div>
2482+
2483+
<P>
2484+
to:
2485+
</P>
2486+
2487+
<div class="code"><PRE>
2488+
i386;x86_64
2489+
</PRE></div>
2490+
2491+
<P>
2492+
and change:
2493+
</P>
2494+
2495+
<div class="code"><PRE>
2496+
mmacosx-version-min=10.5
2497+
</PRE></div>
2498+
2499+
<P>
2500+
to:
2501+
</P>
2502+
2503+
<div class="code"><PRE>
2504+
mmacosx-version-min=10.6
2505+
</PRE></div>
2506+
24392507
<P>
24402508
In a new Terminal cd to the source folder and:
24412509
</P>
@@ -2446,6 +2514,10 @@ <H3>5.4.13. Optional dependencies: OSG &amp; osgEarth</H3>
24462514
cmake -D CMAKE_INSTALL_PREFIX=/path/to/some/staging/folder \
24472515
-D OSG_COMPILE_FRAMEWORKS=ON \
24482516
-D OSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS=OFF \
2517+
-D JASPER_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
2518+
-D JASPER_INCLUDE_DIR=/Library/Frameworks/UnixImageIO.framework/Headers \
2519+
-D TIFF_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
2520+
-D TIFF_INCLUDE_DIR=/Library/Frameworks/UnixImageIO.framework/Headers \
24492521
..
24502522
make
24512523
make install
@@ -2458,7 +2530,7 @@ <H3>5.4.13. Optional dependencies: OSG &amp; osgEarth</H3>
24582530
<P>
24592531
Now move all .frameworks from the lib/ folder in the staging area to /Library/Frameworks. Move the files in the osgPlugins folder in the lib/ folder
24602532
to /Library/Application Support/OpenSceneGraph/PlugIns. The bin/ executables
2461-
can be left where they are, we don't need them.
2533+
can be left where they are.
24622534
</P>
24632535
<P>
24642536
Next up is <B>libzip</B>. Get the latest tarball at:
@@ -3164,5 +3236,5 @@ <H1>9. Authors and Acknowledgments</H1>
31643236

31653237
</DIV>
31663238
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
3167-
<!-- cmdline: txt2tags -odoc/INSTALL.html -t html doc/INSTALL.t2t -->
3239+
<!-- cmdline: txt2tags -t html -o INSTALL.html INSTALL.t2t -->
31683240
</BODY></HTML>

‎doc/osx.t2t

Lines changed: 64 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
= Building on MacOS X =
23

34
In this approach I will try to avoid as much as possible building dependencies
@@ -74,7 +75,7 @@ On Lion and Mt. Lion, using Xcode 4.4+, the developer command line tools can be
7475
installed via the Xcode preferences. The tools now appear to require an install
7576
of Xcode, regardless of using a separate DMG installer for just the tools.
7677

77-
Xcode 4.4+ also introduces the clang frontend to the LLVM compiler as default.
78+
Xcode 4.3+ also introduces the clang frontend to the LLVM compiler as default.
7879

7980
**Note:** In XCODE 4.5 installed from the app store, you need to install the
8081
command line tools from XCode -> Preferences -> Downloads and choose command line tools.
@@ -95,7 +96,7 @@ If you have trouble building some of the dependencies listed below with clang
9596

9697
== Install Qt4 from disk image ==
9798

98-
You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need
99+
You need a minimum of Qt-4.4.0. I suggest getting the latest (Qt 4, not 5). There is no need
99100
for the full Qt SDK, so save yourself some download time and get the frameworks
100101
only. This is available in the Libraries section of the Qt download page.
101102

@@ -105,9 +106,11 @@ support in the Qt Cocoa branch. Appropriate installers are available for both
105106
as of Qt-4.5.2, though they stopped making Carbon packages at Qt 4.7.4.
106107
Qt 4.6+ is recommended for Cocoa.
107108
Starting with Lion, Carbon may not work properly, if at all.
109+
Starting with Qt 4.8, only 64bit Cocoa installers are available.
108110

109-
__Mt. Lion note:__ Any Qt version < 4.8.3 will cause a 'This version of Mac OS X
110-
is unsupported' error when building QGIS.
111+
__General note:__ Support for new system versions in any given Qt version may
112+
not be present and may cause a 'This version of Mac OS X
113+
is unsupported' error when building QGIS. Try the next Qt version.
111114

112115
__PPC note:__ The readymade Qt Cocoa installers don't include PPC support, you'd
113116
have to compile Qt yourself. But, there appear to be issues with Qt Cocoa on
@@ -125,7 +128,7 @@ of the download page. Files are in the qt/source (yes, even the binary packages
125128
Once downloaded open the disk image and run the installer. Note you need admin
126129
privileges to install.
127130

128-
__Leopard note:__ Qt includes a couple non-framework libraries in /usr/lib.
131+
__Leopard+ note:__ Qt includes a couple non-framework libraries in /usr/lib.
129132
When using a system SDK these libraries will not be found. To fix this problem,
130133
add symlinks to /usr/local:
131134

@@ -149,7 +152,7 @@ Binary installers are available for OS X, but they are not recommended
149152
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
150153
strange application). Instead, download the source.
151154
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
152-
Double-click the source tarball, then cd to the source folder and:
155+
Double-click the source tarball to unpack it, then cd to the source folder and:
153156

154157
```
155158
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
@@ -204,9 +207,9 @@ osgEarth), try bypassing ccache.
204207

205208
Download William Kyngesburye's excellent GDAL Complete package that includes
206209
PROJ, GEOS, GDAL, SQLite3, Spatialite, and image libraries, as frameworks.
207-
There is also a GSL framework.
210+
There are also GSL and FreeType frameworks.
208211

209-
http://www.kyngchaos.com/wiki/software/frameworks
212+
http://www.kyngchaos.com/software/frameworks
210213

211214
Once downloaded, open and install the frameworks.
212215

@@ -215,11 +218,11 @@ support). QGIS just needs the libpq client library, so unless you want to
215218
setup the full Postgres + PostGIS server, all you need is the client-only
216219
package. It's available here:
217220

218-
http://www.kyngchaos.com/wiki/software/postgres
221+
http://www.kyngchaos.com/software/postgres
219222

220223
Also available is a GRASS application:
221224

222-
http://www.kyngchaos.com/wiki/software/grass
225+
http://www.kyngchaos.com/software/grass
223226

224227
Old versions of these packages for older systems are available in the
225228
software archive section.
@@ -240,7 +243,7 @@ have problems and you are on your own with those.
240243
=== Additional dependencies: Expat ===
241244

242245
__Snow Leopard+ note:__ Snow Leopard includes a usable expat, so this step is
243-
not necessary on Snow Leopard or Lion.
246+
not necessary on Snow Leopard or above.
244247

245248
Get the expat sources:
246249

@@ -273,7 +276,7 @@ sudo make install
273276
=== Additional dependencies: Python ===
274277

275278
__Leopard+ note:__ Starting with Leopard a usable Python is included
276-
in the system. This Python 2.5, 2.6 and 2.7, respectively for Leo, Snow and Lion.
279+
in the system. This is Python 2.5, 2.6 and 2.7, respectively for Leo, Snow and Lion+.
277280
So there is no need to install Python on Leopard and newer.
278281
You can still install Python from python.org if preferred.
279282

@@ -334,11 +337,10 @@ python2.6 configure.py -n -d /Library/Python/2.6/site-packages -b /usr/local/bin
334337
-e /usr/local/include -v /usr/local/share/sip --arch=x86_64 -s MacOSX10.6.sdk
335338
```
336339

337-
__Lion system Python__
340+
__Lion+ system Python__
338341

339342
Similar to Snow Leopard, you should install outside the system Python path.
340-
There is no need for the SDK option (the CLI tools for Lion don't include SDKs)
341-
or arch option:
343+
There is no need for the SDK option or arch option:
342344

343345
```
344346
python2.7 configure.py -d /Library/Python/2.7/site-packages -b /usr/local/bin \
@@ -383,15 +385,15 @@ current line --> new line
383385
target.path = $$[QT_INSTALL_LIBS] --> target.path = /usr/local/lib
384386
header.path = $$[QT_INSTALL_HEADERS] --> header.path = /usr/local/include
385387
```
386-
Save the qscintilla.pro file and build the QScintilla2 C++ library:
388+
Save the qscintilla.pro file and build the QScintilla2 C++ library (adjust the install_name_tool command for the version installed):
387389

388390
```
389391
qmake -spec macx-g++ qscintilla.pro
390392
make -j [#cpus]
391393
sudo make install
392394

393-
sudo install_name_tool -id /usr/local/lib/libqscintilla2.8.dylib \
394-
/usr/local/lib/libqscintilla2.8.dylib
395+
sudo install_name_tool -id /usr/local/lib/libqscintilla2.9.dylib \
396+
/usr/local/lib/libqscintilla2.9.dylib
395397
```
396398
This installs QScintilla2's dylib in /usr/local/lib/ and the header files in
397399
/usr/local/include/Qsci/, both of which should be automatically found when
@@ -479,13 +481,17 @@ Then make again.
479481
=== Additional dependencies: QScintilla2 Python Module ===
480482

481483
This will create the Qsci.so module in /Library/Python/2.x/site-packages/PyQt4.
484+
Like PyQt, it needs help to not install in system locations.
482485

483486
__Snow Leopard:__ substitute '2.6' for Python version
484487

485488
```
486489
cd <QScintilla2 source dir>
487490
cd Python
488-
python2.7 configure.py -o /usr/local/lib -n /usr/local/include
491+
python2.7 configure.py -o /usr/local/lib -n /usr/local/include \
492+
-d /Library/Python/2.7/site-packages/PyQt4 -v /usr/local/share/sip/PyQt4 \
493+
--pyqt-sipdir=/usr/local/share/sip/PyQt4
494+
qmake -spec macx-g++ Qsci.pro
489495
make -j [#cpus]
490496
sudo make install
491497
```
@@ -615,14 +621,8 @@ sudo make install
615621

616622
If you want the Globe plugin in QGIS (default OFF), OSG and osgEarth are needed.
617623

618-
First, **OpenSceneGraph**. The main site is:
619-
620-
http://www.openscenegraph.org/
621-
622-
Get the tarball (or zip) for the the latest 3.x version.
623-
Binary availability is unknown at this time as the site is down.
624-
625-
Another place to get the source is github:
624+
First, **OpenSceneGraph**. The main site is very out of date, just go to
625+
github:
626626

627627
http://github.com/openscenegraph/osg/tags
628628

@@ -636,6 +636,38 @@ temporary location first. You could stage it to the folder that the OSG source
636636
folder is in, or a common staging area like /Users/Shared/unix/osg. Pick a
637637
folder not hidden and that doesn't need admin permissions to write to for simplicity.
638638

639+
If you are building on Leopard, its configure forces a old ppc/i386 32bit build.
640+
If you want 64bit you need to fix CMakeLists.txt - in a text editor, find the
641+
if-block that starts with:
642+
643+
```
644+
ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.6" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.5")
645+
```
646+
647+
In that section before the next ELSEIF, change:
648+
649+
```
650+
ppc;i386
651+
```
652+
653+
to:
654+
655+
```
656+
i386;x86_64
657+
```
658+
659+
and change:
660+
661+
```
662+
mmacosx-version-min=10.5
663+
```
664+
665+
to:
666+
667+
```
668+
mmacosx-version-min=10.6
669+
```
670+
639671
In a new Terminal cd to the source folder and:
640672

641673
```
@@ -644,6 +676,10 @@ cd build
644676
cmake -D CMAKE_INSTALL_PREFIX=/path/to/some/staging/folder \
645677
-D OSG_COMPILE_FRAMEWORKS=ON \
646678
-D OSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS=OFF \
679+
-D JASPER_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
680+
-D JASPER_INCLUDE_DIR=/Library/Frameworks/UnixImageIO.framework/Headers \
681+
-D TIFF_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
682+
-D TIFF_INCLUDE_DIR=/Library/Frameworks/UnixImageIO.framework/Headers \
647683
..
648684
make
649685
make install
@@ -654,7 +690,7 @@ Enter the staging path you chose for the CMAKE_INSTALL_PREFIX option above.
654690

655691
Now move all .frameworks from the lib/ folder in the staging area to /Library/Frameworks. Move the files in the osgPlugins folder in the lib/ folder
656692
to /Library/Application Support/OpenSceneGraph/PlugIns. The bin/ executables
657-
can be left where they are, we don't need them.
693+
can be left where they are.
658694

659695

660696
Next up is **libzip**. Get the latest tarball at:

0 commit comments

Comments
 (0)
Please sign in to comment.