Has anyone managed to build Qt5 with Webkit support?

12 posts
by aghogg » Sat Jun 23, 2012 7:21 am
Hi all,

I was wondering how many of you have managed (or attempted) to cross-compile Qt5 (or even 4.x for that matter) for the Pi?

I have an issue in that a cross-platform project I am working on relies heavily on QtWebkit - which is missing from the Qt5 snapshots due to recent volatility in that particular module.

After some email exchanges with people involved in the Qt project, I have been advised that I really will need to build this for myself - none of the few binary releases available contain QtWebkit. However, I am really struggling to get this built. Every time recently that I have cloned the source and tried to build, I have had different errors. I know Qt5 is currently pre-release, and not entirely stable yet, but that still doesn't really help my situation!

So - has ANYONE out there managed to build Qt from source for themselves? And on the off chance that someone somewhere has actually managed to get a QtWebkit library out the other end - don't suppose you'd feel like sharing that library, would you? :)

Kind Regards,
Posts: 2
Joined: Sat Jun 23, 2012 7:08 am
by Max » Mon Jun 25, 2012 2:02 pm
Did got it to compile a couple weeks or so ago. (for a hardfp buildroot based distro, not for wheezy)

But it was not stable enough yet to be useful.
QtTestBrowser crashed as soon as you hoovered your mouse over a link.
by aghogg » Mon Jun 25, 2012 6:45 pm

Thanks for the reply. Really seems like a bad moment in time to be trying to use this, but our project is heavily reliant on it so I have to see what we can do!

To be honest, even if there was a half-decent Qt4.8.x with Webkit support I'd give it a shot, that's actually what our PC project is using right now, but there doesn't seem to be a 4.x snapshot for Pi anywhere, and I've not really found much in the way of information as to whether it has ever really been viable on Pi. I get the impression that 5.x is where any effort has gone in.
Posts: 2
Joined: Sat Jun 23, 2012 7:08 am
by plugwash » Mon Jun 25, 2012 8:59 pm
debian/raspbian have QT 4.8, is there some reason the packaged versions are not suitable?
Forum Moderator
Forum Moderator
Posts: 3211
Joined: Wed Dec 28, 2011 11:45 pm
by Max » Mon Jun 25, 2012 10:44 pm
If you want Qt 4 on Debian, you should indeed just be able to do: sudo apt-get install libqt4-dev qtcreator
and compile your application on the Pi itself.

But you will not have any graphics acceleration with Qt 4, and the application will run under X windows, instead of standalone.
by brunialti » Sat Jul 07, 2012 10:04 pm
Hi, sorry for my trivial question.
If I install qt by sudo apt-get I get the 4.x version.
Do you know when and if (or how) it will be available the qt5 version by apt-get command?
Posts: 17
Joined: Sat Jun 09, 2012 9:11 am
by Max » Sat Jul 07, 2012 10:10 pm
Qt 5 is already installed in /opt/qt50-snapshot on Wheezy.
Just no webkit, no xcb plugin, and no qmake by default.
by asb » Sun Jul 08, 2012 12:06 am
See http://qt-project.org/wiki/RaspberryPi for a summary of the current state of Qt5 support on the Pi.
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
by Heater » Wed Dec 04, 2013 2:17 pm
Well, has anyone managed to do this yet?

I managed to compile Qt5 from the instructions I found recently here: http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi

That resulted in a working Qt that operated into the frame buffer, no X Windows required. Also accelerated OpenGL works. Perfect.

But no qtwebkit. What I'm after is webgl in a simple home made webkit browser window.

OK I installed Ruby to my Pi and then the next build decided to build qtwebkit as well. The builds fail with a couple of errors that are easily fixed but then fails due to insufficient memory. On adding a swap file to my SD card it failed with an internal compiler error!

Just now I'm trying again using a USB hard drive attached to the Pi with a swap file enabled. I pulled a fresh copy of the Qt repo and installed GCC 4.7.

I'm not confident it will build successfully.
Posts: 7070
Joined: Tue Jul 17, 2012 3:02 pm
by Heater » Thu Dec 05, 2013 10:15 pm
As I said I was not confident of qtwebkit building successfully.

After about three days of happy compiling it crashes and burns with this error:

Code: Select all
In file included from rendering/style/StyleBackgroundData.h:29:0,
                 from rendering/style/RenderStyle.h:53,
                 from rendering/RenderObject.h:36,
                 from rendering/RenderLayerModelObject.h:26,
                 from rendering/RenderBoxModelObject.h:28,
                 from rendering/RenderBox.h:26,
                 from rendering/RenderReplaced.h:25,
                 from rendering/RenderWidget.h:26,
                 from rendering/RenderPart.h:26,
                 from rendering/RenderEmbeddedObject.h:26,
                 from page/ChromeClient.h:35,
                 from dom/Node.cpp:34:
rendering/style/FillLayer.h:43:5: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[3]: *** [.obj/dom/Node.o] Error 1
make[3]: Leaving directory `/mnt/sda1/qt5/qtwebkit/Source/WebCore'
make[2]: *** [sub-Target-pri-make_first-ordered] Error 2
make[2]: Leaving directory `/mnt/sda1/qt5/qtwebkit/Source/WebCore'
make[1]: *** [sub-Source-WebCore-WebCore-pro-make_first-ordered] Error 2
make[1]: Leaving directory `/mnt/sda1/qt5/qtwebkit'
make: *** [module-qtwebkit-make_first] Error 2

I despair.
Posts: 7070
Joined: Tue Jul 17, 2012 3:02 pm
by topguy » Wed Dec 18, 2013 1:06 pm
Heater wrote:Well, has anyone managed to do this yet?

If by "this" you mean "build Qt5 with Webkit support" there are a few yes, but I believe all successful attempts has been made by cross-compiling or compiling in a QEmu environment where memory is less of a problem.

The repository at: http://twolife.be/raspbian/
Or the buildroot environment mentioned in this thread: viewtopic.php?f=38&t=43087
User avatar
Posts: 3027
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway
by Heater » Thu Dec 19, 2013 9:20 am

Thanks. I will give twolife a try when I have a free moment.

A few thoughts:

Does that twolife Qt webkit get GPU acceleration? That's what I'm after here.

Does it run Qt programs into the frame buffer? I don't want to have to have X underneath.

I was hoping memory would not be an issue. I'm running with a 1GB swap file on a hard drive here.

Every now and then over the last year I have tried building Qt, on the Pi and cross-compiling, from various sets of instructions around the net. Damn thing never builds.
Posts: 7070
Joined: Tue Jul 17, 2012 3:02 pm