Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Build failing for Qt6 (Cross Compiling for STM32 armv7ve)

Build failing for Qt6 (Cross Compiling for STM32 armv7ve)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
13 Posts 3 Posters 3.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • kkoehneK Offline
    kkoehneK Offline
    kkoehne
    Moderators
    wrote on last edited by
    #2

    @Athem said in Build failing for Qt6 (Cross Compiling for STM32 armv7ve):

    Brotli Decompression Support ........... no
    [...]
    /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lbrotlidec

    This is weird, because configure reports brotli as not found, so -lbrotlidec shouldn't be added.

    Can you try with a completely clean build (in particular, get rid of the CMakeCache.txt file?)

    Director R&D, The Qt Company

    A 1 Reply Last reply
    0
    • A Offline
      A Offline
      Athem
      wrote on last edited by
      #3
      This post is deleted!
      1 Reply Last reply
      0
      • kkoehneK kkoehne

        @Athem said in Build failing for Qt6 (Cross Compiling for STM32 armv7ve):

        Brotli Decompression Support ........... no
        [...]
        /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lbrotlidec

        This is weird, because configure reports brotli as not found, so -lbrotlidec shouldn't be added.

        Can you try with a completely clean build (in particular, get rid of the CMakeCache.txt file?)

        A Offline
        A Offline
        Athem
        wrote on last edited by
        #4

        @kkoehne I retook the clone of the qtbase 6.0.0 and reconfigured, then built and now it gets stuck with similar error:

        [598/1478] Building CXX object src/network/CMakeFiles/Network.dir/access/qdecompresshelper.cpp.o
        FAILED: src/network/CMakeFiles/Network.dir/access/qdecompresshelper.cpp.o
        /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/home/pi/rpi-sdk/sysroot -DNetwork_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_NETWORK_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_USING_NAMESPACE -DQT_USE_QSTRINGBUILDER -DQT_USE_SYSTEM_PROXIES -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/Network_autogen/include -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtNetwork -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/kernel -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtNetwork/6.0.0 -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtNetwork/6.0.0/QtNetwork -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtCore -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/mkspecs/linux-g++ -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/corelib -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtCore/6.0.0 -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtCore/6.0.0/QtCore -fPIC -Wl,-rpath-link,/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -pthread -std=c++1z -Winvalid-pch -include /home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/CMakeFiles/Network.dir/cmake_pch.hxx -MD -MT src/network/CMakeFiles/Network.dir/access/qdecompresshelper.cpp.o -MF src/network/CMakeFiles/Network.dir/access/qdecompresshelper.cpp.o.d -o src/network/CMakeFiles/Network.dir/access/qdecompresshelper.cpp.o -c /home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/access/qdecompresshelper.cpp
        /home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/access/qdecompresshelper.cpp:48:14: fatal error: brotli/decode.h: No such file or directory

        include <brotli/decode.h>

                  ^~~~~~~~~~~~~~~~~
        

        compilation terminated.
        [601/1478] Building CXX object src/network/CMakeFiles/Network.dir/access/qabstractprotocolhandler.cpp.o
        ninja: build stopped: subcommand failed.

        jsulmJ 1 Reply Last reply
        0
        • A Athem

          @kkoehne I retook the clone of the qtbase 6.0.0 and reconfigured, then built and now it gets stuck with similar error:

          [598/1478] Building CXX object src/network/CMakeFiles/Network.dir/access/qdecompresshelper.cpp.o
          FAILED: src/network/CMakeFiles/Network.dir/access/qdecompresshelper.cpp.o
          /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/home/pi/rpi-sdk/sysroot -DNetwork_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_NETWORK_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_USING_NAMESPACE -DQT_USE_QSTRINGBUILDER -DQT_USE_SYSTEM_PROXIES -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/Network_autogen/include -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtNetwork -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/kernel -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtNetwork/6.0.0 -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtNetwork/6.0.0/QtNetwork -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtCore -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/mkspecs/linux-g++ -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/corelib -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtCore/6.0.0 -I/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/include/QtCore/6.0.0/QtCore -fPIC -Wl,-rpath-link,/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -pthread -std=c++1z -Winvalid-pch -include /home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/CMakeFiles/Network.dir/cmake_pch.hxx -MD -MT src/network/CMakeFiles/Network.dir/access/qdecompresshelper.cpp.o -MF src/network/CMakeFiles/Network.dir/access/qdecompresshelper.cpp.o.d -o src/network/CMakeFiles/Network.dir/access/qdecompresshelper.cpp.o -c /home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/access/qdecompresshelper.cpp
          /home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/access/qdecompresshelper.cpp:48:14: fatal error: brotli/decode.h: No such file or directory

          include <brotli/decode.h>

                    ^~~~~~~~~~~~~~~~~
          

          compilation terminated.
          [601/1478] Building CXX object src/network/CMakeFiles/Network.dir/access/qabstractprotocolhandler.cpp.o
          ninja: build stopped: subcommand failed.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #5

          @Athem said in Build failing for Qt6 (Cross Compiling for STM32 armv7ve):

          fatal error: brotli/decode.h: No such file or directory

          This is now compiler error.
          Did you install brotli dev package which contains the header files?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          A 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Athem said in Build failing for Qt6 (Cross Compiling for STM32 armv7ve):

            fatal error: brotli/decode.h: No such file or directory

            This is now compiler error.
            Did you install brotli dev package which contains the header files?

            A Offline
            A Offline
            Athem
            wrote on last edited by
            #6

            @jsulm said in Build failing for Qt6 (Cross Compiling for STM32 armv7ve):

            brotli dev package

            yes. I have it installed. I tried reinstalling it and it confirmed that it already had it:
            sudo apt-get install libbrotli-dev
            Reading package lists... Done
            Building dependency tree... Done
            Reading state information... Done
            libbrotli-dev is already the newest version (1.0.9-2build6).
            libbrotli-dev set to manually installed.
            0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

            jsulmJ 1 Reply Last reply
            0
            • A Athem

              @jsulm said in Build failing for Qt6 (Cross Compiling for STM32 armv7ve):

              brotli dev package

              yes. I have it installed. I tried reinstalling it and it confirmed that it already had it:
              sudo apt-get install libbrotli-dev
              Reading package lists... Done
              Building dependency tree... Done
              Reading state information... Done
              libbrotli-dev is already the newest version (1.0.9-2build6).
              libbrotli-dev set to manually installed.
              0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #7

              @Athem Can you search for decode.h from brotly on your system? And post the path to it. Maybe your OS packes brotli headers differently.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              A 1 Reply Last reply
              0
              • jsulmJ jsulm

                @Athem Can you search for decode.h from brotly on your system? And post the path to it. Maybe your OS packes brotli headers differently.

                A Offline
                A Offline
                Athem
                wrote on last edited by Athem
                #8

                @jsulm I reconfigured after deleting the cache by adding -DQT_FEATURE_brotli=OFF argument in the configure command, so the output of configure confirmed the brotli being off. Now when I gave "cmake --build . --parallel 4" command, it got stuck at another place in network: I am starting to think network modules are a pain to compile (or maybe I am making a mistake somewhere).

                Edit: the configure command goes as following:
                cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_FEATURE_eglfs_egldevice=ON -DQT_FEATURE_eglfs_gbm=ON -DQT_FEATURE_brotli=OFF -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=/home/pi/qt-host/6.0.0/gcc_64/ -DCMAKE_STAGING_PREFIX=/home/pi/qt6-rpi -DCMAKE_INSTALL_PREFIX=/usr/local/qt6 -DCMAKE_PREFIX_PATH=/home/pi/rpi-sdk/sysroot/usr/lib/ -DCMAKE_TOOLCHAIN_FILE=/home/pi/qt-cross/toolchain.cmake /home/pi/qt-cross/qtbase-everywhere-src-6.0.0/

                Build Result:

                523/1478] Automatic MOC for target Network
                AutoMoc: /home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/access/qnetworkaccessdebugpipebackend_p.h:0:1: note: No relevant classes found. No output generated.
                [634/1478] Linking CXX executable bin/uic
                FAILED: bin/uic
                : && /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/home/pi/rpi-sdk/sysroot -fPIC -Wl,-rpath-link,/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -DNDEBUG -O2 -fPIC -Wl,-rpath-link,/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf src/tools/uic/CMakeFiles/uic_native.dir/uic_native_autogen/mocs_compilation.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/cpp/cppwritedeclaration.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/cpp/cppwriteincludes.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/cpp/cppwriteinitialization.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/customwidgetsinfo.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/databaseinfo.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/driver.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/main.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/python/pythonwritedeclaration.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/python/pythonwriteimports.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/shared/language.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/treewalker.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/ui4.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/uic.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/validator.cpp.o -o bin/uic -Wl,-rpath,/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/lib: lib/libQt6Core.so.6.0.0 -pthread && :
                /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libz.so.1, needed by lib/libQt6Core.so.6.0.0, not found (try using -rpath or -rpath-link)
                /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libdl.so.2, needed by lib/libQt6Core.so.6.0.0, not found (try using -rpath or -rpath-link)
                /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libpcre.so.3, needed by /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0, not found (try using -rpath or -rpath-link)
                lib/libQt6Core.so.6.0.0: undefined reference to dlopen@GLIBC_2.4' lib/libQt6Core.so.6.0.0: undefined reference to dlsym@GLIBC_2.4'
                /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_exec' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_study'
                /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_dfa_exec' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_fullinfo'
                lib/libQt6Core.so.6.0.0: undefined reference to inflateInit2_' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_get_stringnumber'
                /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_compile2' lib/libQt6Core.so.6.0.0: undefined reference to dlerror@GLIBC_2.4'
                lib/libQt6Core.so.6.0.0: undefined reference to dlclose@GLIBC_2.4' lib/libQt6Core.so.6.0.0: undefined reference to dladdr@GLIBC_2.4'
                lib/libQt6Core.so.6.0.0: undefined reference to inflate' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_get_stringtable_entries'
                lib/libQt6Core.so.6.0.0: undefined reference to compress2' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_free'
                lib/libQt6Core.so.6.0.0: undefined reference to uncompress' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_config'
                lib/libQt6Core.so.6.0.0: undefined reference to `inflateEnd'
                collect2: error: ld returned 1 exit status
                [637/1478] Building CXX object src/xml/CMakeFiles/Xml.dir/cmake_pch.hxx.gch
                ninja: build stopped: subcommand failed.

                A 1 Reply Last reply
                0
                • A Athem

                  @jsulm I reconfigured after deleting the cache by adding -DQT_FEATURE_brotli=OFF argument in the configure command, so the output of configure confirmed the brotli being off. Now when I gave "cmake --build . --parallel 4" command, it got stuck at another place in network: I am starting to think network modules are a pain to compile (or maybe I am making a mistake somewhere).

                  Edit: the configure command goes as following:
                  cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_FEATURE_eglfs_egldevice=ON -DQT_FEATURE_eglfs_gbm=ON -DQT_FEATURE_brotli=OFF -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=/home/pi/qt-host/6.0.0/gcc_64/ -DCMAKE_STAGING_PREFIX=/home/pi/qt6-rpi -DCMAKE_INSTALL_PREFIX=/usr/local/qt6 -DCMAKE_PREFIX_PATH=/home/pi/rpi-sdk/sysroot/usr/lib/ -DCMAKE_TOOLCHAIN_FILE=/home/pi/qt-cross/toolchain.cmake /home/pi/qt-cross/qtbase-everywhere-src-6.0.0/

                  Build Result:

                  523/1478] Automatic MOC for target Network
                  AutoMoc: /home/pi/qt-cross/qtbase-everywhere-src-6.0.0/src/network/access/qnetworkaccessdebugpipebackend_p.h:0:1: note: No relevant classes found. No output generated.
                  [634/1478] Linking CXX executable bin/uic
                  FAILED: bin/uic
                  : && /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/home/pi/rpi-sdk/sysroot -fPIC -Wl,-rpath-link,/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -DNDEBUG -O2 -fPIC -Wl,-rpath-link,/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf src/tools/uic/CMakeFiles/uic_native.dir/uic_native_autogen/mocs_compilation.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/cpp/cppwritedeclaration.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/cpp/cppwriteincludes.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/cpp/cppwriteinitialization.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/customwidgetsinfo.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/databaseinfo.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/driver.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/main.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/python/pythonwritedeclaration.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/python/pythonwriteimports.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/shared/language.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/treewalker.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/ui4.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/uic.cpp.o src/tools/uic/CMakeFiles/uic_native.dir/validator.cpp.o -o bin/uic -Wl,-rpath,/home/pi/qt-cross/qtbase-everywhere-src-6.0.0/lib: lib/libQt6Core.so.6.0.0 -pthread && :
                  /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libz.so.1, needed by lib/libQt6Core.so.6.0.0, not found (try using -rpath or -rpath-link)
                  /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libdl.so.2, needed by lib/libQt6Core.so.6.0.0, not found (try using -rpath or -rpath-link)
                  /home/pi/rpi-sdk/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libpcre.so.3, needed by /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0, not found (try using -rpath or -rpath-link)
                  lib/libQt6Core.so.6.0.0: undefined reference to dlopen@GLIBC_2.4' lib/libQt6Core.so.6.0.0: undefined reference to dlsym@GLIBC_2.4'
                  /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_exec' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_study'
                  /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_dfa_exec' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_fullinfo'
                  lib/libQt6Core.so.6.0.0: undefined reference to inflateInit2_' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_get_stringnumber'
                  /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_compile2' lib/libQt6Core.so.6.0.0: undefined reference to dlerror@GLIBC_2.4'
                  lib/libQt6Core.so.6.0.0: undefined reference to dlclose@GLIBC_2.4' lib/libQt6Core.so.6.0.0: undefined reference to dladdr@GLIBC_2.4'
                  lib/libQt6Core.so.6.0.0: undefined reference to inflate' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_get_stringtable_entries'
                  lib/libQt6Core.so.6.0.0: undefined reference to compress2' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_free'
                  lib/libQt6Core.so.6.0.0: undefined reference to uncompress' /home/pi/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: undefined reference to pcre_config'
                  lib/libQt6Core.so.6.0.0: undefined reference to `inflateEnd'
                  collect2: error: ld returned 1 exit status
                  [637/1478] Building CXX object src/xml/CMakeFiles/Xml.dir/cmake_pch.hxx.gch
                  ninja: build stopped: subcommand failed.

                  A Offline
                  A Offline
                  Athem
                  wrote on last edited by
                  #9

                  @Athem Since the issue involes moc and uic, I found the following mentioned in the Qt website: "By default, when cross-compiling, only the Qt libraries and tools that are supposed to run on the target device are built. Build-related tools like moc and uic are not built. Building such tools can be enabled by setting QT_FORCE_BUILD_TOOLS to ON."
                  source

                  Can someone tell me how can I pass QT_FORCE_BUILD_TOOLS to ON? I tried adding it to configure command but it ignores it.

                  jsulmJ 1 Reply Last reply
                  0
                  • A Athem

                    @Athem Since the issue involes moc and uic, I found the following mentioned in the Qt website: "By default, when cross-compiling, only the Qt libraries and tools that are supposed to run on the target device are built. Build-related tools like moc and uic are not built. Building such tools can be enabled by setting QT_FORCE_BUILD_TOOLS to ON."
                    source

                    Can someone tell me how can I pass QT_FORCE_BUILD_TOOLS to ON? I tried adding it to configure command but it ignores it.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    @Athem

                    configure ... -- -DQT_FORCE_BUILD_TOOLS=ON
                    

                    -- is important (see https://doc-snapshots.qt.io/qt6-dev/configure-linux-device.html)!

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    A 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @Athem

                      configure ... -- -DQT_FORCE_BUILD_TOOLS=ON
                      

                      -- is important (see https://doc-snapshots.qt.io/qt6-dev/configure-linux-device.html)!

                      A Offline
                      A Offline
                      Athem
                      wrote on last edited by Athem
                      #11

                      @jsulm I read here https://codereview.qt-project.org/c/qt%2Fqtdeclarative/+/375768 that if the QTBuildTools are disabled, then qml, qmlscene and qmlpreview have issues when cross compiling. The same issue I am facing when trying to add qtDeclarative on top of the already cross compilled base module:
                      [1/2] Linking CXX executable bin/qmlpreview FAILED: bin/qmlpreview
                      [2/2] Linking CXX executable bin/qml FAILED: bin/qml

                      Do you know about it?

                      1 Reply Last reply
                      0
                      • kkoehneK Offline
                        kkoehneK Offline
                        kkoehne
                        Moderators
                        wrote on last edited by
                        #12

                        @Athem , any particular reason you're using Qt 6.0.0? I recommend at least Qt 6.2 (or, better: Qt 6.3). Quite some cross-compiling issues have been fixed since Qt 6.0.0 ...

                        Director R&D, The Qt Company

                        A 1 Reply Last reply
                        0
                        • kkoehneK kkoehne

                          @Athem , any particular reason you're using Qt 6.0.0? I recommend at least Qt 6.2 (or, better: Qt 6.3). Quite some cross-compiling issues have been fixed since Qt 6.0.0 ...

                          A Offline
                          A Offline
                          Athem
                          wrote on last edited by Athem
                          #13

                          @kkoehne I am also facing the same error on Qt 6.3.0 while adding qtDeclarative on the of the cross compiled QT6.3.0 for the STM32.
                          Edit: I added QtShaders and that compiled successfully.

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved