Unsolved Facing issues cross-building Qt-everywhere-src-5.13.1 for Beaglebone Black, throwing undefined reference error with libQt5SerialPort.so.5 -- failing build.
-
The usual way is to use the device and install there all the build requirements and then sync things back to build the sysroot.
-
@SGaist
An 'apt search libudev' after logging into the beaglebone black via SSH gives the following output:libudev-dev/unknown,now 241-7~deb10u8rcnee0~buster+20211022 armhf [installed] libudev development files libudev1/unknown,now 241-7~deb10u8rcnee0~buster+20211022 armhf [installed] libudev shared library
I believe i have the required libudev installed on the BBB, and also synced back as sysroot (also confirmed by searching 'libudev'' in the sysroot folder in the files app in ubuntu which showed the libudev.so in ''sysroot/lib/arm-linux-gnueabihf') being used in ./configure step.
-
Which version is it ?
-
@SGaist
When i run "pkg-config --modversion udev" (found from one of stackoverflow threads to know the version of udev), i get the output as ''241" (don't know if that's how getting the version works). -
Then there's something strange going on since it's version 183 that seems to be requested when linking.
Do you have several udev librairies around ?
-
@SGaist
This udev is supposed to be taken from the sysroot of the baeaglebone black, right?I checked the same "pkg-config --modversion udev" and that returned the same '241'.
-
Did you try to do a full clean build ?
-
@SGaist Yes i did, but that didn't help as well.
The same LIBUDEV error was prominent in a clean build as well.If you have succesfully built Qt for cross-compilation to the Beaglebone black, would you be able to share a guide or something about the actual process and exact commands?
-
Did you already saw this guide ?
-
@SGaist
The below log is for the ./configure step:Creating qmake... ...........................................................................................Done. Info: creating super cache file /home/yash/QT5121/qt-everywhere-src-5.12.1/.qmake.super Info: creating cache file /home/yash/QT5121/qt-everywhere-src-5.12.1/.qmake.cache Info: creating stash file /home/yash/QT5121/qt-everywhere-src-5.12.1/.qmake.stash This is the Qt Open Source Edition. You have already accepted the terms of the Open Source license. Running configuration tests... Checking for gold linker... yes Checking for machine tuple... yes Checking for valid makespec... yes Checking for target architecture... arm Checking for host architecture... x86_64 Checking for alloca() in alloca.h... yes Checking for C++14 support... yes Checking for C++1z support... no Checking for C99 support... yes Checking for C11 support... yes Checking for pkg-config... no Checking for D-Bus >= 1.2... no Checking for new dtags support... yes Checking for D-Bus >= 1.2 (host)... yes Checking for udev... no Checking for POSIX fallocate()... yes Checking for precompiled header support... yes Checking for RDRAND instruction... no Checking for symbol visibility support... yes Checking for -Bsymbolic-functions support... no Checking for STL compatibility... yes Checking for zlib... no Checking for clock_gettime()... yes Checking for POSIX monotonic clock... yes Checking for C++11 <future>... yes Checking for dlopen()... yes Checking for eventfd... yes Checking for futimens()... yes Checking for getauxval()... yes Checking for getentropy()... no Checking for GLib... no Checking for POSIX iconv... yes Checking for ICU... no Checking for inotify... yes Checking for SysV IPC... yes Checking for linkat()... yes Checking for ppoll()... yes Checking for renameat2()... no Checking for slog2... no Checking for statx() in libc... no Checking for 64 bit atomics... yes Checking for DoubleConversion... no Checking for PCRE2... no Checking for O_CLOEXEC... yes Checking for C++11 <random>... yes Checking for working std::atomic for function pointers... yes Checking for OpenSSL Headers... no Checking for getifaddrs()... yes Checking for IPv6 ifname... yes Checking for Linux AF_NETLINK sockets... yes Checking for xkbcommon >= 0.5.0... no Checking for KMS... no Checking for OpenVG... no Checking for evdev... yes Checking for FreeType... no Checking for GBM... no Checking for LinuxFB... yes Checking for mtdev... no Checking for default QPA platform... eglfs Checking for HarfBuzz... no Checking for libjpeg... no Checking for tslib... no Checking for Vulkan... no Checking for XLib... no Checking for CUPS... no Checking for DB2 (IBM)... no Checking for InterBase... no Checking for MySQL... no Checking for OCI (Oracle)... no Checking for ODBC... no Checking for PostgreSQL... no Checking for SQLite (version 2)... no Checking for TDS (Sybase)... no Checking for Socket CAN... yes Checking for Socket CAN FD... yes Checking for C++14 make_unique()... yes Checking for Direct3D 12... no Checking for SDL2... no Checking for Assimp... no Checking for Autodesk FBX... no Checking for Wayland client library... no Checking for Wayland EGL library... no Checking for wayland-server... no Checking for BlueZ... no Checking for sensorfw... no Checking for Gypsy... no Checking for WinRT Geolocation API... no Checking for ALSA... no Checking for GStreamer 1.0... no Checking for GStreamer 0.10... no Checking for Video for Linux... yes Checking for OpenAL... no Checking for PulseAudio >= 0.9.10... no Checking for libresourceqt5... no Checking for libclang... no Checking for alsa... no Checking for embedded... yes Checking for thumb instruction set... /home/yash/QT5121/qt-everywhere-src-5.12.1/qtwebengine/configure.pri:300: 'extractCFlag' is not a recognized replace function. /home/yash/QT5121/qt-everywhere-src-5.12.1/qtwebengine/configure.pri:302: 'extractCFlag' is not a recognized replace function. /home/yash/QT5121/qt-everywhere-src-5.12.1/qtwebengine/configure.pri:305: 'extractCFlag' is not a recognized replace function. no Checking for bison... yes Checking for flex... yes Checking for gperf... no Checking for host pkg-config... /usr/bin/pkg-config Checking for poppler-cpp... no Checking for pulseaudio >= 0.9.10... no Checking for python2... /usr/bin/python2 Checking for d-bus... no Checking for fontconfig... no Checking for glib-2.0 >= 2.32.0... no Checking for glibc > 2.16... yes Checking for jsoncpp... no Checking for khr... no Checking for libdrm... no Checking for libevent... no Checking for libvpx... no Checking for libwebp, libwebpmux and libwebpdemux... no Checking for libxml2 and libxslt... no Checking for minizip... no Checking for system ninja... no Checking for nss >= 3.26... no Checking for opus... no Checking for protobuf... no Checking for re2... no Checking for snappy... no Checking for x11... no Checking for xcomposite... no Checking for xcursor... no Checking for xi... no Checking for xrandr... no Checking for xtst... no Checking for host compiler... no Done running configuration tests. Configure summary: Building on: linux-g++ (x86_64, CPU features: mmx sse sse2) Building for: devices/linux-beagleboard-g++ (arm, CPU features: neon) Target compiler: gcc 6.4.1 Configuration: cross_compile use_gold_linker compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 concurrent dbus no-pkg-config reduce_exports stl Build options: Mode ................................... release Optimize release build for size ........ no Building shared libraries .............. yes Using C standard ....................... C11 Using C++ standard ..................... C++14 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 .... no Qt Gui ................................. yes Qt Network ............................. yes Qt Sql ................................. yes Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Using pkg-config ....................... no udev ................................... no Using system zlib ...................... no Qt Core: DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... no iconv .................................. yes ICU .................................... no Tracing backend ........................ <none> Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no Using system PCRE2 ..................... no Qt Network: getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no Linux AF_NETLINK ....................... yes OpenSSL ................................ no Qt directly linked to OpenSSL ........ no OpenSSL 1.1 ............................ no DTLS ................................... no SCTP ................................... no Use system proxies ..................... yes Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ no HarfBuzz ............................... yes Using system HarfBuzz ................ no Fontconfig ............................. no Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... no PNG .................................. yes Using system libpng ................ no EGL .................................... no OpenVG ................................. no OpenGL: Desktop OpenGL ....................... no OpenGL ES 2.0 ........................ no OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no OpenGL ES 3.2 ........................ no Vulkan ................................. no Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... no INTEGRITY HID .......................... no mtdev .................................. no tslib .................................. no xkbcommon .............................. no X11 specific: XLib ................................. no EGL on X11 ........................... no QPA backends: DirectFB ............................... no EGLFS .................................. no LinuxFB ................................ yes VNC .................................... yes Mir client ............................. no Qt Sql: SQL item models ........................ yes Qt Widgets: GTK+ ................................... no Styles ................................. Fusion Windows Qt PrintSupport: CUPS ................................... no Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. no SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... no Qt Testlib: Tester for item models ................. yes Qt SerialBus: Socket CAN ............................. yes Socket CAN FD .......................... yes Qt QML: QML network support .................... yes QML debugging and profiling support .... yes QML sequence object .................... yes QML list model ......................... yes QML XML http request ................... yes QML Locale ............................. yes QML delegate model ..................... 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 TableView item ......................... yes Path support ........................... yes PathView item .......................... yes Positioner items ....................... yes Repeater item .......................... yes ShaderEffect item ...................... yes Sprite item ............................ yes Qt Scxml: ECMAScript data model for QtScxml ...... yes Qt Gamepad: SDL2 ................................... no Qt 3D: Assimp ................................. yes System Assimp .......................... no Output Qt3D Job traces ................. no Output Qt3D GL traces .................. no Use SSE2 instructions .................. no Use AVX2 instructions .................. no Aspects: Render aspect ........................ yes Input aspect ......................... yes Logic aspect ......................... yes Animation aspect ..................... yes Extras aspect ........................ yes Qt 3D Renderers: OpenGL Renderer ........................ yes Qt 3D GeometryLoaders: Autodesk FBX ........................... no Qt Wayland Client ........................ no Qt Wayland Compositor .................... no Qt Bluetooth: BlueZ .................................. no BlueZ Low Energy ....................... no Linux Crypto API ....................... no WinRT Bluetooth API (desktop & UWP) .... no Qt Sensors: sensorfw ............................... no Qt Quick Controls 2: Styles ................................. Default Fusion Imagine 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: Qt.labs.location experimental QML plugin . yes Geoservice plugins: OpenStreetMap ........................ yes HERE ................................. yes Esri ................................. yes Mapbox ............................... yes MapboxGL ............................. no Itemsoverlay ......................... yes QtXmlPatterns: XML schema support ..................... yes Qt Multimedia: ALSA ................................... no GStreamer 1.0 .......................... no GStreamer 0.10 ......................... no Video for Linux ........................ yes OpenAL ................................. no PulseAudio ............................. no Resource Policy (libresourceqt5) ....... no Windows Audio Services ................. no DirectShow ............................. no Windows Media Foundation ............... no Qt Tools: QDoc ................................... no Qt WebEngine: Embedded build ......................... yes Pepper Plugins ......................... no Printing and PDF ....................... no Proprietary Codecs ..................... no Spellchecker ........................... yes Native Spellchecker .................... no WebRTC ................................. no Use System Ninja ....................... no Geolocation ............................ yes WebChannel support ..................... yes Use v8 snapshot ........................ yes Kerberos Authentication ................ no Building v8 snapshot supported ......... no Use ALSA ............................... no Use PulseAudio ......................... no Optional system libraries used: re2 .................................. no icu .................................. no libwebp, libwebpmux and libwebpdemux . no opus ................................. no ffmpeg ............................... no libvpx ............................... no snappy ............................... no glib ................................. no zlib ................................. no minizip .............................. no libevent ............................. no jsoncpp .............................. no protobuf ............................. no libxml2 and libxslt .................. no lcms2 ................................ no png .................................. no JPEG ................................. no harfbuzz ............................. no freetype ............................. no x11 .................................. no Required system libraries: fontconfig ........................... no dbus ................................. no nss .................................. no khr .................................. no glibc ................................ yes Required system libraries for qpa-xcb: libdrm ............................... no xcomposite ........................... no xcursor .............................. no xi ................................... no xrandr ............................... no xtst ................................. no Note: No wayland-egl support detected. Cross-toolkit compatibility disabled. WARNING: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and the host's .pc files would be used (even if you set PKG_CONFIG_PATH). Set this variable to the directory that contains target .pc files for pkg-config to function correctly when cross-compiling or use -pkg-config to override this test. WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation. Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation. On Linux systems you may be able to install libclang from a package. On macOS you could use Homebrew's llvm package. On Windows you need to set LLVM_INSTALL_DIR to the installation path. WARNING: gperf is required to build QtWebEngine. WARNING: Thumb instruction set is required to build ffmpeg for QtWebEngine. Qt is now configured for building. Just run 'make'. Once everything is built, you must run 'make install'. Qt will be installed into '/home/yash/QT5121/sysroot-glibc-linaro-2.23-2018.05-arm-linux-gnueabihf//home/yash/Qt5ForBBB'. Prior to reconfiguration, make sure you remove any leftovers from the previous build.
And the below is the end of the sudo make install command:
make[2]: Leaving directory '/home/yash/QT5121/qt-everywhere-src-5.12.1/qttranslations/translations' make[1]: Leaving directory '/home/yash/QT5121/qt-everywhere-src-5.12.1/qttranslations' cd qtdoc/ && ( test -e Makefile || /home/yash/QT5121/qt-everywhere-src-5.12.1/qtbase/bin/qmake -o Makefile /home/yash/QT5121/qt-everywhere-src-5.12.1/qtdoc/qtdoc.pro ) && make -f Makefile install make[1]: Entering directory '/home/yash/QT5121/qt-everywhere-src-5.12.1/qtdoc' cd doc/ && ( test -e Makefile || /home/yash/QT5121/qt-everywhere-src-5.12.1/qtbase/bin/qmake -o Makefile /home/yash/QT5121/qt-everywhere-src-5.12.1/qtdoc/doc/doc.pro ) && make -f Makefile install make[2]: Entering directory '/home/yash/QT5121/qt-everywhere-src-5.12.1/qtdoc/doc' make[2]: Nothing to be done for 'install'. make[2]: Leaving directory '/home/yash/QT5121/qt-everywhere-src-5.12.1/qtdoc/doc' make[1]: Leaving directory '/home/yash/QT5121/qt-everywhere-src-5.12.1/qtdoc'
And somehow, following that guide, i can now succesfully use Qt for development for Beaglebone Black (even though there are some issues).
PS: I believe i was facing the since i was using qtcreator with a latest version (and not the version equivalent to the qt-source that was built, as recommended in that guide).
Also, is there any recent guide to build a new qt-source with cross-compilation for beaglebone black?
Thanks.