Qt cross-compilation can't detect PKG_CONFIG libs
Solved
Installation and Deployment
-
Re: Why qt config can't detect gstreamer sources?
I have to reopen this issue. Also I found a similar theme on the Qt's bug tracker.
I have already cross-compiled set of libraries:$ ls /home/eugene/Desktop/QtBuilder/sysroot/lib/pkgconfig expat.pc glib-2.0.pc gstreamer-1.0.pc gstreamer-check-1.0.pc gstreamer-plugins-base-1.0.pc gstreamer-tag-1.0.pc libjpeg.pc libxml-2.0.pc wayland-egl-backend.pc fontconfig.pc gmodule-2.0.pc gstreamer-allocators-1.0.pc gstreamer-controller-1.0.pc gstreamer-riff-1.0.pc gstreamer-video-1.0.pc libpcre2-8.pc libxslt.pc wayland-egl.pc freetype2.pc gmodule-export-2.0.pc gstreamer-app-1.0.pc gstreamer-fft-1.0.pc gstreamer-rtp-1.0.pc gthread-2.0.pc libpcre2-posix.pc uuid.pc wayland-scanner.pc gio-2.0.pc gmodule-no-export-2.0.pc gstreamer-audio-1.0.pc gstreamer-net-1.0.pc gstreamer-rtsp-1.0.pc libexslt.pc libpng16.pc wayland-client.pc wayland-server.pc gio-unix-2.0.pc gobject-2.0.pc gstreamer-base-1.0.pc gstreamer-pbutils-1.0.pc gstreamer-sdp-1.0.pc libffi.pc libpng.pc wayland-cursor.pc zlib.pc
Also I tried to set variables PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR:
export PKG_CONFIG=/home/eugene/Desktop/QtBuilder/sysroot/lib/pkgconfig or export PKG_CONFIG_LIBDIR=/home/eugene/Desktop/QtBuilder/sysroot/lib/pkgconfig
But without success, Qt can't see glib, gstreamer, fontconfig and etc...
Qt config:./configure \ -opensource -confirm-license \ -device imx6 \ -device-option CROSS_COMPILE=/home/eugene/Desktop/QtBuilder/cache/gcc-arm-8.2-2018.11-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf- \ -force-pkg-config \ -sysroot /home/eugene/Desktop/QtBuilder/sysroot \ -device-option PKG_CONFIG='pkg-config' \ -pkg-config \ -force-pkg-config \ -prefix / \ -glib \ -fontconfig \ -system-pcre \ -system-zlib \ -system-libjpeg \ -system-libpng \ -no-opengl \ -no-gcc-sysroot \ -no-use-gold-linker \ -nomake tools \ -nomake tests \ -nomake examples \ -v
As result I have got:
Configure summary: Building on: linux-g++ (x86_64, CPU features: mmx sse sse2) Building for: devices/linux-imx6-g++ (arm, CPU features: neon) Target compiler: gcc 5.4.0 Configuration: cross_compile compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 c++1z 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++1z Using ccache ........................... no Using gold linker ...................... no 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-evdev ........................ 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 WebEngine: Embedded build ......................... yes Pepper Plugins ......................... no Printing and PDF ....................... no Proprietary Codecs ..................... no Spellchecker ........................... yes Native Spellchecker .................... no WebRTC ................................. no Use System Ninja ....................... yes 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: Also available for Linux: linux-clang linux-icc Note: No wayland-egl support detected. Cross-toolkit compatibility disabled. ERROR: Feature 'pkg-config' was enabled, but the pre-condition 'tests.pkg-config' failed. ERROR: Feature 'system-zlib' was enabled, but the pre-condition 'libs.zlib' failed. ERROR: Feature 'glib' was enabled, but the pre-condition 'libs.glib' failed. ERROR: Feature 'system-pcre2' was enabled, but the pre-condition 'libs.pcre2' failed. ERROR: Feature 'fontconfig' was enabled, but the pre-condition '!config.win32 && features.system-freetype && libs.fontconfig' failed. ERROR: Feature 'system-jpeg' was enabled, but the pre-condition 'features.jpeg && libs.libjpeg' failed. ERROR: Feature 'system-png' was enabled, but the pre-condition 'features.png && libs.libpng' failed.
Also why target compiler is linux-g++ 5.4 (not arm-linux-gnueabi-g++ 8)?
When target compilation will use arm-linux-gnueabi:$ /home/eugene/Desktop/QtBuilder/cache/gcc-arm-8.2-2018.11-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --version arm-linux-gnueabihf-g++ (GNU Toolchain for the A-profile Architecture 8.2-2018.11 (arm-rel-8.26)) 8.2.1 20180802 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Any ideas?
Thanks! -
@r3d9u11 Also pkg-config ouput:
$ pkg-config --libs gstreamer-1.0 -L/mnt/data/LinuxHome/Software/QtBuilder/sysroot/lib -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 $ pkg-config --libs glib-2.0 -L/mnt/data/LinuxHome/Software/QtBuilder/sysroot/lib -lglib-2.0 $ pkg-config --libs zlib -L/mnt/data/LinuxHome/Software/QtBuilder/sysroot/lib -lz $ pkg-config --libs libpng -L/mnt/data/LinuxHome/Software/QtBuilder/sysroot/lib -lpng16 -lz $ pkg-config --libs libjpeg -L/mnt/data/LinuxHome/Software/QtBuilder/sysroot/lib -ljpeg $ pkg-config --libs fontconfig -L/mnt/data/LinuxHome/Software/QtBuilder/sysroot/lib -lfontconfig -lfreetype
Note:
/home/eugene/Desktop/QtBuilder/sysroot
is a symlink to
/mnt/data/LinuxHome/Software/QtBuilder/sysroot