Important: Please read the Qt Code of Conduct -

locating sysroot

  • dear fellow coders, i'm new to Qt & Linux. Would somebody enlighten me on where may I locate my sysroot directory for the [Kits] options in Qt Creator? Is it my filesystem image or filesystem files (e.g. for jffs2)

  • Lifetime Qt Champion

    Where did you put the sysroot?
    What sysroot is it and for which device?
    Where did you get it from?
    If you're developing for the desktop you don't need any sysroot. Sysroot is needed for cross-compiling for other devices.

  • I don't use the same Version as you, so I can't help you directly. But I'd advise to try this Terminal comand:

    sudo find / -name sysroot

    It searches the main root for the folder/file sysroot.
    you might find multiple results. so just check them and see which one you're searching for.

    EDOT: I might have understood the question wrong.

  • Hi @jsulm !
    i'm trying to set my Qt Creator (3.5.1 enterprise) in Ubuntu 32-bit, host PC so that I can perform my developments on host for my target embedded board. So i'm pretty puzzled by sysroot and why is it needed?

    I've the vendor's SDK for my embedded Linux target board that contains the toolchain as well. So do I need to create a sysroot or I can actually locate it in my SDK? (Btw, I've performed a search in my SDK and can't locate this directory)

  • Lifetime Qt Champion

    @embdev The sysroot is basically the target device filesystem (or at least part of it). It contains all the libraries/headers which are needed to build/link your application. There are several possibilities to get the sysroot:

    1. It can be part of the SDK
    2. You copy all needed parts of target device file system to a directory on your host machine (keep the directory structure)
    3. You mount the target device filesystem in your host machine file system (for example using NFS)
    4. If the target device uses a SDCard (like RaspberryPi) you can put the SDCard in your host PC

  • @jsulm would it be something like that: 0_1473065085108_upload-9e236f1f-5c4b-47af-9b7d-1ea5896a7dad

    my target device uses NAND flash

  • Lifetime Qt Champion

    @embdev What ever it uses - you need the content of the file system.

  • Lifetime Qt Champion

    @embdev If you put an image - I cannot see it (putting images directly isn't working for some reason).

  • @jsulm yes I did include an image. Basically there's a file in my SDK named rootfs with the following folders:
    bin, boot, dev, etc, home, lib, lost+found, mnt, nfsroot, opt, proc, root, sbin, share, sys, temp, usr, var, mkimg.rootfs, mknod_console.

    But the werid thing is that after decompressing this rootfs folder, the folders within (as per above) contains no files inside. But is this somewhat the structure of a sysroot? If so i'll have to try and locate the missing files, probably residing in other directories.

  • Lifetime Qt Champion

    @embdev Yes, it looks like what you need :-)
    I'm wondering why there are no files. How did you decompress the archive? What is the format of the archive?

  • @jsulm cool. it's rootfs.tgz. So I unpack in Ubuntu GUI (double click & extract). Only 2 folders contain files - /etc/ and /usr/. I've also tried tar -xvzf rootfs and got the same results.

  • Lifetime Qt Champion

    @embdev What is the size of the archive?

  • @jsulm guess what, I navigated through the entire SDK again and found that the constituents of the file system are in another folder. I think it should be the one i'm looking for. now the folder size is about 25mb, the bin folders are populated. file name is rootfs_gblic_single. So right now I just need to link to this path in Qt kit right? so, how does having this sysroot help in my overall development / compilation in Qt?

  • @jsulm another question is that if I want to compile my target board source code (c language) as well as QML, qmake will help to combine 2 compilers together, so that when I compile in Qt creator IDE, the IDE will help to compile my target board source code as well as QML for the GUI to work?

  • Lifetime Qt Champion

    @embdev Well, qmake generates the Makefiles. If you use a sysroot it will use the libraries from that sysroot instead of libraries on your host machine (which most probably are build for a different architecture).
    Regarding your last question: QML is not compiled. There is a QML compiler, which was (still is?) commercial. It is or will be free, I think it will be free starting with Qt 5.8, but I'm not sure. But this compiler is optional and is used to improve performance. I never used QML compiler, so I don't know what you need to do to use it.

  • I see. ok so what if I've compiled the C source codes on my embedded target board into exe. files, and then use Qt Creator to develop my GUI, what are the things that I link from my GUI to my target board source codes? e.g. if I create a GUI with a button, that button when clicked will run the executable file I've created on my embedded target board?

  • This post is deleted!

Log in to reply