How to use configure script to build Qt5 and qmake for remote development on Jetson-TK1

  • Hello everybody,

    I am trying to setup a remote development environment for my Jetson TK1 on my ubuntu 14.04, and AFAIK, I need to build Qt and qmake so that it runs on my x86_64 computer and compiles ARM binaries which will run on my Jetson.

    I have a lot of problems using the configure script in order to build correctly Qt for this. Configure script never finds headers, whereas I give him the path to the sysroot.
    The command line look like this at the moment :

    sudo ./configure -prefix /home/guest/7_Qt5/prefix -hostprefix /home/guest/7_Qt5/hostPrefix -extprefix /home/guest/7_Qt5/extPrefix -platform linux-g++ -device linux-jetson-tk1-g++ -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -sysroot /home/guest/opt/sysroot -v

    I'm pretty sure I'm missing something very basic on how to use configure script, and how to do what I am aiming for. I am using default toolchain for cross-compilation on ubuntu, and nor ./configure -h neither help me, and there does not seem to exist any tutorial on the internet which explains how to do this.

    Though, I managed to use configure in order to build qt for the host machine's architecture.

    Thank you in advance for your help. :)

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are you sure your sysroot contains the dev packages Qt needs ?

  • Hi, and thanks for your quick reply,

    I'm pretty sure my sysroot contains everything qt needs : I installed qt5 on it using apt-get, and I copied folders /usr/lib, /usr/include and /lib from my Jetson in it, and I even copied the two usr files in respectively sysroot/lib and sysroot/include to make sure that was not the problem.

    A second thing that makes me think it is not a problem of missing dependencies (at least, at the moment) is that a lot of my trys to make configure work are failing when trying to build STL examples, it exits saying "STL check functionality failed", and complains about headers missing, like "<utility>" for instance, whereas find -name tells me that they are on the sysroot, but probably not where configure is looking at.

  • Lifetime Qt Champion

    There lies the problem, your sysroot is in fact not a sysroot. A sysroot is a folder which contains a minimal filesystem. What you have is a bunch of directories.

    More precisely, your sysroot should have the same structure as your computer:

    ---- etc /
    ---- bin /
    ---- lib /
    ---- user /
    -------- lib /
    -------- include /

    One example for that is the RPi, you usually mount the RPi's file system through sshfs and use that as sysroot so if you are missing something you just install what's needed on the RPi and you can use it right away. The other way around is to mount the image used to flash the RPi SD Card and use that as sysroot.

  • Well, I thought a sysroot could only be a bunch of folders respecting the way a minimal filesystem is organized, with only the necessary for building, I'm sorry if I was wrong.

    I mounted my device using sshfs, and I have the same problem as before ( , and if I add the -qt-xcb flag, I'm back to STL functionnality check problems, which is obviously installed on my card).

    I guess I used sshfs well, like this :

    sudo sshfs -o allow_other -o umask=755 ubuntu@ ./sysroot

    And I guess it went well, since I can ls in the file system and create files in sysroot/tmp, for instance.

    So, to me, the problem is not there, but somewhere else.

    EDIT : I tried to install dependencies, and I manage to pass the problem concerning libxcb by downloading a few missing dependencies. I am now back to square one (, with only problems concerning fundamental things like STL and basic C++ headers.

    EDIT2 : Configure now works properly, apparently (, I added the path to the C++ headers, something like $$[QT_SYSROOT]/usr/include/arm-linux-gnueabihf/c++/4.8/ on my filesystem.
    I am currently building, waiting for the compilation to end.

  • Lifetime Qt Champion

    Just saw something, why are you using sudo ? That's not a good idea when you are building anything.

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.