lxc / go-lxc

Go bindings for liblxc
https://linuxcontainers.org/lxc
Other
430 stars 76 forks source link

‘struct lxc_container’ has no member named ‘set_timeout’ #169

Closed MYan42 closed 10 months ago

MYan42 commented 10 months ago

Necessary information

Issue description

I am tring to build the lxd form source code following this Tutorial.

After make dep and export the necessary variables, make facing issue while compile go-lxc part.

  $ make
  ......
  github.com/lxc/go-lxc
  # github.com/lxc/go-lxc
  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))
        |               ^~
  make: *** [Makefile:35: build] Error 1

I have also tried only compile go-lxc from source, facing the exact same error.

stgraber commented 10 months ago

Not a go-lxc issue, it's an issue because of broken LXC header files in Ubuntu.

The current build instructions (not that old tutorial) for both LXD and Incus include a mention of this problem and how to resolve it.

stgraber commented 10 months ago

https://linuxcontainers.org/incus/docs/main/installing/#install-incus-from-source