Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QT 5.15.0 cross-compile from source fails

    QtonPi
    2
    5
    3643
    Loading More Posts
    • 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.
    • S
      svcguy last edited by

      Hello,

      I am hoping someone out there can help with getting QT to cross compile to RPI4. Here are the details:

      Host System: WIN10
      Target System: RPI4 (2020-05-27-raspios-buster-lite-armhf)
      Native Compiler: 8.1.0-1-202004170606i686-8.1.0-release-posix-dwarf-rt_v6-rev0 (downloaded from QT)
      Cross Compiler: raspberry-gcc8.3.0-r2 (downloaded from gnutoolchains.com)
      QT Source: qt-everywhere-src-5.15.0

      I'm building in a MSYS2 enviornment (msys2-x86_64-20200720) and following a tutorial from a post on this forum which is based on this tutorial with the only thing changed is updated versions of the tools.

      Thus far, I have been able to build qmake and configure (not sure if the config is exactly correct for the target system). The error occurs whenever make is trying to use qmltyperegistrar.exe for anything. Since I'm running make -j4, the build fails at different places but with the same error: "Bad Address"

      'C:\SysGCC\qt-build\qtdeclarative\bin\qmltyperegistrar.exe' --generate-qmltypes=plugins.qmltypes --import-name=Qt.test.qtestroot --major-version=1 --minor-version=0 --foreign-types=C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw32/msys2/usr/local/qt5/lib/metatypes/qt5test_metatypes.json,C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw32/msys2/usr/local/qt5/lib/metatypes/qt5widgets_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5quick_metatypes.json,C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw32/msys2/usr/local/qt5/lib/metatypes/qt5gui_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5qmlmodels_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5qml_metatypes.json,C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw32/msys2/usr/local/qt5/lib/metatypes/qt5network_metatypes.json,C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw32/msys2/usr/local/qt5/lib/metatypes/qt5core_metatypes.json --private-includes -o qt5quicktest_qmltyperegistrations.cpp qt5quicktest_metatypes.json
      make[3]: execvp: C:\SysGCC\qt-build\qtdeclarative\bin\qmltyperegistrar.exe: Bad address
      make[3]: *** [Makefile:742: qt5quicktest_qmltyperegistrations.cpp] Error 127
      make[3]: *** Waiting for unfinished jobs....
      make[3]: Leaving directory '/c/SysGCC/qt-build/qtdeclarative/src/qmltest'
      make[2]: *** [Makefile:317: sub-qmltest-make_first-ordered] Error 2
      make[2]: Leaving directory '/c/SysGCC/qt-build/qtdeclarative/src'
      make[1]: *** [Makefile:50: sub-src-make_first] Error 2
      make[1]: Leaving directory '/c/SysGCC/qt-build/qtdeclarative'
      make: *** [Makefile:340: module-qtdeclarative-make_first] Error 2
      

      This is a bit cryptic, of course. So I tried running the command make is trying to run on both the MSYS2 command line and the native Windows command line and the result is the same:

      PS C:\SysGCC\qt-build> C:\SysGCC\qt-build\qtdeclarative\bin\qmltyperegistrar.exe --generate-qmltypes=plugins.qmltypes --import-name=Qt.test.qtestroot --major-version=1 --minor-version=0 --foreign-types=C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw32/msys2/usr/local/qt5/lib/metatypes/qt5test_metatypes.json,C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw32/msys2/usr/local/qt5/lib/metatypes/qt5widgets_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5quick_metatypes.json,C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw32/msys2/usr/local/qt5/lib/metatypes/qt5gui_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5qmlmodels_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5qml_metatypes.json,C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw32/msys2/usr/local/qt5/lib/metatypes/qt5network_metatypes.json,C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw32/msys2/usr/local/qt5/lib/metatypes/qt5core_metatypes.json --private-includes -o qt5quicktest_qmltyperegistrations.cpp qt5quicktest_metatypes.json
      Error opening qt5quicktest_metatypes.json for reading
      

      Again, this happens at different build steps but they always involve qmltyperegistrar.exe. This executable seems to run fine on its own:

      svcgu@SURFACE MINGW32 /c/SysGCC/qt-build/qtdeclarative/bin
      $ ./qmltyperegistrar.exe -?
      Usage: C:\SysGCC\qt-build\qtdeclarative\bin\qmltyperegistrar.exe [options] [MOC generated json file]
      
      Options:
        -?, -h, --help                       Displays help on commandline options.
        --help-all                           Displays help including Qt specific
                                             options.
        -v, --version                        Displays version information.
        -o <file>                            Write output to specified file.
        --private-includes                   Include headers ending in "_p.h" using
                                             "#include <private/foo_p.h>"rather than
                                             "#include <foo_p.h>".
        --import-name <module name>          Name of the module to use for type and
                                             module registrations.
        --major-version <major version>      Major version to use for type and module
                                             registrations.
        --minor-version <minor version>      Minor version to use for module
                                             registration.
        --generate-qmltypes <qmltypes file>  Generate qmltypes into specified file.
        --foreign-types <foreign types>      Comma separated list of other modules'
      

      And the file in question seems to be ok: (partial copy of \qtdeclaritive\lib\metatypes\qt5quicktest_metatypes.json)

      [
          {
              "classes": [
                  {
                      "classInfos": [
                          {
                              "name": "QML.Singleton",
                              "value": "true"
                          },
                          {
                              "name": "QML.Element",
                              "value": "auto"
                          }
                      ],
                      "className": "QTestRootObject",
                      "object": true,
                      "properties": [
                          {
                              "constant": false,
                              "designable": true,
                              "final": false,
                              "name": "windowShown",
                              "notify": "windowShownChanged",
                              "read": "windowShown",
                              "required": false,
                              "scriptable": true,
                              "stored": true,
                              "type": "bool",
                              "user": false
                          },
                          {
                              "constant": false,
                              "designable": true,
                              "final": false,
                              "name": "hasTestCase",
                              "notify": "hasTestCaseChanged",
                              "read": "hasTestCase",
                              "required": false,
                              "scriptable": true,
                              "stored": true,
                              "type": "bool",
                              "user": false,
                              "write": "setHasTestCase"
                          },
                          {
                              "constant": false,
                              "designable": true,
                              "final": false,
                              "name": "defined",
                              "read": "defined",
                              "required": false,
                              "scriptable": true,
                              "stored": true,
                              "type": "QObject*",
                              "user": false
                          }
                      ],
                      "qualifiedClassName": "QTestRootObject",
                      "signals": [
                          {
                              "access": "public",
                              "name": "windowShownChanged",
                              "returnType": "void"
                          },
                          {
                              "access": "public",
                              "name": "hasTestCaseChanged",
                              "returnType": "void"
                          }
                      ],
                      "slots": [
                          {
                              "access": "private",
                              "name": "quit",
                              "returnType": "void"
                          }
                      ],
                      "superClasses": [
                          {
                              "access": "public",
                              "name": "QObject"
                          }
                      ]
                  }
              ],
              "inputFile": "quicktest_p.h",
              "outputRevision": 67
          },
          {
              "classes": [
                  {
                      "className": "QuickTestResult",
                      "enums": [
                          {
                              "isClass": false,
                              "isFlag": false,
                              "name": "RunMode",
                              "values": [
                                  "RepeatUntilValidMeasurement",
                                  "RunOnce"
                              ]
                          }
                      ],
                      "object": true,
                      "properties": [
                          {
                              "constant": false,
                              "designable": true,
                              "final": false,
                              "name": "testCaseName",
                              "notify": "testCaseNameChanged",
                              "read": "testCaseName",
                              "required": false,
                              "scriptable": true,
                              "stored": true,
                              "type": "QString",
                              "user": false,
                              "write": "setTestCaseName"
                          },
                          {
                              "constant": false,
                              "designable": true,
                              "final": false,
                              "name": "functionName",
                              "notify": "functionNameChanged",
                              "read": "functionName",
                              "required": false,
                              "scriptable": true,
                              "stored": true,
                              "type": "QString",
                              "user": false,
                              "write": "setFunctionName"
                          },
                          {
                              "constant": false,
                              "designable": true,
                              "final": false,
                              "name": "dataTag",
                              "notify": "dataTagChanged",
                              "read": "dataTag",
                              "required": false,
                              "scriptable": true,
                              "stored": true,
                              "type": "QString",
                              "user": false,
                              "write": "setDataTag"
                          },
                          {
                              "constant": false,
                              "designable": true,
                              "final": false,
                              "name": "failed",
                              "read": "isFailed",
                              "required": false,
                              "scriptable": true,
                              "stored": true,
                              "type": "bool",
                              "user": false
                          },
                          {
                              "constant": false,
                              "designable": true,
                              "final": false,
                              "name": "skipped",
                              "notify": "skippedChanged",
                              "read": "isSkipped",
                              "required": false,
                              "scriptable": true,
                              "stored": true,
                              "type": "bool",
                              "user": false,
                              "write": "setSkipped"
                          },
                          {
                              "constant": false,
                              "designable": true,
                              "final": false,
                              "name": "passCount",
                              "read": "passCount",
                              "required": false,
                              "scriptable": true,
                              "stored": true,
                              "type": "int",
                              "user": false
                          },
                          {
                              "constant": false,
                              "designable": true,
                              "final": false,
                              "name": "failCount",
                              "read": "failCount",
                              "required": false,
                              "scriptable": true,
                              "stored": true,
                              "type": "int",
                              "user": false
                          },
                          {
                              "constant": false,
                              "designable": true,
      

      I'm not quite sure where to go from here?!?

      Here are some more details to help:

      Configure Summary:

      Building on: win32-g++ (i386, CPU features: <none>)
      Building for: devices/linux-rasp-pi4-v3d-g++ (arm, CPU features: neon)
      Target compiler: gcc 8.3.0
      Configuration: cross_compile enable_new_dtags largefile neon shared shared rpath release c++11 c++14 c++17 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++17
        Using ccache ........................... no
        Using new DTAGS ........................ yes
        Relocatable ............................ yes
        Using precompiled headers .............. no
        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 ................................... yes
        Using system zlib ...................... yes
        Zstandard support ...................... no
      Qt Core:
        DoubleConversion ....................... yes
          Using system DoubleConversion ........ yes
        GLib ................................... no
        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 ................... yes
      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 ................................... yes
        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 ....................... no
          OpenGL ES 2.0 ........................ yes
          OpenGL ES 3.0 ........................ yes
          OpenGL ES 3.1 ........................ yes
          OpenGL ES 3.2 ........................ yes
        Vulkan ................................. yes
        Session Management ..................... yes
      Features used by QPA backends:
        evdev .................................. yes
        libinput ............................... no
        INTEGRITY HID .......................... no
        mtdev .................................. no
        tslib .................................. yes
        xkbcommon .............................. yes
        X11 specific:
          XLib ................................. yes
          XCB Xlib ............................. yes
          EGL on X11 ........................... yes
          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 ...................... no
          EGLFS GBM ............................ no
          EGLFS VSP2 ........................... no
          EGLFS Mali ........................... no
          EGLFS Raspberry Pi ................... no
          EGLFS X11 ............................ yes
        LinuxFB ................................ yes
        VNC .................................... yes
        XCB:
          Using system-provided xcb-xinput ..... no
          Native painting (experimental) ....... no
          GL integrations:
            GLX Plugin ......................... no
            EGL-X11 Plugin ..................... yes
      Qt Sql:
        SQL item models ........................ yes
      Qt Widgets:
        GTK+ ................................... no
        Styles ................................. Fusion Windows
      Qt PrintSupport:
        CUPS ................................... yes
      Qt Sql Drivers:
        DB2 (IBM) .............................. no
        InterBase .............................. no
        MySql .................................. no
        OCI (Oracle) ........................... no
        ODBC ................................... yes
        PostgreSQL ............................. no
        SQLite2 ................................ yes
        SQLite ................................. yes
          Using system provided SQLite ......... no
        TDS (Sybase) ........................... yes
      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 .................................... yes
        TIFF ................................... yes
          Using system libtiff ................. yes
        WEBP ................................... yes
          Using system libwebp ................. no
      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
      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 Client ........................ no
      Qt Wayland Compositor .................... no
      Qt Bluetooth:
        BlueZ .................................. yes
        BlueZ Low Energy ....................... yes
        Linux Crypto API ....................... yes
        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 . yes
        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 .......................... 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 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 ....................... no
        Use System Gn .......................... no
        Jumbo Build Merge Limit ................ 8
        Developer build ........................ no
        QtWebEngine required system libraries:
          fontconfig ........................... no
          dbus ................................. no
          nss .................................. no
          khr .................................. yes
          glibc ................................ yes
        QtWebEngine required system libraries for qpa-xcb:
          x11 .................................. no
          libdrm ............................... no
          xcomposite ........................... no
          xcursor .............................. no
          xi ................................... no
          xtst ................................. 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 ................................. yes
          harfbuzz ............................. no
          freetype ............................. no
          xkbcommon ............................ yes
      
      Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.
      
      Note: The following modules are not being compiled in this configuration:
          webenginecore
          webengine
          webenginewidgets
          pdf
          pdfwidgets
      
      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: Python version 2 (2.7.5 or later) is required to build QtWebEngine.
      
      WARNING: QtWebEngine will not be built.
      
      WARNING: QtPdf will not be built.
      

      Toolchain versions

      svcgu@SURFACE MINGW32 /c/SysGCC/qt-build/qtdeclarative/bin
      $ which gcc
      /c/SysGCC/mingw32/bin/gcc
      
      svcgu@SURFACE MINGW32 /c/SysGCC/qt-build/qtdeclarative/bin
      $ gcc -v
      Using built-in specs.
      COLLECT_GCC=C:\SysGCC\mingw32\bin\gcc.exe
      COLLECT_LTO_WRAPPER=C:/SysGCC/mingw32/bin/../libexec/gcc/i686-w64-mingw32/8.1.0/lto-wrapper.exe
      Target: i686-w64-mingw32
      Configured with: ../../../src/gcc-8.1.0/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/c/mingw810/i686-810-posix-dwarf-rt_v6-rev0/mingw32 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-sjlj-exceptions --with-dwarf2 --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/i686-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/i686-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/i686-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/i686-w64-mingw32-static --with-pkgversion='i686-posix-dwarf-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/i686-810-posix-dwarf-rt_v6-rev0/mingw32/opt/include -I/c/mingw810/prerequisites/i686-zlib-static/include -I/c/mingw810/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/i686-810-posix-dwarf-rt_v6-rev0/mingw32/opt/include -I/c/mingw810/prerequisites/i686-zlib-static/include -I/c/mingw810/prerequisites/i686-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/i686-810-posix-dwarf-rt_v6-rev0/mingw32/opt/include -I/c/mingw810/prerequisites/i686-zlib-static/include -I/c/mingw810/prerequisites/i686-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/i686-810-posix-dwarf-rt_v6-rev0/mingw32/opt/lib -L/c/mingw810/prerequisites/i686-zlib-static/lib -L/c/mingw810/prerequisites/i686-w64-mingw32-static/lib -Wl,--large-address-aware'
      Thread model: posix
      gcc version 8.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)
      
      svcgu@SURFACE MINGW32 /c/SysGCC/qt-build/qtdeclarative/bin
      $ which arm-linux-gnueabihf-gcc
      /c/SysGCC/Raspberry/bin/arm-linux-gnueabihf-gcc
      
      svcgu@SURFACE MINGW32 /c/SysGCC/qt-build/qtdeclarative/bin
      $ arm-linux-gnueabihf-gcc -v
      Using built-in specs.
      COLLECT_GCC=C:\SysGCC\Raspberry\bin\arm-linux-gnueabihf-gcc.exe
      COLLECT_LTO_WRAPPER=c:/sysgcc/raspberry/bin/../libexec/gcc/arm-linux-gnueabihf/8/lto-wrapper.exe
      Target: arm-linux-gnueabihf
      Configured with: ../../src/gcc-8-8.3.0/src/configure --with-pkgversion='Raspbian 8.3.0-6+rpi1' --enable-languages=c,c++,lto --with-gcc-major-version-only --enable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-werror --enable-checking=release --target=arm-linux-gnueabihf --with-sysroot=/mnt/f/gnu/raspberry-buster/out/arm-linux-gnueabihf/sysroot --host=i686-w64-mingw32 --prefix /mnt/f/gnu/raspberry-buster/out/ --disable-nls
      Thread model: posix
      gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1)
      

      Thanks for your time,
      Andy

      S 1 Reply Last reply Reply Quote 0
      • S
        svcguy @svcguy last edited by

        So, I tried again. I blew up the build folder and installed mingw64 (8.1.0-1-202004170606x86_64-8.1.0-release-posix-seh-rt_v6-rev0) and installed the same MSYS2 version into its folder and reran the configure and make and got a similar error:

        'C:\SysGCC\qt-build\qtdeclarative\bin\qmltyperegistrar.exe' --generate-qmltypes=plugins.qmltypes --import-name=QtTest --major-version=1 --minor-version=15 --foreign-types=C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5quicktest_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5quick_metatypes.json,C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw64/msys2/usr/local/qt5/lib/metatypes/qt5widgets_metatypes.json,C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw64/msys2/usr/local/qt5/lib/metatypes/qt5gui_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5qmlmodels_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5qml_metatypes.json,C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw64/msys2/usr/local/qt5/lib/metatypes/qt5network_metatypes.json,C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw64/msys2/usr/local/qt5/lib/metatypes/qt5test_metatypes.json,C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw64/msys2/usr/local/qt5/lib/metatypes/qt5core_metatypes.json --dependencies=C:/SysGCC/qt-everywhere-src-5.15.0/qtdeclarative/src/imports/testlib/dependencies.json -o qmltestplugin_qmltyperegistrations.cpp qmltestplugin_metatypes.json
        Cannot open foreign types file C;C:\SysGCC\mingw64\msys2\SysGCC\qt-build\qtdeclarative\lib\metatypes\qt5quicktest_metatypes.json
        Cannot open foreign types file C;C:\SysGCC\mingw64\msys2\SysGCC\qt-build\qtdeclarative\lib\metatypes\qt5quick_metatypes.json
        Cannot open foreign types file C;C:\SysGCC\mingw64\msys2\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\SysGCC\mingw64\msys2\usr\local\qt5\lib\metatypes\qt5widgets_metatypes.json
        Cannot open foreign types file C;C:\SysGCC\mingw64\msys2\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\SysGCC\mingw64\msys2\usr\local\qt5\lib\metatypes\qt5gui_metatypes.json
        Cannot open foreign types file C;C:\SysGCC\mingw64\msys2\SysGCC\qt-build\qtdeclarative\lib\metatypes\qt5qmlmodels_metatypes.json
        Cannot open foreign types file C;C:\SysGCC\mingw64\msys2\SysGCC\qt-build\qtdeclarative\lib\metatypes\qt5qml_metatypes.json
        Cannot open foreign types file C;C:\SysGCC\mingw64\msys2\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\SysGCC\mingw64\msys2\usr\local\qt5\lib\metatypes\qt5network_metatypes.json
        Cannot open foreign types file C;C:\SysGCC\mingw64\msys2\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\SysGCC\mingw64\msys2\usr\local\qt5\lib\metatypes\qt5test_metatypes.json
        Cannot open foreign types file C;C:\SysGCC\mingw64\msys2\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\SysGCC\mingw64\msys2\usr\local\qt5\lib\metatypes\qt5core_metatypes.json
        

        I almost missed but it looks as if the file name/path is getting messed up:

        C;C:\SysGCC\mingw64\msys2\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\SysGCC\mingw64\msys2\usr\local\qt5\lib\metatypes\qt5core_metatypes.json
        

        Is this a bug in qmltyperegistrar ,or a Makefile issue, or something completely different?

        1 Reply Last reply Reply Quote 0
        • S
          svcguy last edited by

          Running the command again directly from the MSYS shell gives that 'bad address' failure:

          svcgu@SURFACE MINGW64 /c/SysGCC/qt-build
          #  'C:\SysGCC\qt-build\qtdeclarative\bin\qmltyperegistrar.exe' --generate-qmltypes=plugins.qmltypes --import-name=QtTest --major-version=1 --minor-version=15 --foreign-types=C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5quicktest_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5quick_metatypes.json,C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw64/msys2/usr/local/qt5/lib/metatypes/qt5widgets_metatypes.json,C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw64/msys2/usr/local/qt5/lib/metatypes/qt5gui_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5qmlmodels_metatypes.json,C:/SysGCC/qt-build/qtdeclarative/lib/metatypes/qt5qml_metatypes.json,C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw64/msys2/usr/local/qt5/lib/metatypes/qt5network_metatypes.json,C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw64/msys2/usr/local/qt5/lib/metatypes/qt5test_metatypes.json,C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/SysGCC/mingw64/msys2/usr/local/qt5/lib/metatypes/qt5core_metatypes.json --dependencies=C:/SysGCC/qt-everywhere-src-5.15.0/qtdeclarative/src/imports/testlib/dependencies.json -o qmltestplugin_qmltyperegistrations.cpp qmltestplugin_metatypes.json
          -bash: C:\SysGCC\qt-build\qtdeclarative\bin\qmltyperegistrar.exe: Bad address
          
          1 Reply Last reply Reply Quote 0
          • S
            svcguy last edited by

            After some research, I learned its much better to build Qt on Windows through a native Windows command prompt. After switching to PowerShell, I can progress much further into the build.

            I'm now having issues specifically with the QtLocation module. I'm currently getting the following error when trying to build QtLocation:

            cd location\ && ( if not exist Makefile C:\SysGCC\qt-build\qtbase\bin\qmake.exe -o Makefile C:\SysGCC\qt5\qtlocation\src\location\location.pro ) && C:/SysGCC/mingw32/bin/mingw32-make -f Makefile
            Project ERROR: Could not find feature location-labs-plugin.
            mingw32-make: *** [Makefile:181: sub-location-make_first] Error 3
            

            It appears that the source tree \qtlocation\src\imports folder contains a locationlabs folder but it isn't getting built as the shadow build folder \qtlocation\src has no imports subfolder and the Makefile makes no mention of it.

            Anyone able to help with this error?

            1 Reply Last reply Reply Quote 0
            • B
              Brecht Sanders last edited by Brecht Sanders

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • First post
                Last post