How to properly stage 3rd libraries that don't have package in Ubuntu repos

I have a Qt application and I want to ship it with latest version of Qt that isn’t yet in Ubuntu repos, because of support for WebEngine, which fixes some issues with mid-east fonts (Hebrew, Persian etc).

I can download qt packages from, install them somewhere to ~/Qt and then configure my app to build from there, but how do I tell snapcraft to include all important files and dynamic libraries from ~/Qt to my snap so that it works on target machines?

Does this article help? :slight_smile: Also try this forum thread.

No it doesn’t help, these 2 articles specifically explain how to use old ubuntu-packaged Qt, which is precisely what I want to avoid for reason I stated.

I want to use latest Qt which supports web-engine.

You culd make a Qt part in you snapcraft.yaml that builds the whole stack from source…

You could use a prepare scriptlet to wget some remote tarball with Qt binaries (and hearders if you want to link against that Qt) to extact into your snap …

You could create a PPA with the Qt version you want and make your snapcraft.yaml use it from a scriptlet …

snapcraft.yaml is extremely hackable and flexible to allow you want you want …

Hey, one option is build Qt yourself as a snapcraft part as we are doing in the Liri platform snap right now. This however requires a custom QMake plugin (see snap/plugins/ and takes quite long to build (several hours - obviously depending on your machine) especially if you’re going to build QtWebEngine (which means building Chromium).
There is also this launchpad bug.

Hi Tim, this looks like a solution. Build time is not a big deal.

Cool :+1: Let us know!