Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile Qt5 without GUI support on Linux ARM

Tags:

c++

linux

qt

arm

qt5

I'm having troubles getting Qt5 working without GUI elements on my Cortex-A9 board due the OpenGL dependencies (i.e. OpenGL ES2). I am running a Ubuntu 14.04 rootfs.

Is there any way to disable the generation of GUI classes, starting from git repository? (Target version 5.3). The only modules I need are QtCore, QtXML and QtWebSockets/QtNetwork

like image 522
madduci Avatar asked Sep 15 '25 06:09

madduci


1 Answers

The following seems to get Qt5 to compile with a LinuxFB driver and no OpenGL.

./configure -qpa linuxfb -no-largefile -opensource -verbose -release \
 -no-accessibility  -confirm-license -no-sse -no-sse2 \
 -qt-zlib -qt-libpng -nomake examples -nomake demos -nomake docs -nomake tests \
 -make libs --prefix=/usr -no-pch -no-iconv -no-nis -no-xkb -no-xshape \
 -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes -no-xrandr -no-kms \
 -no-directfb -no-eglfs -no-xcb -no-dbus -no-icu -no-cups -no-gif \
 -no-accessibility -no-opengl -nomake quick -make quick1  \
 -skip multimedia -skip webkit -nomake webkit -no-pkg-config \
 -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci \
 -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \
 -no-sql-sqlite_symbian -no-sql-tds -nomake tools \
 -device linux-custom-g++ -device-option CROSS_COMPILE=$TGT_TOOL_NAME-

The keys are, -no-opengl and -nomake quick. QtQuick2 will pull in OpenGL.

Also it seems I must do the following,

touch module_qtwebkit-make_first

This stops the build system from trying to make QtWebKit; it seems buggy. This still has the GUI classes, but don't link to them. That is before the plain make. For the install target,

touch module_qtwebkit-install_subtargets

was required. Later Qt5 releases may have fixed the QtWebkit build issues.

like image 130
artless noise Avatar answered Sep 17 '25 20:09

artless noise