Hi all,
I have a small C++ program (GitHub - tigarmo/jsontool: A simple pretty-printer of json documents · GitHub) that pretty-prints JSON files. I’m trying to create a snap for it but I’m getting this weird error:
❯ snapcraft pack
Failed to run the build script for part 'jsontool'.
Detailed information:
:: + cmake /root/parts/jsontool/src -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
:: + cmake --build . -- -j16
:: /root/parts/jsontool/src/src/main.cpp:5:10: fatal error: tabulate/table.hpp: No such file or directory
:: 5 | #include <tabulate/table.hpp>
:: | ^~~~~~~~~~~~~~~~~~~~
:: compilation terminated.
:: gmake[2]: *** [CMakeFiles/jsontool.dir/build.make:76: CMakeFiles/jsontool.dir/src/main.cpp.o] Error 1
:: gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/jsontool.dir/all] Error 2
:: gmake: *** [Makefile:136: all] Error 2
Recommended resolution: Check the build output and verify the project can work with the 'cmake' plugin.
For more information, check out: https://documentation.ubuntu.com/snapcraft/8.14.5/reference/plugins/
Failed to run snapcraft in instance
This is strange because it works on my system. I tried following the docs linked on the error but as far as I can see I’m using the plugin correctly. Can anybody help me understand what’s going on?