Changes between Initial Version and Version 1 of BuildingQtOnOSX


Ignore:
Timestamp:
Aug 26, 2009 2:25:58 PM (15 years ago)
Author:
ironstorm@gmail.com
Comment:

Initial Page for OSX build instructions

Legend:

Unmodified
Added
Removed
Modified
  • BuildingQtOnOSX

    v1 v1  
     1
     2See Also:
     3 * [BuildingQtOnLinux Building Qt Port on Linux]
     4 * [BuildingQtOnWindows Building on Qt Port Windows]
     5
     6These instructions assume you are building on an OSX system with Mac Ports installed having the qt4-mac (4.5.2) port installed.
     7
     8== Checkout the Code ==
     9You'll need to check out WebKit from SVN or Qt WebKit from Git
     10{{{
     11svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit # WebKit SVN Trunk
     12}}}
     13'''OR'''
     14{{{
     15git clone git://gitorious.org/qtwebkit/qtwebkit.git # Qt WebKit Git Branch
     16}}}
     17
     18== Building ==
     19
     20=== Workaround #1 ===
     21This works around the problem with Qt headers being reference directly from /usr/include regardless of where the QTDIR is (Fixes "''../../../WebKit/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h:26:17: error: QChar: No such file or directory''" errors):
     22{{{
     23export QTDIR=/opt/local/libexec/qt4-mac # mac ports Qt
     24cd /usr/include
     25for q in $QTDIR/include/*; do if [ ! -e "`basename $q`" ]; then sudo ln -s "$q"; fi ; done # create a symlink
     26}}}
     27
     28=== Workaround #2 ===
     29Next start the build:
     30{{{
     31export WEBKITSRCDIR=qtwebkit # change this to 'WebKit' to build WebKit SVN Trunk
     32export WEBKITOUTPUTDIR=`pwd`/${WEBKITSRCDIR}-build
     33${WEBKITSRCDIR}/WebKitTools/Scripts/build-webkit --qt --qmake=qmake-4.5 --makeargs="-j2" -spec macx-g++ --no-video --debug
     34}}}
     35
     36The build will ultimately fail with an error message "''Undefined symbols: "WebCore::CSSParser::lex()", referenced from: WebCore::CSSParser::lex(void*)in CSSParser.o''" when it attempts to link the binaries, to fix that we run the flex make target by hand and copy the result into the build output drectory: 
     37{{{
     38cd ${WEBKITSRCDIR}/WebCore
     39rm tokenizer.cpp
     40WebCore=. make -f DerivedSources.make tokenizer.cpp
     41mv tokenizer.cpp ${WEBKITOUTPUTDIR}/Debug/WebCore/generated/debug/tokenizer.cpp
     42}}}
     43
     44=== Finish Up and Run ===
     45Rerunning the build should recompile CSSParser.cpp and link correctly.
     46{{{
     47${WEBKITSRCDIR}/WebKitTools/Scripts/build-webkit --qt --qmake=qmake-4.5 --makeargs="-j2" -spec macx-g++ --no-video --debug
     48}}}
     49
     50Finally start the demo Qt browser:
     51{{{
     52${WEBKITSRCDIR}/WebKitTools/Scripts/run-launcher --qt --debug # After this, check the dock and you'll see Qt icon ...
     53}}}
     54
     55