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. So Yocto Pyro 2.3.1 cross-compilation SDK, Qt 5.9+QML app, cmake and QtQuickCompiler all walk into the build environment...
Forum Updated to NodeBB v4.3 + New Features

So Yocto Pyro 2.3.1 cross-compilation SDK, Qt 5.9+QML app, cmake and QtQuickCompiler all walk into the build environment...

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 2 Posters 3.0k Views 2 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.
  • N Offline
    N Offline
    NevilX
    wrote on last edited by NevilX
    #1

    Hello.

    I am working on a project in which we build an Qt+QML application through cmake on following platforms:

    1. x86-64 Windows (test, prebuilt commercial Qt installation),
    2. x86-64 Linux (test, prebuilt commercial Qt installation),
    3. ARM Cortex-A9 Linux (target platform, during compilation Qt is used as a part of Yocto Pyro 2.3.1 cross-compilation SDK).

    I have configured the cmake files to optionally use QtQuickCompiler as described here: http://doc.qt.io/QtQuickCompiler/qquickcompiler-building-with-cmake.html
    This approach works on pre-compiled commercial SDKs used in [1] and [2], but does not work on [3]. We build our own cross-compilation SDK and system image for ARM platform using yocto. It compiles Qt from source. I've changed switch in Yocto SDK configure step of Qt to "-commercial" and placed the license file as ".qt-license" in /home/<user>/ on Linux machine used to build both OS and SDK.

    QtQuickCompiler is not built. It is not built from source even on PC, which makes sense: if it is meant to be available as a tool being a part of commercial package, releasing source code of it in any form would be bad idea.

    So. Because QtQuickCompiler converts QML to C++, I assume that during build process of [3] I should be able to use the same tool which is used in [2], correct? A simple copy of "qtquickcompiler" binary from [2] SDK to a folder in which qmake used in [3] is placed (<sdk folder>/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/) does not work - cmake does not find the compiler and proceeds to build the application without it.

    Is using the QtQuickCompiler possible in [3]? How to make it work?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Qt 5.9 comes with QML cache which offers similar performance (for subsequent app runs) to the compiler http://blog.qt.io/blog/2017/05/31/performance-improvements-with-qt-5-9-lts/ and it is already built into the app.

      The blog post suggests that Qt Company have run the Qt Quick Compiler for ARM CPUs - I suggest you get in touch with them about it.

      (Z(:^

      1 Reply Last reply
      0
      • N Offline
        N Offline
        NevilX
        wrote on last edited by NevilX
        #3

        I've looked into "precaching" right at the beggining of my optimization quest. This documentation entry suggests enabling it by adding few lines to the *.pro file. And here is the problem: we do not use the *.pro file in our build process. "FIND_PACKAGE( Qt5 5.6 REQUIRED Core Qml Quick )", "FIND_PACKAGE(Qt5QuickCompiler QUIET)" and explicit call to Qt's RCC are the only things in our CMakeLists that are related to Qt - where the second one fails to find the compiler during cross-compilation.

        In other words: I'm more interested in solutions that can be easily included in our build chain than in solutions that do work, but require major changes in our approach.

        sierdzioS 1 Reply Last reply
        0
        • N Offline
          N Offline
          NevilX
          wrote on last edited by NevilX
          #4

          Also: Qt5QuickCompiler has an added benefit of obfuscating the QML sources. As far as I know It is not something that caching could provide, even with prebuilt cache.

          sierdzioS 1 Reply Last reply
          0
          • N NevilX

            I've looked into "precaching" right at the beggining of my optimization quest. This documentation entry suggests enabling it by adding few lines to the *.pro file. And here is the problem: we do not use the *.pro file in our build process. "FIND_PACKAGE( Qt5 5.6 REQUIRED Core Qml Quick )", "FIND_PACKAGE(Qt5QuickCompiler QUIET)" and explicit call to Qt's RCC are the only things in our CMakeLists that are related to Qt - where the second one fails to find the compiler during cross-compilation.

            In other words: I'm more interested in solutions that can be easily included in our build chain than in solutions that do work, but require major changes in our approach.

            sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            As I see.

            @NevilX said in So Yocto Pyro 2.3.1 cross-compilation SDK, Qt 5.9+QML app, cmake and QtQuickCompiler all walk into the build environment...:

            This documentation entry suggests enabling it by adding few lines to the *.pro file

            That's a long shot, but maybe you can do this:

            • create some simple QML example app (using qmake), even the default one from Qt Creator will do
            • run qmake and copy the Makefile to some safe location
            • add these QML cache lines to .pro
            • run qmake again
            • check the resulting Makefile - what has changed? Maybe you can incorporate the same actions to cmake via a script of some sort.

            (Z(:^

            1 Reply Last reply
            0
            • N NevilX

              Also: Qt5QuickCompiler has an added benefit of obfuscating the QML sources. As far as I know It is not something that caching could provide, even with prebuilt cache.

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              @NevilX said in So Yocto Pyro 2.3.1 cross-compilation SDK, Qt 5.9+QML app, cmake and QtQuickCompiler all walk into the build environment...:

              Also: Qt5QuickCompiler has an added benefit of obstructing the QML sources. As far as I know It is not something that caching could provide, even with prebuilt cache.

              Yes, that's why I suggest contacting the Qt Company. They have run the qml compiler on ARM so they should be able to help. Especially when you are - as you mention - a commercial customer.

              (Z(:^

              N 1 Reply Last reply
              0
              • sierdzioS sierdzio

                @NevilX said in So Yocto Pyro 2.3.1 cross-compilation SDK, Qt 5.9+QML app, cmake and QtQuickCompiler all walk into the build environment...:

                Also: Qt5QuickCompiler has an added benefit of obstructing the QML sources. As far as I know It is not something that caching could provide, even with prebuilt cache.

                Yes, that's why I suggest contacting the Qt Company. They have run the qml compiler on ARM so they should be able to help. Especially when you are - as you mention - a commercial customer.

                N Offline
                N Offline
                NevilX
                wrote on last edited by NevilX
                #7

                @sierdzio said in So Yocto Pyro 2.3.1 cross-compilation SDK, Qt 5.9+QML app, cmake and QtQuickCompiler all walk into the build environment...:

                Yes, that's why I suggest contacting the Qt Company. They have run the qml compiler on ARM so they should be able to help. Especially when you are - as you mention - a commercial customer.

                I'll try this, thanks.

                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