Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to set sysroot correctly when cross-build arm qmake tools on x86 host?
Forum Updated to NodeBB v4.3 + New Features

how to set sysroot correctly when cross-build arm qmake tools on x86 host?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 332 Views
  • 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.
  • D Offline
    D Offline
    double_crane
    wrote on last edited by
    #1

    hello,
    I want to build arm qt development environment on a x86 host machine,
    the target root fs is mounted to /mnt directory,
    so when do the qt-everywhere configure, I do

    HOSTBINDDIR=host_install_x86 (point to the directory which contains a x86 qmake tool)
    SYSROOT=/mnt
    ../configure -v
    -prefix /usr/local/Qt-arm
    -extprefix ${EXTPREFIX}
    -external-hostbindir ${HOSTBINDDIR}
    -platform linux-aarch64-gnu-g++
    -device linux-rasp-pi4-v3d-g++
    -device-option CROSS_COMPILE=aarch64-linux-gnu-
    -sysroot ${SYSROOT}
    .......

    but when gmake over, copy the files from x86 host ${EXTPREFIX} to arm target /usr/local/Qt-arm dir.
    and then on arm target, go to my qt project directory, do
    /usr/local/Qt-arm/bin/qmake -spec /usr/local/Qt-arm/mkspecs/devices/linux-......
    but then I find that in the generated Makefile, the sysroot is set to /mnt, not /. and it should be set to /.

    in conclusion, when build arm target qt tools on x86 host, I want sysroot be set to /mnt (where target root is mounted),
    and when build apps on arm target, I want sysroot be set to /.

    so, how to configure ?
    thanks.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      double_crane
      wrote on last edited by double_crane
      #2

      oh, I find I can fix it after build over,
      by edit the mkspecs/qconfig.pri file,set the QT_SYSROOT to /。
      although it‘s not the best solution。

      1 Reply Last reply
      0
      • D double_crane has marked this topic as solved on

      • Login

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