Unable to install LinuxFB
-
Hello! I've installed Qt 4.8.6 for embedded and I've been trying to run it on a Sabre Solox Imx6 board. I initially used:
./configure -qpa linuxfb -opengl es2 -arch arm -xplatform qws/linux-imx6-g++ -no-largefile -opensource -verbose -qt-libpng -qt-freetype -qt-libjpeg -fast -confirm-license -qt-zlib -qt-libpng -no-webkit -no-icu -make examples -nomake demos -make libs -release -exceptions -no-qt3support -no-glib -no-nas-sound -no-pch -no-iconv -no-cups -no-nis -no-openssl -no-libmng -no-mmx -no-3dnow -no-sse -no-sse2 -no-sse3 -no-ssse3 -no-avx -no-svg -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-sqlite_symbian -no-sql-symsql -no-sql-symsql -no-sql-tds -prefix /opt/qt4
I was able to then later gmake/gmake install plugins like some mousedrivers, input, etc, including linuxfb. I was able to get a mouse to interact with a program. (A program that tracked the location of a mouse, animated a button, and text label changes when clicking a button) But I wasn't able to use any of the QWSServer functions, including functions to move the mouse automatically to try and contain it to the screen. I checked my configure again and found I had forgotten the -embedded tag so I added it and I've tried this command, it configures, makes, and installs fine, but when I try and build linuxfb I get errors.
Here's my latest configuration command:
./configure -qpa linuxfb -embedded arm -no-libtiff -opengl es2 -arch arm -xplatform qws/linux-imx6-g++ -no-largefile -opensource -verbose -qt-libpng -qt-freetype -qt-libjpeg -fast -confirm-license -qt-zlib -qt-libpng -no-webkit -no-icu -make examples -nomake demos -make libs -release -exceptions -no-qt3support -no-glib -no-nas-sound -no-pch -no-iconv -no-cups -no-nis -no-openssl -no-libmng -no-mmx -no-3dnow -no-sse -no-sse2 -no-sse3 -no-ssse3 -no-avx -no-svg -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-sqlite_symbian -no-sql-symsql -no-sql-symsql -no-sql-tds -prefix /opt/qt4Here are the errors I get when I try to build qt-everywhere-opensource-src-4.8.6/src/plugins/platforms/linuxfb:
arm-linux-gnueabihf-g++ -c -pipe -O2 -O2 -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -fvisibility=hidden -fvisibility-inlines-hidden -D_REENTRANT -Wall -W -fPIC -DQT_NO_FONTCONFIG -DFT2_BUILD_LIBRARY -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../mkspecs/qws/linux-imx6-g++ -I. -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include -I../../../3rdparty/harfbuzz/src -I../fontdatabases/basicunix -I../../../3rdparty/freetype/builds/unix -I../../../3rdparty/freetype/src -I../../../3rdparty/freetype/include -I../fontdatabases/genericunix -I.moc/release-shared-emb-arm -I/run/media/username/e693313c-709a-4d72-aacb-e52e83829bd0/usr/include -I/tftpboot/rootfs/usr/include/arm-linux-gnueabi/ -o .obj/release-shared-emb-arm/fb_base.o ../fb_base/fb_base.cpp
../fb_base/fb_base.cpp: In constructor ‘QFbWindowSurface::QFbWindowSurface(QFbScreen*, QWidget*)’:
../fb_base/fb_base.cpp:401:54: error: ‘class QWidget’ has no member named ‘platformWindow’
platformWindow = static_cast<QFbWindow*>(window->platformWindow());
^
../fb_base/fb_base.cpp: In member function ‘void QFbWindowSurface::resize(const QSize&)’:
../fb_base/fb_base.cpp:450:5: error: ‘resize’ is not a member of ‘QWindowSurface’
QWindowSurface::resize(size);
^
qlinuxfbintegration.cpp: In member function ‘bool QLinuxFbIntegration::initDevice()’:
qlinuxfbintegration.cpp:521:21: error: ‘pixelFormat’ was not declared in this scope
if (pixelFormat() == QImage::Format_Invalid && screencols == 0
^
qlinuxfbintegration.cpp:528:67: error: ‘qt_set_generic_blit’ was not declared in this scope
vinfo.blue.offset, vinfo.transp.offset);
^
Makefile:1532: recipe for target '.obj/release-shared-emb-arm/fb_base.o' failed
gmake: *** [.obj/release-shared-emb-arm/fb_base.o] Error 1
gmake: *** Waiting for unfinished jobs....
Makefile:1282: recipe for target '.obj/release-shared-emb-arm/qlinuxfbintegration.o' failed
gmake: *** [.obj/release-shared-emb-arm/qlinuxfbintegration.o] Error 1Any help would be greatly appreciated, thank you!
-
Hi,
Did you do the second configure call in a clean source tree ? Or better yet in a new shadow build folder ?
-
@SGaist Yes, I'm working on a VM, so I just revert back to a saved state prior to trying that configure.
I found a 'solution' but I'm sure it's not what I should have done. It kind of seems wrong to have to edit the source code. I added and commented out some source code:
In the directory
/qtDownload/Imx6/qt-everywhere-opensource-src-4.8.6/src/gui/paintingqwindowsurface_qws_p.h:
// I ADDED THIS
void resize(const QSize &size)
{
QWindowSurface::resize(size);
}To line 105, just below "virtual QPaintDevice *paintDevice() = 0;"
qwindowsurface_p.h:
// I ADDED THIS
static void resize(const QSize &size);To line 101, just below the "#endif" for the "#if !defined(Q_WS_QPA)" define
In the directory
/qtDownload/Imx6/qt-everywhere-opensource-src-4.8.6/src/gui/kernelqwidget.h:
// I ADDED THIS
QPlatformWindow *platformWindow() const;To line 651, just below "friend class QDesktopScreenWidget; #endif"
In the directory
/qtDownload/Imx6/qt-everywhere-opensource-src-4.8.6/src/plugins/platforms/linuxfbqlinuxfbintegration.cpp:
Comment out the block:
#ifdef QT_QWS_DEPTH_GENERIC
if (pixelFormat() == QImage::Format_Invalid && screencols == 0
&& d_ptr->doGenericColors)
{
qt_set_generic_blit(this, vinfo.bits_per_pixel,
vinfo.red.length, vinfo.green.length,
vinfo.blue.length, vinfo.transp.length,
vinfo.red.offset, vinfo.green.offset,
vinfo.blue.offset, vinfo.transp.offset);
}
#endifAfter adding those changes to the src, I did the 2nd configure command, with "-embedded arm", did "gmake -j8 && gmake install", it worked, and I was able to go into src/plugins/platforms/linuxfb and "gmake -j8 && gmake install" on it and all the other plugins I needed. I even wrote a program that had
#include <QWSServer>
#include <QDebug>#ifdef Q_WS_QWS
QWSServer::setCursorVisible(false);
qDebug() << "Ran code to set cursor invisble!!!" << endl;
#endifin main.cpp. It built correctly on my machine, and ran with the command ./QWS_TEST -qws -platform linuxfb:fb=/dev/fb0:/dev/fb1 -plugin linuxinputmouse:/dev/inp/event6
-
That's indeed surprising…
By the way, since you are building Qt yourself, there's 4.8.7 that's the latest and last release of the Qt 4 series.
In any case, if possible you should consider updating to either Qt 5.6 which is a LTS release or 5.7.0 which is the latest.