Building LXC 2.0 from source on Ubuntu 18.04


(SD) #1

Hi,

I am trying to build LXC 2.0 on Ubuntu 18.04 and I am getting following error:-
./autogen.sh

  • test -d autom4te.cache
  • libtoolize
    libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, ‘config’.
    libtoolize: error: linking ‘/usr/share/libtool/build-aux/ltmain.sh’ to ‘config/’ failed
    libtoolize: putting macros in ‘config’.
    libtoolize: error: linking ‘/usr/share/aclocal/libtool.m4’ to ‘config/’ failed
    libtoolize: error: linking ‘/usr/share/aclocal/ltoptions.m4’ to ‘config/’ failed
    libtoolize: error: linking ‘/usr/share/aclocal/ltsugar.m4’ to ‘config/’ failed
    libtoolize: error: linking ‘/usr/share/aclocal/ltversion.m4’ to ‘config/’ failed
    libtoolize: error: linking ‘/usr/share/aclocal/lt~obsolete.m4’ to ‘config/’ failed
    libtoolize: Consider adding ‘AC_CONFIG_MACRO_DIRS([config])’ to configure.ac,
    libtoolize: and rerunning libtoolize and aclocal.
  • exit 1

The automake version that I am using is : 1.15.1

The same source I am able to build successfully in Ubuntu 14.04 which is having automake version 1.14.1

Can some one please tell me what is the issue here?

Thanks,


#2

Hi Souvik!

You need to install some prerequisite packages before compiling. Here is a working example with building LXC on a Ubuntu 18.04 LXD container, along with the required packages.

$ lxc launch ubuntu:18.04 mycontainer
$ lxc exec mycontainer -- sudo --user ubuntu --login
ubuntu@lxc:~$ git clone https://github.com/lxc/lxc.git
ubuntu@lxc:~$ sudo apt install libtool m4 automake pkg-config
ubuntu@lxc:~$ cd lxc
ubuntu@lxc:~/lxc$ ./autogen.sh && ./configure && make && sudo make install