Building Qt on Debian

I recently followed the advice of @sehurlburt to offer help to other developers. As I work with Qt and embedded Linux on a daily basis, I offered to help. (You should do the same!)

As it is easy to run out of words on Twitter, so here comes a slightly more lengthy explanation on how I build the latest and greatest of Qt for my Debian machine. Notice that there are easier ways to get Qt – you can install it from packages, or use the installer provided from The Qt Company. But if you want to build it yourself for whatever reason, this is how I do it.

First step is to get the build dependencies to your system. This might feel tricky, but apt-get can help you here. To get the dependencies for Qt 5, simply run sudo apt-get build-dep libqt5core5a and you are set.

Next step would be to get the Qt source tarball. You get it by going to https://www.qt.io/download/, select the open source version (unless you hold a commercial license) and then click the tiny View All Downloads link under the large Your download section. There you can find source packages for both Qt and Qt Creator.

Having downloaded and extracted the Qt tarball, enter the directory and configure the build. I usually do something like
./configure -prefix /home/e8johan/work/qt/5.9.0/inst -nomake examples -nomake tests. That should build everything, but skip examples and tests (you can build these later if you want to). The prefix should point to someplace in your home directory. The prefix has had some peculiar behaviour earlier, so I try to make sure not to have a final dash after the path. When the configuration has been run, you can look at the config.summary file (or the a bit higher up in the console output) and you can see a nice summary of what you are about to build. If this list looks odd, you need to look into the dependencies manually. Once you are happy, simply run make. If you want to speed things up, use the -j option with the highest number you dare (usually number of CPU cores plus one). This will parallelize the build.

Once the build is done (this takes a lot of time, expect at least 45 minutes with a decent machine), you need to install Qt. Run make install to do so. As you install Qt to someplace in your home directory, you do not need to use sudo.

The entry point to all of Qt is the qmake tool produced by your build (i.e. prefix/bin/qmake). If you run qmake -query you can see that it knows its version and installation point. This is why you cannot move a Qt installation around to random locations without hacking qmake. I tend to create a link (using ln -s) to this binary to somewhere in my path so that I can run qmake-5.9.0 or qmake-5.6.1 or whatnot to invoke a specific qmake version (caveat: when changing Qt version in a build tree, run qmake-version -recursive from the project root to change all Makefiles to the correct Qt version, otherwise you will get very “interesting” results).

Armed with this knowledge, we can go ahead and build QtCreator. It should be a matter of extracting the tarball, running the appropriate qmake in the root of the extracted code followed by make. QtCreator does not have to be installed, instead, just create a link to the qtcreator binary in the bin/ sub directory.

Running QtCreator, you can add Qt builds under Tools -> Options… -> Build & Run. Here, add a version by pointing at its qmake file, e.g. the qmake-5.9.0 link you just created. Then it is just a matter of picking Qt version for your project and build away.

Disclaimer! This is how I do things, but it might not be the recommended or even the right way to do it.

Five days and counting

It is five days left until foss-north 2017, so it is high time to get your ticket! Please notice that tickets can be bought all the way until the night of the 25th (Tuesday), but catering is only included is you get your ticket on the 24th (Monday), so help a poor organizer and get your tickets as soon as possible!

And just to reiterate what’s on the menu. This is a full day conference with two tracks and many interesting speakers from many projects, including Debian, Wikimedia, KDE, systemd, PulseAudio, Nextcloud, PostgreSQL, OpenRISC, flatpak, AsteroidOS and more.

Last year, over 30% of the tickets was sold in the last 48h. This year, we cannot provide catering for the ones buying tickets the last 24h, so hopefully the peak will come earlier. For now, we have 93 persons on the visiting list, but there are chairs for 100 more!

Just three days left…

The call for papers for foss-north 2017 ends on Sunday. That means that you only have three days to…

  • … get a chance to visit Gothenburg, Sweden, the most sociable city in the world!
  • … speak in front of a great audience of 220 people (if we sell all the tickets – get your’s here).
  • … listen to other awesome speakers. Right now we’ve confirmed Lydia Pintscher, Lennart Poettering, Knut Yrvin and Jos Poortvliet. (There will be more awesome speakers announced when the call for papers is over).

So what are you waiting for – submit your talk proposal and join us at foss-north 2017!

foss-north 2017: Call for Papers

The Call for Papers for foss-north is open for another week (until the 12th). This gives you an opportunity to speak in front of a great crowd. Looking at the results from last year’s questionnaire, more than 90% are users of open source software and more than 50% are contributors. One thing that surprised me, is that more people actually contribute as a part of their profession than as hobbyists. Looking at the professional vs hobbyist proportions, 45% of the visitors stated that they had their ticket paid by their employer/school, while 42% paid them out of their own pocket.

The topic of the conference is free and open source – so anything related is much welcome.We do not even limit ourselves to software – hardware, patents, community and much more is also appreciated topics. Last year we had speakers talking about timing synchronization over vast networks, patent issues, working as a designer, linguistics and must more.

As always with these things, crowd dynamics means that me as an organizer has to work on my stress management abilities. Almost 30% of the tickets to last year’s event was sold in the last two days before the event. The same goes for Call for Papers – nobody registers a talk in good time before the deadline. So if you want to help an ageing developer keeping the pulse under control – submit your talk proposal now! ;-)

Building communities

As some of you might know I’ve been involved in the foss-gbg group for a long while (more than 3 years now). Last year I helped starting the foss-north conference, which is really about taking what foss-gbg is and turning it into something bigger. We had a great turn-up – over 100 guests and ten great speakers.

This week, I finally got time to start pushing forward with this year’s edition of foss-north. It will be held on April 26 in Gothenburg and it is a great opportunity to visit Sweden and Gothenburg and mingle with the FOSS community. We’ve already confirmed Lydia Pintscher and Lennart Poettering as speakers. If you want to speak the call for paper has just opened and will run until March 12. Tickets sales will open shortly too, as well as the call for sponsors.

By a random chance I got involved in the organization of yet another group this week. The C++ meetup community in Gothenburg has been inactive for almost a year, so a group of people decided to pick up the ball and try to get something running. We’ve renamed the group to gbgcpp and the next (our first) meeting will be held January 26, and then we will take it from there. Hopefully this can turn into something fun!

Summary of 2016

So, 2016 has been a great year to me. Interesting in many aspects, but most has turned out to be for the better. I’ve gotten to know a bunch of awesome new people, I spoken about open source, Qt and Linux in Europe and USA, I’ve helped hosting an open source conference in Gothenburg, I’ve learned so much more professionally and as a person, and I’ve really enjoyed myself the whole time.

2016 was the year that…

  • … myself and Jürgen where Qt Champions for our work with the qmlbook. It feels really great getting recognition for this work. I really want to take QML Book further – during 2016 both myself and Jürgen have been too busy to do a good job improving and extending the text.
  • … I had to opportunity to visit the Americas (Oregon and California) for the first time in my life. Felt really nice having been on another continent. Now it is only Africa and Australia left on the list :-)

  • … I picked up running and has run every week throughout the year, averaging almost 10km per week. This is the first year since we built out house and had kids (so 11 or 12 years) that I’ve maintained a training regime over a full year.
  • foss-gbg went from a small user group of 15-30 people meeting every month to something much larger. On May 26 the first foss-north took place. This is something some friends of mine and myself have discussed for years and when we finally dared to try it was a great success. We filled the venue with 110 guests and ten speakers and had a great day in the sunshine. In the events after foss-north, the local group, foss-gbg has attracted 40-60 people per meeting, so double the crowd.

  • Pelagicore, the start-up I joined in 2010 when we were only 6 employees, was acquired by Luxoft. We had grown to 50+ employees in the mean time and put Qt, Linux and open source on the automotive map. It has been a great journey and I feel that we being a part of something bigger lets us reach even further, so I’m really excited about this.

2017 will be the year that…

  • … I make more time for writing – on qmlbook, this blog and more.
  • … I improve my running and increase my average distance per run as well as distance per week.
  • foss-north will take place again. This time with double the audience and dual tracks for parts of the day. I will share more information as it develops. This time, the date to aim for is April 26. In the mean time, foss-gbg will have fewer, but larger, meetings.
  • … Qt, Linux and open source becomes the natural choice in automotive. I will do my best to help this turn out true!

Even as 2016 has been really good, I hope that 2017 will be even greater. I’m really looking forward to learning!

QmlBook Making Progress

It has been a long time since the last update of QmlBook was announced – but the project is definitely live and kicking. Jürgen has put in a lot of great work into the contents and gotten the collaborative work over on github started. To simplify the publication, the contents has been moved to github hosting, but you can still use the old qmlbook.org (and qmlbook.com) addresses to get there.

qmlbook-screenshotThe reason for the standstill on the qmlbook.org/com sites, and much of the perceived lack of progress is due to my personal time situation. Small children and family life takes time, as does my work (which is awesome and includes Qt/QML – go Pelagicore). Unfortunately, I’m a bit of an optimist, so I want to, and truly believe that I will have time to work on side projects such as this book. But the 24h/day limit sucks, so sometimes I realize that I fail to do so.

However, this is not a post where I complain over my own situation – instead – I want to thank all the contributors who keep feeding us issue tickets via github! I would also like to thank our readers – it is great to hear from you! And finally, I’d like to thank Jürgen who has put down a lot of work and kept the project moving forward.

It is not my intention to leave this project, I’m just short on time at the moment due to other awesome things in my life (kids, wife, work) – I’ll be back!

Qt Contributors Summit 2014

I’m writing from a warm and sunny Berlin, having attended my first Qt Contributors Summit. It is always nice to meet the Qt developer team, and to get a chance to hang out with the Pelagicorians from our Munich office.

QtCS2014This conference really acts as a good balance to Qt Developer Days. Where QtDD consists of speeches and focuses on information for the users of Qt, the QtCS consists of open discussions focusing on the development of Qt. I, personally, will take two things with me from here: the vibrant community and the openness of Qt.

It is nice to see the community in action. There are people from KDE, Digia, KDAB, ICS, Intel, Canonical, Jolla, Pelagicore and more attending.  This really shows how strong Qt has grown through the qt-project. Opening up development to people outside what was Trolltech / Nokia really has resulted in a strong community.

Having people from potentially competing companies at a joint developer conference can be a difficult thing. Here, however, the discussions have been open and honest. As a developer, it is really nice to see that Qt is driven by developers and not by politics. The discussions have been really great, letting everyone discuss their concerns and use-cases and agreeing on the direction going  forward. All of you can read the minutes at the QtCS wiki.

Finally, I’d like to thank Pelagicore for letting me attend, and for sponsoring the QtCS this year.

Qt5 Cadaques 2014-01 released

We are happy to announce the 2014-01 release of Qt 5 Cadaques, a book on Qt. We’ve worked away over the holidays and are happy to bring you chapter 11, on networking. We’ve also restructured chapters 15 and 16, dealing with C++ and native code, so that they are ready to be fleshed out for our next release. In the existing text, we’ve made lots of updates to fix typos and grammar issues.

In addition to fixing and adding contents, we’ve worked on the site. We’ve changed the theme to “flatly”, as we feel that this makes the site nicer to look at and to read from. We’ve also started experimenting with building a PDF/ePUB release. You can find the download links for these at the top of the table of contents. We know that both these formats need polishing, but we will focus our efforts on completing the contents first.

Before I stop and let you all start reading I would like to thank everyone who has visited the site and read the book. The response has been fantastic and we’ve seen so many positive comments, received so many great issue reports and seen the traffic to this site really grow. Thank you for reading!