All posts by Christoph Cullmann

Dr.-Ing. Christoph Cullmann is a Senior Software Engineer at AbsInt Angewandte Informatik GmbH. His work is focused on static analysis of both binary and source programs and the WCET analysis of embedded systems. In his spare time, he works on the KDE project and maintains the Kate editor application and component.

KF5 & Plasma 5 at work ;=)

In the last months, I didn’t get much time to work on Kate nor KTextEditor. Beside some small bugfixes and cleanups I got nothing commited :/

Guess one of the main issues is, I don’t use the KF5 based version of Kate that much ATM. At home, it is the only editor I use, but I have not much time to hack at home anyway.

Therefore today I installed the same setup on my work machine and will now use the KF5 based Kate for all of my day job, perhaps that motivates me more to take a look at the issues the Qt5/KF5 port still has.
(And I will work in a KDE Plasma 5 session with most stuff KF5 based now, including all important stuff like the nice Konsole ;=)

First update: The Get It page got an update to show how to install KF5 based Kate/KWrite from kate.git on openSUSE 13.2 😉 Feel free to send in the needed hints for other distros (to kwrite-devel@kde.org).
The installation hints for KDE 4.x based Kate got moved to Get It – KDE 4.x, to keep them intact!

Kate from KDE Applications 15.04 – KF 5.9

I reinstalled my home machine last week with openSUSE 13.2 and installed their latest 15.04 packages from the KDE repos ;=)

That is the first time that I use a distro-shipped Kate that is based on KF5 (and no other Kate 4.x is installed any more as escape route).

I think I already have seen 1-2 glitches (like not needed questions for reload and some repaint issue on reload), still, overall, I am happy with what is shipped as 15.04.

Thanks to all people contributing to KF5 and Kate 5.x! Well done!
And thanks to the packagers of 15.04, too. Nice to have up-to-date applications with just an additional repository to add!

Kate5 on Mac

Given that the KF5 based Kate works OK on Windows, I would like to get the Mac version up and running, too.

As virtualization of MacOS X is kind of “forbidden” and not that nicely usable anyway, as no nice accelerating drivers are available for the standard vm solutions, I just went out into the world and bought some Retina MacBook.

I followed the nice guide on https://github.com/haraldF/homebrew-kf5 (thanks Harald :=) and got some installed Kate/KWrite (after patching kio to skip X11 detection).

But ok, not that usable, at least without any investigation which env vars are missing per default you get a Kate that crashs or just shows the main window central content without any actions/menus/toolbars/sidebars/…

In addition, the application is scaled, as the manifest that tells we are able to handle retina bla stuff is missing.

Guess lots of work ahead, but given I have now some Mac, I will work on that in the following months 😉

P.S. I never had a Mac before and got often told by “Mac Fans” that I should switch to some “real” operating system from my stupid borked unusable cluttered hacky … Linux. Given that the new shiny MacBook directly stalled for ever during the guided “create your user and give us all your data” installation wizard on first boot, I am not that impressed ;=) My mother would have been stuck and after some googling that seems to be a “known issue”, at least for me, after a hard reboot, the thingy worked and I had a login, more luck than others 😛

Qt 5.4 on Red Hat Enterprise 5

For my job, I need to take care of the support of old Linux distributions for our products, therefore I experimented in building Qt 5.x for Red Hat Enterprise 5 (or CentOS 5 or other clones).

Whereas Red Hat Enterprise 6 works more or less out of the box, to build Qt (even with WebKit and Co.) on Red Hat Enterprise 5, more work is needed. Even the xcb library is not yet existent there.

Therefore, here a small howto, for other people having problems with building it. It contains some hacks and any input is for sure nice to have as an comment (to help others to avoid my faults).

Disclaimer: I am not responsible for creating a completely messy and buggy Qt 5.x build :=)

First, lets assume you have some CentOS 5.11 box or chroot.

You will need some new development toolsets to get rolling:

wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -O /etc/yum.repos.d/devtools-1.1.repo
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo

I tend to use the version 2, version 1.1 does work, too (GCC 4.7.2 vs. 4.8.2).

We will needed EPEL, for a more up-to-date python (2.6, for xcb):

wget http://ftp.tu-chemnitz.de/pub/linux/fedora-epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -i epel-release-5-4.noarch.rpm

Then, lets install the minimal deps (I install both toolsets, you can choose one):

yum install devtoolset-1.1 devtoolset-2 python26 fontconfig-devel libX11-devel libXau-devel libXext-devel libXrender-devel

Then, get some compile shell ready:

scl enable devtoolset-2 bash

I will just for excercise build Qt and stuff into /tmp/usr/(qt)?

To build Qt, you need libxcb, get that (with deps):

# package config for xcb stuff
export PKG_CONFIG_PATH=/tmp/usr/lib/pkgconfig

# xcb proto
wget http://xcb.freedesktop.org/dist/xcb-proto-1.11.tar.gz
tar -xzf xcb-proto-1.11.tar.gz
cd xcb-proto-1.11
./configure –prefix=/tmp/usr
make -j8
make install
cd ..

# pthread stubs
wget http://xcb.freedesktop.org/dist/libpthread-stubs-0.3.tar.gz
tar -xzf libpthread-stubs-0.3.tar.gz
cd libpthread-stubs-0.3
./configure –prefix=/tmp/usr
make -j8
make install
cd ..

# xcb
wget http://xcb.freedesktop.org/dist/libxcb-1.11.tar.gz
tar -xzf libxcb-1.11.tar.gz
cd libxcb-1.11
./configure –prefix=/tmp/usr
make -j8
make install
cd ..

Now we are ready to build Qt 5.4, at least some parts ;=)
I skip here the GL stuff, I don’t need it and I skip some other modules.

# unpack qt
tar -xzf qt-everywhere-opensource-src-5.4.0.tar.gz
cd qt-everywhere-opensource-src-5.4.0

# no perf events => patch that out, won’t compile, at least not for me because of missing syscall/broken kernel header
sed -i “s/#define QTESTLIB_USE_PERF_EVENTS/#undef QTESTLIB_USE_PERF_EVENTS/g” qtbase/src/testlib/qbenchmark_p.h

# configure with some defines to work on centos 5 (fake some defines)
./configure -R ‘\\\$$ORIGIN’ -D _X_INLINE=inline -D XK_dead_currency=0xfe6f -D XK_ISO_Level5_Lock=0xfe13 -D FC_WEIGHT_EXTRABLACK=215 -D FC_WEIGHT_ULTRABLACK=FC_WEIGHT_EXTRABLACK -v -opensource -confirm-license -sysconfdir /etc/xdg -prefix /tmp/usr/qt -release -shared -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -qt-xcb -qt-xkbcommon -xkb-config-root /usr/share/X11/xkb -no-xcb-xlib -c++11 -nomake examples -nomake tests -no-dbus -no-icu -no-opengl -skip activeqt -skip androidextras -skip connectivity -skip enginio -skip location -skip macextras -skip multimedia -skip quick1 -skip sensors -skip serialport -skip wayland -skip webchannel -skip webengine -skip webkit -skip webkit-examples -skip websockets -skip winextras -skip x11extras

# build and install
make -j8
make install

=> You have some Qt, but keep in mind you need to bundle at least the libxcb.so* library, as your Red Hat Enterprise 5.x guys won’t have it!