[Qgis-developer] Building QGIS in Mac OS X (Mountain Lion i.e. 10.8) with QtSQL support
Larry Shaffer
larrys at dakotacarto.com
Sat Aug 4 20:11:28 PDT 2012
Hi,
Sorry to top post, but... I have not had any significant problems
following INSTALL to build master branch on Mt. Lion today. I have
just updated the Mac notes with some optional info on installing
ccache, and some cmake options for the external libspatialindex [0]. I
did not add any specific info about compiling on Mt. Lion to the
notes.
Here is, in broad steps, what I did:
* Updated fresh install Lion->Mt. Lion in Parallels virtual machine.
* Used kyngchaos.com installers for required (and some optional)
frameworks, etc. See below.
* Installed QGIS-1.8.0-2.dmg to verify. Seems to work fine.
* Installed XCode 4.4 and command line tools for 10.8 [1].
* Used Qt 4.8.2 open source binary libs, not SDK.
* Installed or compiled all dependent and optional software noted in
INSTALL, except Globe dependencies.
* Edited /Library/Frameworks/QtCore.framework/Versions/4/Headers/qglobal.h
to remove excessive warning notices of 'unsupported OS X version'
during compile [2]. This should be fixed with next version of Qt.
Note: Xcode.app now contains all dev directory structure, and you can
use xcrun to work with it, but I preferred to install the command line
tools. You will probably want to uninstall any previous XCode version
first. I used the .dmg installers downloaded from my Apple developer
account, instead of Mac App Store. Not sure if the command line tools
(115 MB dl) can be installed, and work, without installing Xcode.app
(1.8 GB dl), since I installed Xcode.app first.
The only issues I ran into were errors in kyngchaos Python module
installers [3]. The kyngchaos supporting installers for QGIS and
PostgreSQL/PostGIS worked fine. This is what I installed (in order):
GSL_Framework-1.15-2.dmg
GDAL_Complete-1.9_2012-06-29.dmg
GDAL-MrSID_Plugin-1.9.1-1.dmg
GDAL-GeoPDF_Plugin-1.9.1-2.dmg
GDAL-ECW_Plugin-1.9.0-1.dmg
FreeType_Framework-2.4.9-1.dmg
cairo_Framework-1.12.2-1.dmg
SciPy-0.9.0-2.dmg
GRASS-6.4.2-4-Snow.dmg
QGIS-1.8.0-2.dmg
PostgreSQL-9.1.4-1.dmg
PostGIS-2.0.1-1.dmg
Psycopg2-2.4.5-2.dmg
[0] https://github.com/qgis/Quantum-GIS/commit/ddd3b27e8646b7f7981c5196c6d35ceeb10c5e5e#L0L1269
[1] http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools
[2] https://dl.dropbox.com/u/4058089/qgis/qglobal.h_remove%40line327.txt
[3] https://dl.dropbox.com/u/4058089/qgis/py-mod-installer-errors.zip
Regards,
Larry
On Sat, Aug 4, 2012 at 2:42 PM, John C. Tull <jctull at gmail.com> wrote:
> I think you must have something else going wrong on your system. Perhaps your mixing too many different build systems. I use homebrew and it is fine for me on Mountain Lion. I don't have any more specific information for you, but you might see what 'brew doctor' tells you and take it to the homebrew mailing lists/forum.
>
> Regards,
> John
>
> On Aug 3, 2012, at 10:05 PM, Noli Sicad <nsicad at gmail.com> wrote:
>
>> SIP in not building Mountain Lion.
>>
>> I use homebrew as well, same problem.
>>
>> ########
>>
>> Nolis-MacBook-Pro:bin nsicad$ brew install sip
>> ==> Downloading http://www.riverbankcomputing.co.uk/hg/sip/archive/4.13.3.tar.gz
>> ######################################################################## 100.0%
>> ==> Patching
>> patching file build.py
>> Hunk #1 succeeded at 185 (offset 6 lines).
>> Hunk #2 succeeded at 198 (offset 6 lines).
>> patching file siputils.py
>> Hunk #1 succeeded at 1485 (offset 51 lines).
>> ==> python build.py prepare
>> ==> python configure.py --destdir=/usr/local/Cellar/sip/4.13.3/lib/python2.7/sit
>> ==> make install
>> cc -c -Os -w -pipe -march=native -Qunused-arguments
>> -mmacosx-version-min=10.8 -Os -w -DNDEBUG -I. -o main.o main.c
>> cc -c -Os -w -pipe -march=native -Qunused-arguments
>> -mmacosx-version-min=10.8 -Os -w -DNDEBUG -I. -o transform.o
>> transform.c
>> cc -c -Os -w -pipe -march=native -Qunused-arguments
>> -mmacosx-version-min=10.8 -Os -w -DNDEBUG -I. -o gencode.o gencode.c
>> cc -c -Os -w -pipe -march=native -Qunused-arguments
>> -mmacosx-version-min=10.8 -Os -w -DNDEBUG -I. -o extracts.o extracts.c
>> cc -c -Os -w -pipe -march=native -Qunused-arguments
>> -mmacosx-version-min=10.8 -Os -w -DNDEBUG -I. -o export.o export.c
>> cc -c -Os -w -pipe -march=native -Qunused-arguments
>> -mmacosx-version-min=10.8 -Os -w -DNDEBUG -I. -o heap.o heap.c
>> cc -c -Os -w -pipe -march=native -Qunused-arguments
>> -mmacosx-version-min=10.8 -Os -w -DNDEBUG -I. -o parser.o parser.c
>> cc -c -Os -w -pipe -march=native -Qunused-arguments
>> -mmacosx-version-min=10.8 -Os -w -DNDEBUG -I. -o lexer.o lexer.c
>> c++ -L/usr/local/lib -o sip main.o transform.o gencode.o extracts.o
>> export.o heap.o parser.o lexer.o
>> make[1]: c++: No such file or directory
>> make[1]: *** [sip] Error 1
>> make: *** [install] Error 2
>> ==> Build Environment
>> CPU: 8-core 64-bit dunno
>> OS X: 10.8-x86_64
>> Xcode: 4.5 => /Applications/Xcode45-DP2.app/Contents/Developer
>> X11: 2.7.2 @ /opt/X11
>> CC: /usr/bin/clang
>> CXX: /Applications/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
>> => /Applications/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
>> LD: /usr/bin/clang
>> CFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8
>> CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
>> -mmacosx-version-min=10.8
>> CPPFLAGS: -isystem /usr/local/include
>> LDFLAGS: -L/usr/local/lib
>> MACOSX_DEPLOYMENT_TARGET: 10.8
>> MAKEFLAGS: -j8
>> Error: Failed executing: make install (sip.rb:41)
>> These existing issues may help you:
>> https://github.com/mxcl/homebrew/issues/12388
>> https://github.com/mxcl/homebrew/issues/12491
>> Otherwise, this may help you fix or report the issue:
>> https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist
>>
>>
>> On 8/4/12, Noli Sicad <nsicad at gmail.com> wrote:
>>> Any suggestion of the better SIP and PyQt version that works with QGIS?
>>>
>>> Which SIP and PyQt version that works with QGIS?
>>>
>>> Noli
>>>
>>> On 8/4/12, William Kyngesburye <woklist at kyngchaos.com> wrote:
>>>> That's a problem to ask on the PyQt list.
>>>>
>>>> On Aug 3, 2012, at 10:45 PM, Noli Sicad wrote:
>>>>
>>>>> Cmake no problem now.
>>>>>
>>>>> Nolis-MacBook-Pro:~ nsicad$ which cmake
>>>>> /usr/local/bin/cmake
>>>>>
>>>>> #############
>>>>>
>>>>> Now, I got problem compiling SIP.
>>>>>
>>>>> ###############################
>>>>>
>>>>> Last login: Sat Aug 4 13:35:51 on ttys005
>>>>> Nolis-MacBook-Pro:sip-4.13.4-snapshot-5775580258b3 nsicad$ python2.7
>>>>> configure.py -d /Library/Python/2.7/site-packages -b /usr/local/bin -e
>>>>> /usr/local/include -v /usr/local/share/sip
>>>>> This is SIP 4.13.4-snapshot-5775580258b3 for Python 2.7.2 on darwin.
>>>>> The SIP code generator will be installed in /usr/local/bin.
>>>>> The sip module will be installed in /Library/Python/2.7/site-packages.
>>>>> The sip.h header file will be installed in /usr/local/include.
>>>>> The default directory to install .sip files in is /usr/local/share/sip.
>>>>> The platform/compiler configuration is macx-g++.
>>>>> Creating siplib/sip.h...
>>>>> Creating siplib/siplib.c...
>>>>> Creating siplib/siplib.sbf...
>>>>> Creating sipconfig.py...
>>>>> Creating top level Makefile...
>>>>> Creating sip code generator Makefile...
>>>>> Creating sip module Makefile...
>>>>> Nolis-MacBook-Pro:sip-4.13.4-snapshot-5775580258b3 nsicad$ make
>>>>> make[1]: Nothing to be done for `all'.
>>>>> cc -c -pipe -fPIC -Os -w -DNDEBUG -I.
>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
>>>>> -o siplib.o siplib.c
>>>>> cc -c -pipe -fPIC -Os -w -DNDEBUG -I.
>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
>>>>> -o apiversions.o apiversions.c
>>>>> cc -c -pipe -fPIC -Os -w -DNDEBUG -I.
>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
>>>>> -o descriptors.o descriptors.c
>>>>> cc -c -pipe -fPIC -Os -w -DNDEBUG -I.
>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
>>>>> -o qtlib.o qtlib.c
>>>>> cc -c -pipe -fPIC -Os -w -DNDEBUG -I.
>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
>>>>> -o threads.o threads.c
>>>>> cc -c -pipe -fPIC -Os -w -DNDEBUG -I.
>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
>>>>> -o objmap.o objmap.c
>>>>> cc -c -pipe -fPIC -Os -w -DNDEBUG -I.
>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
>>>>> -o voidptr.o voidptr.c
>>>>> c++ -c -pipe -fPIC -Os -w -DNDEBUG -I.
>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
>>>>> -o bool.o bool.cpp
>>>>> make[1]: c++: No such file or directory
>>>>> make[1]: *** [bool.o] Error 1
>>>>> make: *** [all] Error 2
>>>>> Nolis-MacBook-Pro:sip-4.13.4-snapshot-5775580258b3 nsicad$
>>>>>
>>>>> ###########
>>>>>
>>>>>
>>>>> Noli
>>>>
>>>> -----
>>>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>>>> http://www.kyngchaos.com/
>>>>
>>>> "Those people who most want to rule people are, ipso-facto, those least
>>>> suited to do it."
>>>>
>>>> - A rule of the universe, from the HitchHiker's Guide to the Galaxy
>>>>
>>>>
>>>>
>>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list