Building the tutorial app

So I am playing around with Gtk and wanted to see how to build the basic Hello World app which can be found here https://developer.puri.sm/Librem5/Apps/Tutorials/First_Application/index.html

however I am having trouble with the build process…
“To configure the build on the command line, enter the app directory and run Meson, specifying the source and build directories:”

meson . _build

I run the above command and get this as an output
Could not find the database of available applications, run update-command-not-found as root to fix this
Sorry, command-not-found has crashed! Please file a bug report at:
http://www.debian.org/Bugs/Reporting
Please include the following information with the report:

command-not-found version: 0.3
Python version: 3.7.3 final 0
Distributor ID: PureOS
Description: PureOS
Release: 9.0
Codename: amber
Exception information:

local variable ‘cnf’ referenced before assignment
Traceback (most recent call last):
File “/usr/share/command-not-found/CommandNotFound/util.py”, line 23, in crash_guard
callback()
File “/usr/lib/command-not-found”, line 93, in main
if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
UnboundLocalError: local variable ‘cnf’ referenced before assignment

My question is do I point that command “meson . _build” to the data and src folders?

It looks like the meson tool is not installed. For some reason, the command-not-found tool then crashes.

If you follow the link in the tutorial to this page it describes the tools you may need:

“Many applications will use the Meson and Ninja build tools to configure and build applications. The versions of these available in modern GNU/Linux distributions should be sufficient. Debian-based distributions, such as PureOS, provide packages called meson and ninja-build.”

So, you need to install some tools first:

sudo apt install meson ninja-build

That should help get you started.

@david.boddie that was exactly it. Thanks for the help! Not sure how I let that one slip by :sweat_smile: haha

The suggestion is to uninstall it: Command-not-found

At least then you get a sensible error message.