Solved Native Build of QT5.9.2 on Raspbian Stretch with Raspberry Pi2
-
I tried to compile QT5.9.2 on my Raspberry pi2 with Raspbian Stretch from 2017-09-07 but allways get errors on the configure output .I tried stretch with Desktop and the stretch light image from the official site https://www.raspberrypi.org/downloads/raspbian/
Here is what i did
$ sudo apt-get update
$ sudo apt-get upgradeInstalled neccesary libraries :
$ sudo apt-get install build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl1.0-dev
libpng-dev libjpeg-dev libglib2.0-dev libraspberrypi-dev bluez libbluetooth-dev libasound2-dev pulseaudio libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good
gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-alsa gstreamer-tools libpq-dev
libmariadbclient-dev libwayland-devDownloaded the source tarball :
$ wget http://download.qt.io/official_releases/qt/5.9/5.9.2/single/qt-everywhere-opensource-src-5.9.2.tar.xzUnpacked the source tarball:
$ tar xf qt-everywhere-opensource-src-5.9.2.tar.xzMade a shadow build directory:
$ mkdir build
$ cd buildConfigured QT with the following command:
$ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig PKG_CONFIG_SYSROOT_DIR=/
../qt-everywhere-opensource-src-5.9.2/configure -v -opengl es2 -eglfs -no-gtk -device linux-rasp-pi2-g++
-device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -reduce-exports
-force-pkg-config -nomake examples -no-compile-examples -skip qtwayland -skip qtwebengine -release
-qt-pcre -ssl -evdev -system-freetype -fontconfig -glib -prefix /opt/Qt5.9I get the following errors
Note: Dropped compiler flags '-pthread' when detecting library 'glib'.
Note: Disabling Linux Accessibility Bridge: D-Bus is missing.
Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer'.
Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer_app'.
can someone tell me why i get the dropped compiler flags ?
-
@Markus-Ippy You can add -v parameter to configure call and check the output for errors/warnings.
-
@jsulm said in Native Build of QT5.9.2 on Raspbian Stretch with Raspberry Pi2:
-v parameter to configure call and check the output for errors/warnings.
Hi @jsulm as you can see i have already added the -v in my configuration
$ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig PKG_CONFIG_SYSROOT_DIR=/
../qt-everywhere-opensource-src-5.9.2/configure -v -opengl es2 -eglfs -no-gtk -device linux-rasp-pi2-g++
-device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -reduce-exports
-force-pkg-config -nomake examples -no-compile-examples -skip qtwayland -skip qtwebengine -release
-qt-pcre -ssl -evdev -system-freetype -fontconfig -glib -prefix /opt/Qt5.9 -
I Installed libatspi-dev and also changed the mkspecs/devices/linux-rasp-pi2-g++/qmake.conf
-QMAKE_LIBS_EGL = -lEGL -lGLESv2
-QMAKE_LIBS_OPENVG = -lEGL -lOpenVG -lGLESv2
+QMAKE_LIBS_EGL = -lbrcmEGL -lbrcmGLESv2
+QMAKE_LIBS_OPENGL_ES2 = -lbrcmEGL -lbrcmGLESv2
+QMAKE_LIBS_OPENVG = -lbrcmEGL -lbrcmOpenVG -lbrcmGLESv2Configure summary:
Building on: linux-g++ (arm, CPU features: <none>)
Building for: devices/linux-rasp-pi2-g++ (arm, CPU features: neon)
Configuration: cross_compile use_gold_linker enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 c++1z concurrent dbus reduce_exports stl
Build options:
Mode ................................... release
Optimize release build for size ........ no
Building shared libraries .............. yes
Using C++ standard ..................... C++1z
Using ccache ........................... no
Using gold linker ...................... yes
Using new DTAGS ........................ yes
Using precompiled headers .............. yes
Using LTCG ............................. no
Target compiler supports:
NEON ................................. yes
Build parts ............................ libs
Qt modules and options:
Qt Concurrent .......................... yes
Qt D-Bus ............................... yes
Qt D-Bus directly linked to libdbus .... yes
Qt Gui ................................. yes
Qt Network ............................. yes
Qt Sql ................................. yes
Qt Testlib ............................. yes
Qt Widgets ............................. yes
Qt Xml ................................. yes
Support enabled for:
Using pkg-config ....................... yes
QML debugging .......................... yes
udev ................................... yes
Using system zlib ...................... yes
Qt Core:
DoubleConversion ....................... yes
Using system DoubleConversion ........ no
GLib ................................... yes
iconv .................................. no
ICU .................................... yes
Logging backends:
journald ............................. no
syslog ............................... no
slog2 ................................ no
Using system PCRE2 ..................... no
Qt Network:
getaddrinfo() .......................... yes
getifaddrs() ........................... yes
IPv6 ifname ............................ yes
libproxy ............................... no
OpenSSL ................................ yes
Qt directly linked to OpenSSL ........ no
SCTP ................................... no
Use system proxies ..................... yes
Qt Gui:
Accessibility .......................... yes
FreeType ............................... yes
Using system FreeType ................ yes
HarfBuzz ............................... yes
Using system HarfBuzz ................ no
Fontconfig ............................. yes
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... yes
PNG .................................. yes
Using system libpng ................ yes
EGL .................................... yes
OpenVG ................................. no
OpenGL:
Desktop OpenGL ....................... no
OpenGL ES 2.0 ........................ yes
OpenGL ES 3.0 ........................ no
OpenGL ES 3.1 ........................ no
Session Management ..................... yes
Features used by QPA backends:
evdev .................................. yes
libinput ............................... yes
INTEGRITY HID .......................... no
mtdev .................................. no
tslib .................................. no
xkbcommon-evdev ........................ yes
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS EGLDevice ...................... no
EGLFS GBM ............................ no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... yes
EGL on X11 ........................... no
LinuxFB ................................ yes
VNC .................................... yes
Mir client ............................. no
X11:
Using system-provided XCB libraries .. no
EGL on X11 ........................... no
Xinput2 .............................. no
XCB XKB .............................. yes
XLib ................................. no
XCB render ........................... yes
XCB GLX .............................. no
XCB Xlib ............................. no
Using system-provided xkbcommon ...... no
Qt Widgets:
GTK+ ................................... no
Styles ................................. Fusion Windows
Qt PrintSupport:
CUPS ................................... yes
Qt Sql:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. yes
OCI (Oracle) ........................... no
ODBC ................................... no
PostgreSQL ............................. yes
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt SerialBus:
Socket CAN ............................. yes
Socket CAN FD .......................... yes
QtXmlPatterns:
XML schema support ..................... yes
Qt QML:
QML interpreter ........................ yes
QML network support .................... yes
Qt Quick:
Direct3D 12 ............................ no
AnimatedImage item ..................... yes
Canvas item ............................ yes
Support for Qt Quick Designer .......... yes
Flipable item .......................... yes
GridView item .......................... yes
ListView item .......................... yes
Path support ........................... yes
PathView item .......................... yes
Positioner items ....................... yes
ShaderEffect item ...................... yes
Sprite item ............................ yes
Qt Gamepad:
SDL2 ................................... no
Qt 3D:
Assimp ................................. yes
System Assimp .......................... no
Output Qt3D Job traces ................. no
Output Qt3D GL traces .................. no
Qt 3D GeometryLoaders:
Autodesk FBX ........................... no
Qt Bluetooth:
BlueZ .................................. yes
BlueZ Low Energy ....................... yes
Linux Crypto API ....................... yes
Qt Sensors:
sensorfw ............................... no
Qt Quick Controls 2:
Styles ................................. Default Material Universal
Qt Quick Templates 2:
Hover support .......................... yes
Multi-touch support .................... yes
Qt Positioning:
Gypsy GPS Daemon ....................... no
WinRT Geolocation API .................. no
Qt Location:
Geoservice plugins:
OpenStreetMap ........................ yes
HERE ................................. yes
Esri ................................. yes
Mapbox ............................... yes
MapboxGL ............................. yes
Itemsoverlay ......................... yes
Qt Multimedia:
ALSA ................................... yes
GStreamer 1.0 .......................... yes
GStreamer 0.10 ......................... no
Video for Linux ........................ yes
OpenAL ................................. no
PulseAudio ............................. yes
Resource Policy (libresourceqt5) ....... no
Windows Audio Services ................. no
DirectShow ............................. no
Windows Media Foundation ............... noNote: Also available for Linux: linux-clang linux-icc
Note: Dropped compiler flags '-pthread' when detecting library 'glib'.
Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.
Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer'.
Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer_app'.
Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into '/opt/Qt5.9'.Prior to reconfiguration, make sure you remove any leftovers from
the previous build.When i go through the verboose output i can see :
GLIB:
Checking for GLib...
Trying source 0 (type pkgConfig) of library glib ...- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors glib-2.0 gthread-2.0
- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --modversion glib-2.0 gthread-2.0
2.50.3
2.50.3- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-L glib-2.0 gthread-2.0
- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-l glib-2.0 gthread-2.0
-lgthread-2.0 -lglib-2.0
- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --cflags glib-2.0 gthread-2.0
-pthread -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include
- cd /home/pi/build/config.tests/glib && PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /home/pi/build/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker warn_off console single_arch" -early "CONFIG += cross_compile" 'LIBS += -lgthread-2.0 -lglib-2.0' 'QMAKE_CFLAGS += -pthread -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include' 'QMAKE_CXXFLAGS += -pthread -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include' /home/pi/build/config.tests/glib
- cd /home/pi/build/config.tests/glib && MAKEFLAGS= /usr/bin/make
/usr/bin/g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard -pthread -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include -O2 -w -fPIC -I. -I/home/pi/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/devices/linux-rasp-pi2-g++ -o main.o main.cpp
/usr/bin/g++ -mfloat-abi=hard -Wl,-O1 -fuse-ld=gold -Wl,-rpath-link,/opt/vc/lib -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/lib/arm-linux-gnueabihf -o glib main.o -lgthread-2.0 -lglib-2.0
=> source accepted.
test config.corelib.libraries.glib succeededGStreamer :
Checking for GStreamer 1.0...
Trying source 0 (type pkgConfig) of library gstreamer_1_0 ...- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0
- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --modversion gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0
1.10.4
1.10.4
1.10.4
1.10.4
1.10.4- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-L gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0
- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-l gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0
-lgstaudio-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstpbutils-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --cflags gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0
-pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include
- cd /home/pi/build/config.tests/gstreamer && PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /home/pi/build/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker warn_off console single_arch" -early "CONFIG += cross_compile" 'LIBS += -lgstaudio-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstpbutils-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0' 'QMAKE_CFLAGS += -pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include' 'QMAKE_CXXFLAGS += -pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include' /home/pi/qt-everywhere-opensource-src-5.9.2/qtmultimedia/config.tests/gstreamer
- cd /home/pi/build/config.tests/gstreamer && MAKEFLAGS= /usr/bin/make
/usr/bin/g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard -pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include -O2 -w -fPIC -I/home/pi/qt-everywhere-opensource-src-5.9.2/qtmultimedia/config.tests/gstreamer -I. -I/home/pi/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/devices/linux-rasp-pi2-g++ -o main.o /home/pi/qt-everywhere-opensource-src-5.9.2/qtmultimedia/config.tests/gstreamer/main.cpp
/usr/bin/g++ -mfloat-abi=hard -Wl,-O1 -fuse-ld=gold -Wl,-rpath-link,/opt/vc/lib -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/lib/arm-linux-gnueabihf -o gstreamer main.o -lgstaudio-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstpbutils-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
=> source accepted.
test config.multimedia.libraries.gstreamer_1_0 succeededGStreamer APP :
[0_1510034146323_configure output.txt](Uploading 100%)
Checking for GStreamer App 1.0...
Trying source 0 (type pkgConfig) of library gstreamer_app_1_0 ...- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors gstreamer-app-1.0
- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --modversion gstreamer-app-1.0
1.10.4
- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-L gstreamer-app-1.0
- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-l gstreamer-app-1.0
-lgstapp-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
- PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --cflags gstreamer-app-1.0
-pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include
- cd /home/pi/build/config.tests/gstreamer_appsrc && PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig /home/pi/build/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker warn_off console single_arch" -early "CONFIG += cross_compile" 'LIBS += -lgstapp-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0' 'QMAKE_CFLAGS += -pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include' 'QMAKE_CXXFLAGS += -pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include' 'LIBS += -lgstaudio-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstpbutils-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0' 'QMAKE_CFLAGS += -pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include' 'QMAKE_CXXFLAGS += -pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include' /home/pi/qt-everywhere-opensource-src-5.9.2/qtmultimedia/config.tests/gstreamer_appsrc
- cd /home/pi/build/config.tests/gstreamer_appsrc && MAKEFLAGS= /usr/bin/make
/usr/bin/g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard -pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include -pthread -I//usr/include/gstreamer-1.0 -I//usr/include/glib-2.0 -I//usr/lib/arm-linux-gnueabihf/glib-2.0/include -O2 -w -fPIC -I/home/pi/qt-everywhere-opensource-src-5.9.2/qtmultimedia/config.tests/gstreamer_appsrc -I. -I/home/pi/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/devices/linux-rasp-pi2-g++ -o main.o /home/pi/qt-everywhere-opensource-src-5.9.2/qtmultimedia/config.tests/gstreamer_appsrc/main.cpp
/usr/bin/g++ -mfloat-abi=hard -Wl,-O1 -fuse-ld=gold -Wl,-rpath-link,/opt/vc/lib -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/lib/arm-linux-gnueabihf -o gstreamer_appsrc main.o -lgstapp-1.0 -lgstaudio-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstpbutils-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
=> source accepted.
test config.multimedia.libraries.gstreamer_app_1_0 succeeded -
The compilation worked despite the dropped compiler Flags.
I just realized that my code that worked in QT5.9.1 now gets a segmentation fault in QT5.9.2 on the PI . On Ubuntu and Windows the same code works.
It seems to be specific to raspberry pi as i get the problem also with my buildroot on 5.9.2 but not 5.9.1