Compile QT 4.7.1 on Ubuntu 10.10 for OpenVG
I am working on a new project that involves determining the available options for fast and smooth user interface implementation on an embedded, linux-based platform. The target platform supports OpenVG, so I went to check the OpenVG support in QT. It turns out that OpenVG is supported by QT, however you have to compile QT with OpenVG support yourself, as it is not enabled by default in the official binaries.
In order to quickly start testing, I looked for a way to compile and execute QT apps with OpenVG support on the desktop. (desktop means my Ubuntu 10.10 running in a parallels VM). After some time googling around I concluded that I needed to install ShivaVG first, then build QT with OpenVG support.
ShivaVG is an open source OpenVG implementation built on top of OpenGL. Installing it was as easy the usual configure/make/make install. After that it was the time to build and install QT with OpenVG support. Calling up configure did automatically find ShivaVG and recognized it as the OpenVG implementation. Unfortunately, during the actual build process, compilation stopped with different compiler and linker errors.
After some search, I could boil down the source of the errors I got to two things: missing variables for ShivaVG include directories and missing patch in QT regarding VGFont usage. Let’s see what these mean.
The first problem was that qmake was not finding the ShivaVG include and lib directories. In order to inform qmake about these settings, you need to find the right configuration file and manually add a couple of variables to it. QT stores platform specific configuration files in the mkspecs directory. I was building for an x86 linux system with a 64bit processor (remember, Ubuntu 10.10 running on virtual machine on Macbook Pro), so my configuration file is called mkspecs/linux-g++-64/qmake.conf. I added the following variables to that file before the load(qt_config) directive:
This solved the first bunch of compilation issues. However, I was still receiving strange error messages about VGFont not being found by the compiler. After another google session I learned that ShivaVG does not support VGFont. Fortunately, after yet another, much lengthier searching episode I found this patch on gitorious. What it does is to comment out the VGFont stuff from some files in the QT distribution. To my surprise, I was able to finish building QT from source with OpenVG support using ShivaVG after applying this patch.
What I experienced when actually running some QT examples and also my own demos with ShivaVG will be the subject of a future post. I’ll keep you posted

Hi,
This is a very useful post.
I am also trying to do exactly the same. But I am stuck up in enabling OpenVG in QT.
Could you please share me the steps or changed files for enabling OpenVG ?
Also could you please help me with the steps to install ShivaVG? I have downloaded the source code of ShivaVG, i dont know how to install it.
Best Regards
Pawan
shivavg’s source code seems to be built on top of windows, how can i built it on ubuntu?
A error occured when I build source code of shivavg, it says OpenGL is not set correctly, and I can’t figure out the reason.
Eric, I built ShivaVG on Ubuntu. For me it was as easy as doing the configure/make/make install dance. What error message do you get when you do that?