Qt package

  • Hi there I recently tried to cross compile a command line app that uses Qt toolkit to use with LE. Unfortunately, I couldn't link qt5 libraries statically because distros don't ship static versions of them. I didn't want to recompile entire toolkit so I started to search for any traces of qt inside LE and found qtbase package. I can see it's used as dependency of hyperion addon but do any of its files end up in LE filesystem?

    Here's what I'm missing btw:

  • That's strange because I can't find any trace of qt in hyperion addon. The binaries are not linked against it and there are no libraries maybe it's compiled in statically?

    If you add "qtbase" to https://github.com/LibreELEC/Libr…EC/options#L259 the files should be available?

    Haven't tried this. Is it possible to build just a single package? I was actually using system cross compile toolchain not LE one to compile the app.

  • Running "PROJECT=Generic DEVICE=gbm ARCH=x86_64 scripts/build qtbase" (or the equivalent for other platforms) will build only that package (and any dependencies needed for the package itself or compiling, i.e. the toochain). The current qtbase package.mk probably doesn't pick any of the binaries or library files into the LE image (looks like it's only a compile dependency for Hyperion, I didn't look hard at how it's used) but adding files would be a simple change to make; most package.mk files in our buildsystem do add files so there's lots of prior art to crib how that's done from.

    If the long-term intention is to use skyscraper with LE, it's probably worth investing a little time/effort into creating a skyscraper package for our buildsystem. The workflow for compiling is a little different if you're used to working with a conventional distro; though the underlying cross-compile process is the same. Working with a package within our buildsystem will eliminate compat issues that sometimes arise due to differences between e.g. Ubuntu and LE runtime environments, and will also make long-term maintenance easier. Once the intial work to create the package is done you can simply keep your changes in a topic branch and rebase/bump and rebuild skyscraper against later LE releases as needed. Once you have a stable image a quick respin is often a couple of minutes compile time, not a full multi-hour experience.

  • Thank you for your detailed explanation and pointers. Now I need to experiment with build system commands a little. From what I've learned I can see two possible ways of adding something reliably to LE: one is producing a static binary with distro toolchain; the other is maintaining a package with dependencies within LE build system. The first one is more suited for quick testing (just build, scp to LE, run) the other for better long term integration and rebuilding.