locating sysroot
-
@embdev
Hi!
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)
-
@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:
- It can be part of the SDK
- You copy all needed parts of target device file system to a directory on your host machine (keep the directory structure)
- You mount the target device filesystem in your host machine file system (for example using NFS)
- If the target device uses a SDCard (like RaspberryPi) you can put the SDCard in your host PC
-
@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.
-
@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?
-
@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?