Qt WebEngine compilation error
-
I am configuring Qt commercial code from https://codereview.qt-project.org/qt/tqtc-qt5, branch = tqtc/lts-5.15.7. I need webengine and have got a pdf generation requirement for my project.
I am using the below command for configuration:
LDFLAGS="-L/home/user/ti-processor-sdk-linux-am335x-evm-09.01.00.001/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/lib -lstdc++" ~/tqtc-qt5/configure --verbose -platform linux-g++ -xplatform linux-arm-gnueabihf-g++ -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -sysroot /home/user/ti-processor-sdk-linux-am335x-evm-09.01.00.001/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi -prefix /home/user/qt5-build -commercial -confirm-license -release -gui -widgets -no-dbus -opengl -linuxfb -sql-sqlite -nomake examples -nomake tests -webengine-printing-and-pdf -tslib
Config.summary file looks like this:
Building for: linux-arm-gnueabihf-g++ (arm, CPU features: <none>) Target compiler: gcc 11.4.0 Configuration: cross_compile compile_examples enable_new_dtags largefile precompile_header shared shared rpath release c++11 c++14 c++17 c++1z concurrent 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++17 Using ccache ........................... no Using new DTAGS ........................ yes Relocatable ............................ yes Using precompiled headers .............. yes Using LTCG ............................. no Target compiler supports: NEON ................................. no Build parts ............................ libs Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... no 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 ....................... yes udev ................................... yes Using system zlib ...................... yes Zstandard support ...................... yes Qt Core: DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... yes iconv .................................. no ICU .................................... yes Built-in copy of the MIME database ..... yes Tracing backend ........................ <none> Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no PCRE2 .................................. yes Using system PCRE2 ................... no Qt Network: getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no Linux AF_NETLINK ....................... yes OpenSSL ................................ yes Qt directly linked to OpenSSL ........ no OpenSSL 1.1 ............................ yes DTLS ................................... yes OCSP-stapling .......................... yes SCTP ................................... no Use system proxies ..................... yes GSSAPI ................................. no Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ yes HarfBuzz ............................... yes Using system HarfBuzz ................ yes Fontconfig ............................. yes Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... yes PNG .................................. yes Using system libpng ................ yes Text formats: HtmlParser ........................... yes CssParser ............................ yes OdfWriter ............................ yes MarkdownReader ....................... yes Using system libmd4c ............... no MarkdownWriter ....................... yes EGL .................................... yes OpenVG ................................. no OpenGL: Desktop OpenGL ....................... yes OpenGL ES 2.0 ........................ no OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no OpenGL ES 3.2 ........................ no Vulkan ................................. yes Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... yes INTEGRITY HID .......................... no mtdev .................................. yes tslib .................................. yes xkbcommon .............................. yes X11 specific: XLib ................................. yes XCB Xlib ............................. yes EGL on X11 ........................... no xkbcommon-x11 ........................ yes QPA backends: DirectFB ............................... no EGLFS .................................. yes EGLFS details: EGLFS OpenWFD ........................ no EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS RCAR ........................... no EGLFS EGLDevice ...................... yes EGLFS GBM ............................ yes EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no EGLFS X11 ............................ no LinuxFB ................................ yes VNC .................................... yes XCB: Using system-provided xcb-xinput ..... yes Native painting (experimental) ....... no GL integrations: GLX Plugin ......................... yes XCB GLX .......................... yes EGL-X11 Plugin ..................... no Qt Sql: SQL item models ........................ yes Qt Widgets: GTK+ ................................... yes Styles ................................. Fusion Windows Qt PrintSupport: CUPS ................................... yes 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 Serial Port: ntddmodm ............................... no Qt SerialBus: Socket CAN ............................. yes Socket CAN FD .......................... yes SerialPort Support ..................... yes Further Image Formats: JasPer ................................. no MNG .................................... no TIFF ................................... yes Using system libtiff ................. yes WEBP ................................... yes Using system libwebp ................. yes Qt QML: QML network support .................... yes QML debugging and profiling support .... yes QML just-in-time compiler .............. yes QML sequence object .................... yes QML XML http request ................... yes QML Locale ............................. yes Qt QML Models: QML list model ......................... 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 Opcua: Open62541 .............................. yes Unified Automation C++ SDK ............. no Support for namespace 0 NodeId names ... yes Namespace 0 NodeIds generator .......... no mbedtls ................................ yes Support for global discovery server .... yes QtQuick3D: Assimp ................................. yes System Assimp .......................... no Qt Scxml: ECMAScript data model for QtScxml ...... yes Qt Gamepad: SDL2 ................................... no Qt 3D: Assimp ................................. yes System Assimp .......................... 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 RHI Renderer ........................... no Qt 3D GeometryLoaders: Autodesk FBX ........................... no Qt Wayland Drivers: EGL .................................... yes Raspberry Pi ........................... no XComposite EGL ......................... no XComposite GLX ......................... yes DRM EGL ................................ yes libhybris EGL .......................... no Linux dma-buf server buffer integration . yes Vulkan-based server buffer integration . yes Shm emulation server buffer integration . yes Qt Wayland Client Shell Integrations: xdg-shell .............................. yes xdg-shell unstable v5 (deprecated) ..... yes xdg-shell unstable v6 .................. yes ivi-shell .............................. yes wl-shell (deprecated) .................. yes Qt Wayland Client ........................ yes Qt Wayland Compositor .................... yes Qt Wayland Compositor Layer Plugins: VSP2 hardware layer integration ........ no Qt Bluetooth: BlueZ .................................. no BlueZ Low Energy ....................... no Linux Crypto API ....................... no Native Win32 Bluetooth ................. no WinRT Bluetooth API (desktop & UWP) .... no WinRT advanced bluetooth low energy 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 . no Geoservice plugins: OpenStreetMap ........................ yes HERE ................................. yes Esri ................................. yes Mapbox ............................... yes MapboxGL ............................. yes Itemsoverlay ......................... yes QtXmlPatterns: XML schema support ..................... 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 ............... no Qt TextToSpeech: Flite .................................. no Flite with ALSA ........................ no Speech Dispatcher ...................... no Qt Tools: Qt Assistant ........................... yes Qt Designer ............................ yes Qt Distance Field Generator ............ yes kmap2qmap .............................. yes Qt Linguist ............................ yes Mac Deployment Tool .................... no makeqpf ................................ yes pixeltool .............................. yes qdbus .................................. yes qev .................................... yes Qt Attributions Scanner ................ yes qtdiag ................................. yes qtpaths ................................ yes qtplugininfo ........................... yes Windows deployment tool ................ no WinRT Runner Tool ...................... no Qt Tools: QDoc ................................... no Qt WebEngine Build Tools: Use System Ninja ....................... yes Jumbo Build Merge Limit ................ 8 Developer build ........................ no Sanitizer .............................. no QtWebEngine required system libraries: fontconfig ........................... yes dbus ................................. yes nss .................................. yes khr .................................. yes glibc ................................ yes QtWebEngine required system libraries for qpa-xcb: x11 .................................. yes libdrm ............................... yes xcomposite ........................... yes xcursor .............................. yes xi ................................... yes xproto (glproto) ..................... yes xtst ................................. yes xkbfile .............................. yes Optional system libraries used: re2 .................................. no icu .................................. no libwebp, libwebpmux and libwebpdemux . yes opus ................................. no ffmpeg ............................... no libvpx ............................... no snappy ............................... no glib ................................. yes zlib ................................. yes minizip .............................. no libevent ............................. no libxml2 and libxslt .................. no lcms2 ................................ no png .................................. yes JPEG ................................. yes harfbuzz ............................. yes freetype ............................. yes Qt WebEngineCore: Embedded build ......................... yes Full debug information ................. no Pepper Plugins ......................... no Printing and PDF ....................... yes Proprietary Codecs ..................... no Spellchecker ........................... yes Native Spellchecker .................... no WebRTC ................................. no PipeWire over GIO ...................... no Geolocation ............................ yes WebChannel support ..................... yes Kerberos Authentication ................ no Extensions ............................. yes Support qpa-xcb ........................ yes Building v8 snapshot supported ......... yes Use ALSA ............................... yes Use PulseAudio ......................... yes Qt WebEngineQml: Support Qt WebEngine Qml ............... yes UI Delegates ........................... yes Test Support ........................... no Qt WebEngineWidgets: Support Qt WebEngine Widgets ........... yes Qt PDF: Support V8 ............................. no Support XFA ............................ no Support XFA-BMP ........................ no Support XFA-GIF ........................ no Support XFA-PNG ........................ no Support XFA-TIFF ....................... no Qt PDF Widgets: Support Qt PDF Widgets ................. yes Note: PKG_CONFIG_LIBDIR automatically set to /home/user/ti-processor-sdk-linux-am335x-evm-09.01.00.001/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/lib/pkgconfig:/home/user/ti-processor-sdk-linux-am335x-evm-09.01.00.001/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/share/pkgconfig:/home/user/ti-processor-sdk-linux-am335x-evm-09.01.00.001/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/lib/arm-linux-gnueabihf/pkgconfig Note: PKG_CONFIG_SYSROOT_DIR automatically set to /home/user/ti-processor-sdk-linux-am335x-evm-09.01.00.001/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing. 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 by installing the libclang-dev or libclang-devel package, depending on your distribution. On macOS, you can use Homebrew's llvm package. On Windows, you must set LLVM_INSTALL_DIR to the installation path. WARNING: Thumb instruction set is required to build ffmpeg for QtWebEngine.
I am running make command after the successful configuration and getting output as below.
/usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: /home/user/qt5-build/qtbase/lib/libQt5Test.so: undefined reference to `std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.30' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:69: ../../bin/qmltestrunner] Error 1 make[3]: Leaving directory '/home/user/qt5-build/qtdeclarative/tools/qmltestrunner' make[2]: *** [Makefile:359: sub-qmltestrunner-make_first] Error 2 make[2]: Leaving directory '/home/user/qt5-build/qtdeclarative/tools' make[1]: *** [Makefile:75: sub-tools-make_first] Error 2 make[1]: Leaving directory '/home/user/qt5-build/qtdeclarative' make: *** [Makefile:397: module-qtdeclarative-make_first] Error 2
Please help me to resolve the linker error and proceed further for installation. Let me know if full make log is required.
-
Hi,
Since you have a commercial license, you should contact the Qt Company support.
-
The fact that you are using the open source sources does not change my initial suggestion: you have a commercial license so you can request the Qt Company's help.
Do you have multiple versions of libstdc++ in your sysroot ?
On a side note, your thread title is misleading, you haven't even reached webengine yet in your build.
-
I have reached out to the Qt company for help. However, I have a standard license and hence it will take 1-2 days for their response. I have only one version of libstdc++ in the sysroots. I am getting the linker errors only when I added the "-webengine-printing-and-pdf" to the configure command. Without this, I was able to configure and compile Qt from source. Could you please help me what am I missing? I am doing this for the first time.
My configure command looks like this:
LDFLAGS="-L/home/user/ti-processor-sdk-linux-am335x-evm-09.01.00.001/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/lib -lstdc++" ~/tqtc-qt5/configure --verbose -platform linux-g++ -xplatform linux-arm-gnueabihf-g++ -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -sysroot /home/user/ti-processor-sdk-linux-am335x-evm-09.01.00.001/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi -prefix /home/user/qt5-build -commercial -confirm-license -release -gui -widgets -no-dbus -opengl -linuxfb -sql-sqlite -nomake examples -nomake tests -webengine-printing-and-pdf -tslib
Below are the search results from the sysroots.
user@ip:~/ti-processor-sdk-linux-am335x-evm-09.01.00.001$ find . -name libstdc++.so* ./linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/lib/libstdc++.so.6 ./linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/lib/libstdc++.so.6.0.29 ./linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/lib/libstdc++.so ./linux-devkit/sysroots/x86_64-arago-linux/usr/lib/libstdc++.so.6 ./linux-devkit/sysroots/x86_64-arago-linux/usr/lib/libstdc++.so.6.0.29 ./external-toolchain-dir/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/lib/libstdc++.so.6 ./external-toolchain-dir/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/lib/libstdc++.so.6.0.29-gdb.py ./external-toolchain-dir/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/lib/libstdc++.so.6.0.29 ./external-toolchain-dir/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/lib/libstdc++.so ./external-toolchain-dir/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/lib/libstdc++.so.6 ./external-toolchain-dir/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/lib/libstdc++.so.6.0.29-gdb.py ./external-toolchain-dir/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/lib/libstdc++.so.6.0.29 ./external-toolchain-dir/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/lib/libstdc++.so
However, x86 has a different version of the libstdc++.so.
user@ip:/usr/lib$ !find find . -name libstdc++.so* ./i386-linux-gnu/libstdc++.so.6 ./i386-linux-gnu/libstdc++.so.6.0.30 ./gcc/x86_64-linux-gnu/11/32/libstdc++.so ./gcc/x86_64-linux-gnu/11/x32/libstdc++.so ./gcc/x86_64-linux-gnu/11/libstdc++.so ./x86_64-linux-gnu/libstdc++.so.6 ./x86_64-linux-gnu/libstdc++.so.6.0.30 ./gcc-cross/arm-linux-gnueabihf/11/libstdc++.so
-
Before diving deeper in that stuff, you wrote that you can build Qt without issue when webengine is disabled. What about building Qt like that and then manually you try to build WebEngine and PDF ?