Qt Forum

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

    Unsolved QT5.12.x Raspberry Pi Zero Cross Compilation QCoreApplication Error

    Tools
    cross compile qt5 raspberry pi qcoreapplicatio
    2
    5
    2579
    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.
    • A
      andyDT last edited by

      Hi Guys,

      I'm battling with trying to get cross compiling working on a VM box using Ubuntu.

      I followed these instructions https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/ but for QT 5.12.1 and tried QT5.12.2 and have the same problem. The cross compilation seemed to build OK, the only issue was that Qtdoc was skipped. Qt5 was build t in a folder ~/raspi/qt5pi

      However, the problem is with my demo project in QT Creator. I open up the project and get presented with compilation errors on a simple QT quick demo (Also tried QT widgets, but get similar).

      0_1553249641681_7dea4c72-d8a1-4ff2-9973-a8a51b3dc6d5-image.png

      Digging deeper QCoreApplication.h fails with this:
      0_1553249778103_a42aa5c2-5739-4e3b-bb18-7fcc99f7f95d-image.png

      My instinct is telling me that this is a potential path issue.

      Can you help me? I am new to the world of QT and cross compiling.

      Thanks

      K 1 Reply Last reply Reply Quote 0
      • K
        koahnig @andyDT last edited by

        @andyDT

        This seems to be an issue with the code model. Under windows 10 I have sometimes the issue that the updating is delayed or not executed at all. Restarting Qt creator may help.
        Otherwise you can deselect the code model under "Options"->"C++" under tab "Codel model". The code model takes quite some CPU times. When using a virtual machine you simply might not have enough steam for all done in real-time.
        The code model shall help you to detect issues sooner and not to wait for the compilation of code and the error/warning messages there.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply Reply Quote 0
        • A
          andyDT last edited by

          Hi,

          Thanks for your quick reply,

          I just tried that, but it made no difference. I should have probably mentioned that If I build under a version of Desktop Qt 5.12.1 GCC I don't have this issue.:

          0_1553251804329_074d8198-9560-4e82-9ff0-dae8e21bfdda-image.png

          And the application deploys and works.

          K 1 Reply Last reply Reply Quote 0
          • K
            koahnig @andyDT last edited by

            @andyDT

            You have simply changed the toolchain to host and the problem is vanishing in the same creator session?

            That would point an issue with the toolchain setup.
            Did you check the setup of the RPI toolchain under "Option"->"Kits" all different tabs?

            However, you wrote that the cross-compilation does work regardless of the warnings and messages shown in creator.
            Just saw that there was a misunderstanding on my side. Check the kit.

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply Reply Quote 0
            • A
              andyDT last edited by

              Hi,

              Absolutely, in the same creator session I can toggle between toolchains, Desktop is fine, but Raspberry Pi is giving the aforementioned problem.

              This is my setup.

              Build settings:

              0_1553262032384_d234256c-f6e3-4acc-b861-0d5153f80f23-image.png

              0_1553262575907_7783d3e3-39a4-4a2b-aeb7-1c640598b17a-image.png

              PATH: /home/ubuntuvm/raspi/qt5/bin:/home/ubuntuvm/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/bin

              Kit:

              0_1553262136401_a8f684d0-8005-41d0-bc94-de018e3acb28-image.png

              Device:
              0_1553262784829_a5f27b5f-bf3a-49c7-ac08-492f4ef2294d-image.png

              Qt Versions:
              0_1553262183514_7324f48e-e118-4fbd-b86b-1624dbe84544-image.png

              Compilers:
              0_1553262236958_3e5d5c9f-8dc7-4338-b094-cd6c40d6fcc9-image.png

              0_1553262396408_495b7c91-9b03-4db2-9ec8-2c84ca13b1c3-image.png

              Compiler Path (C & C++):
              /home/ubuntuvm/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/bin/gcc

              Debuggers:
              0_1553262259546_0a0a3f73-c0d0-48b8-990c-8cd188d9f208-image.png

              Qbs:
              0_1553262324062_2ee32585-94a3-4b22-a956-0f44ed63657e-image.png

              1 Reply Last reply Reply Quote 0
              • First post
                Last post