Hi,
it seems the latest btrfs changes weren't tested with a build of
btrfs_shell; additionally the shared debug_support doesn't build on
non-haiku platforms.
I find that rather involved, see a draft patch:
https://pastebin.com/q8PsJm5L with stubs for the locking. Please pick up
what you need.
On Ubuntu, I installed uuid-dev with "sudo apt-get install uuid-dev"
Bye,
Jérôme