Build lxd 5.20 from source on Ubuntu 22.04 error (lxc-binding.c, go_lxc_set_timeout)

The latest ubuntu 22.04, golang 1.21.
Use the archive from github->releases

When perform make it shows:

lxc-binding.c: In function ‘go_lxc_set_timeout’:
lxc-binding.c:80:15: error: ‘struct lxc_container’ has no member named ‘set_timeout’
   80 |         if (!c->set_timeout(c, timeout))
      |               ^~

I’m sorry but given the recent actions from Canonical regarding LXD:

We really can’t be providing support to LXD users on this forum anymore.

You may want to consider switching to Incus instead, or if you’d like to stay on LXD, you should reach out on the Canonical forum instead.

Sorry about that!

Worth noting that the Incus source build instructions actually cover this very problem.

Thanks! I’ll try to move to Incus. Maybe it will be even mach easier to user prebuilded packages instead of using sources.

Relatively to the bug – i use my own scrips for rebuilding new lxd versions and accidentally the error occurred, about new golang version. I updated the packages (it’s a separate VM, where i start my builds) and started catching the new error…

Yeah, you likely picked up the new go-lxc which introduces that new function and hits the broken liblxc-dev in Ubuntu.