Granite 0.5 and webkit2gtk-4.0 dependency issues

My build of Bookworm on Snapcraft is failing due to packages for granite(>=0.5) and webkit2gtk-4.0(>=2.18.6) not being met. Is there a way I can pull in these packages into the snapcraft.yaml to get the build to succeed. On my local system where I have the libraries the build succeeds with the same snapcraft.yaml.

Snapcraft.yaml here :

-- Checking for modules 'gtk+-3.0;gee-0.8;granite>=0.5;webkit2gtk-4.0>=2.18.6;sqlite3>=3.5.9;poppler-glib;libxml-2.0'
CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
  CMakeLists.txt:62 (pkg_check_modules)

Build log here:

You’ll have to create a part for this and build granite from source - there are no granite packages in later versions of ubuntu.

Yeah looks like libgranite is only at 0.3 on Xenial. Building from source is a good idea.

Are you able to point me at a snap raft.yaml which builds granite from source …also what about WebKit?

try this for granite:

Webkit2 is already at 2.18.6 in xenial so you should be ok there.

Many thanks for pointing me at the yaml, I updated my yaml to pull in granite. However the build still fails with:

make[2]: *** [lib/CMakeFiles/granite.dir/Widgets/AsyncImage.c.o] Error 1
make[2]: *** Waiting for unfinished jobs…
CMakeFiles/Makefile2:117: recipe for target ‘lib/CMakeFiles/granite.dir/all’ failed
Makefile:149: recipe for target ‘all’ failed
make[1]: *** [lib/CMakeFiles/granite.dir/all] Error 2
make: *** [all] Error 2

Build log at:

On my local where I have the correct versions of granite and webkit, the snap is build correctly, but on installing the snap locally and running the application I get the following error:

[ERROR 10:40:52.902555] Unable to fork a new child process: Failed to execute child process “/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitNetworkProcess” (No such file or directory)

Thanks for your support.

Any pointers on how to resolve the issue

My understanding is that the master branch version granite compilation needs a later version of valac to compile correctly.

Maybe an earlier version of granite may compile more successfully - or you may need to investigate methods to uplift the version of valac.

No idea about webkit.

Can I ask - have you actually managed to compile this app under 16.04? Usually compiling locally first will give you valuable pointers on the best way to compile the snap.

Thanks for the response. The App compiles on Xenial:
Travis CI:

Not sure how to upgrade the granite version for snap.