Version 24 (modified by mkae (Marko Käning), 10 years ago) (diff) |
---|
-
Current status of setting up the CI system (still hanging on OSX up to now)
- Start with a fresh Mavericks/MacPorts install
- Getting a MacPorts-compatible bash environment
- Apple developer tools
- Tools already present on OSX
- Some more software supplied by MacPorts
- Basic setup of CI system
- 1st step: Qt5 build
- Installation of cmake
- Keeping build environment up-to-date
- Installation of other projects and KDE frameworks
Current status of setting up the CI system (still hanging on OSX up to now)
This page shall describe what has to be done to get a KDE/CI system up and running on OSX. Partially this is achieved by using a few port from MacPorts.
Start with a fresh Mavericks/MacPorts install
Currently using the official MacPorts version 2.3.0 is recommended. To be on the safe side make sure your disk has about 60G space in total.
However, currently a Mavericks 10.9.2 KDE/CI system on an i7-iMac uses something like this:
$ df -h / Filesystem Size Used Avail Use% Mounted on /dev/disk0s2 64G 33G 31G 52% /
that is after all frameworks have been built and installed as shown further down.
Getting a MacPorts-compatible bash environment
Install ports for MacPorts' bash
$ sudo port install bash bash-completion
and set up the bash environment for MacPorts use regarding search paths (PATH, MANPATH)
Apple developer tools
Install
- Xcode from AppStore (and agree actively to the developer license agreement)
- developer command line tools
$ xcode-select --install
Tools already present on OSX
Some tools are already installed on OSX due to Xcode (like git, svn, ssh, rsync, make, clang etc.) they don't need to be installed via MacPorts for now. Should a more up-to-date version of any one of these be necessary for the CI system it could be added later.
Some more software supplied by MacPorts
Install ports needed for the CI scripts:
$ sudo port install py27-lxml bazaar mercurial wget automake autoconf cppcheck shared-mime-info
Installing bazaar brings the also needed port gnutar into the system!
Basic setup of CI system
Create some folders, clone and update CI system (assuming a user "kdeci" with its home directory "/Users/kdeci"):
$ cd $ mkdir -p WC/KDECI-build; $ cd WC $ git clone git://anongit.kde.org/websites/build-kde-org $ cd build-kde-org $ git checkout production $ ./update-setup.sh # Ignore 404 occurring due to error cloning ECMA262 by hg
The update shell script created a folder ~/scripts
in which subsequent commands will have to be executed.
1st step: Qt5 build
Prepare environment for Qt5 build
Install additional ports specific for Qt5, set correct path to KDE-install directory in config/build/darwin-mavericks.cfg:
$ sudo port install dbus libmng libpng mysql55 pkgconfig sqlite2 tiff $ sudo port uninstall cmake # Remove MacPorts' cmake (which came into the system as build-dependency for mysql55) $ cd ~/scripts $ cat config/build/darwin-mavericks.cfg [DEFAULT] scriptsLocation=/Users/kdeci/scripts opSys=darwin architecture=mavericks compiler=clang [General] installPrefix=/opt/kde/install/%(opSys)s/%(architecture)s/%(compiler)s/ $ python2.7 tools/prepare-environment.py --project qt5 --branchGroup kf5-qt5 --platform darwin-mavericks --sources ~/WC/KDECI-build/qt5 ... $
Set up build environment for Qt5
Make sure all libs can be found by adding search paths and avoid inclusion of MacPorts' glib2:
$ cd ~/scripts; cat config/build/qt5/darwin-mavericks.cfg [Build] configureCommand=%(configureExecutable)s -release -system-zlib -system-libpng -system-libjpeg -system-sqlite -dbus -plugin-sql-mysql -nomake examples -confirm-license -opensource -prefix {instPrefix} -no-framework -v -I/opt/local/include -L/opt/local/lib -no-glib
Consider here the use of options "-debug -separate-debug-info
" instead of "-release
".
Include MySQL's binary path into PATH e.g. in .macports/profile
(assuming /opt/local as MacPort's prefix):
export PATH=/opt/local/lib/mysql55/bin:$PATH
Set up SSH for rsync access to build host, then start building Qt5:
$ cat ~/.ssh/config Host build.kde.org Port 2022 $ ssh-keygen -C YOUR@EMAIL.ADDRESS # <-- send your public SSH key to Ben Cooksley in order to get access to the build server $ python2.7 tools/perform-build.py --project qt5 --branchGroup kf5-qt5 --platform darwin-mavericks --sources ~/WC/KDECI-build/qt5 ...
Installation of cmake
Cmake needs a manual checkout of its sources:
$ python2.7 tools/prepare-environment.py --project cmake --branchGroup kf5-qt5 --platform darwin-mavericks --sources ~/WC/KDECI-build/cmake ... $ git clone git://cmake.org/cmake.git ~/WC/KDECI-build/cmake $ python2.7 tools/perform-build.py --project cmake --branchGroup kf5-qt5 --platform darwin-mavericks --sources ~/WC/KDECI-build/cmake ...
Keeping build environment up-to-date
In order to always have the latest KDE/CI running it makes sense to temporally stash away the changes made locally and upgrade via git
$ # Check what has changed locally: $ git diff diff --git a/config/build/darwin-mavericks.cfg b/config/build/darwin-mavericks.cfg index cb62c49..0648464 100644 --- a/config/build/darwin-mavericks.cfg +++ b/config/build/darwin-mavericks.cfg @@ -1,7 +1,8 @@ [DEFAULT] +scriptsLocation=/Users/kdeci/scripts opSys=darwin architecture=mavericks compiler=clang [General] -installPrefix=/opt/kde/install/%(opSys)s/%(architecture)s/%(compiler)s/ \ No newline at end of file +installPrefix=/opt/kde/install/%(opSys)s/%(architecture)s/%(compiler)s/ $ $ git status On branch production Your branch is up-to-date with 'origin/production'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: config/build/darwin-mavericks.cfg Untracked files: (use "git add <file>..." to include in what will be committed) build.sh dependencies/ kapidox/ kde_projects.xml poppler-test-data/ prepare.sh no changes added to commit (use "git add" and/or "git commit -a") $ $ # Updating CI scripts $ cd ~/scripts; git stash; git pull; git stash pop
Installation of other projects and KDE frameworks
The various frameworks have to be handled by replacing "PROJECT" with the framework's project name:
$ python2.7 tools/prepare-environment.py --project PROJECT --branchGroup kf5-qt5 --platform darwin-mavericks --sources ~/WC/KDECI-build/PROJECT ... $ python2.7 tools/perform-build.py --project PROJECT --branchGroup kf5-qt5 --platform darwin-mavericks --sources ~/WC/KDECI-build/PROJECT ...
or alternatively by using the {{{prepare.sh}}} and {{{build.sh}}} scripts from our MacPorts/KDE git repository
$ ./prepare.sh PROJECT ... $ ./build.sh PROJECT ...
where prepare.sh
takes care of creating the build directory if it is not yet existing. This is only needed when building a project manually, otherwise done by the jenkins slave.
KF5 builds have been successfully done so far for:
Additional cmake dependency: - extra-cmake-modules Tier1 frameworks (COMPLETE): - attica - kapidox - karchive - kcodecs - kconfig - kcoreaddons - kdbusaddons - kdnssd - { kglobalaccel } - kguiaddons - ki18n - kidletime - kimageformats - kitemmodels - kitemviews - kplotting - kwidgetsaddons - { kwindowsystem } - solid - sonnet - threadweaver Tier2 frameworks (IN THE WORKS): - kcrash - kdoctools - kjobwidgets - kpty - kunitconversion Tier3 frameworks (IN THE WORKS): - n/a Porting aids: - kjs
Problems currently appear for (mostly caused by the unavailable polkit-qt-1):
Tier2: - kauth (due to polkit-qt-1 dependency) - kcompletion (/Applications/KDE/kconfig_compiler_kf5.app/Contents/MacOS/kconfig_compiler_kf5 as location is wrong) Tier3: - kactivities - kbookmarks - kcmutils - kconfigwidgets - kdeclarative - kded - kdesignerplugin - kdesu - kdewebkit - kemoticons - kiconthemes - kinit - kio - kmediaplayer - knewstuff - knotifications - knotifyconfig - kparts - kservice (/Applications/KDE/kconfig_compiler_kf5.app/Contents/MacOS/kconfig_compiler_kf5 as location is wrong) - ktexteditor - ktextwidgets - kwallet - kxmlgui - { plasma } Porting aids: - kdelibs4support - khtml - kjsembed (kdoctools can't find its catalogs) - kmediaplayer - krunner - kross Other stuff: - polkit-qt-1 (still fails due to inability to find package Polkit - this is still Linux-specific and needs to be fixed for use on OSX):
Curly brackets in the above lists mark frameworks not needed on MacOSX, since plasma won't be running for now.
Having the very compact Gentoo's Project:KDE/Frameworks wiki page around turned out to be very helpful while building the above KDE frameworks manually. More info is found on KDE's official API page.