Avagadro 1.2 ubuntu 16 installation error. CMAKE make

You can see revisions of this answer to get confirmation that 1.2 version does not compile on Ubuntu 16.04 LTS because of problems with OpenBabel functions and related dependencies.

So we consider to use schroot mechanism. It will create small 18.04 LTS system inside your existing 16.04 LTS system. Both will use the same filesystem.

To setup schroot you need to execute the following commands (just copy and paste them):

sudo apt-get install schroot debootstrap -y

cat <<EOF | sudo tee /etc/schroot/chroot.d/bionic.conf
[bionic]
description=Ubuntu 18.04
directory=/srv/chroot/bionic
root-users=$USER
type=directory
users=$USER
EOF

sudo mkdir -p /srv/chroot/bionic
sudo debootstrap bionic /srv/chroot/bionic

cat <<EOF | sudo tee /srv/chroot/bionic/etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
EOF

schroot -c bionic -u root apt-get update
schroot -c bionic -u root apt-get install avogadro

To run Avogardo 1.2 from terminal you need to run:

schroot -c bionic env DISPLAY=:0.0 avogadro

Optionally you can create Avogadro.desktop file for it and place it on Desktop:

cat <<EOF > ~/Desktop/Avogadro.desktop
[Desktop Entry]
Version=1.2
Name=Avogadro
GenericName=Advanced molecular editor
Comment=Molecular Graphics and Modelling System
Exec=schroot -c bionic env DISPLAY=:0.0 avogadro
Icon=/srv/chroot/bionic/usr/share/pixmaps/avogadro-icon.png
Terminal=false
Type=Application
Categories=Qt;Science;Chemistry;Physics;Education;
StartupNotify=true
MimeType=chemical/x-cif;chemical/x-cml;chemical/x-daylight-smiles;chemical/x-gamess-input;chemical/x-gamess-output;chemical/x-gaussian-log;chemical/x-mopac-out;chemical/x-pdb;chemical/x-xyz;chemical/x-gaussian-checkpoint;chemical/x-gaussian-cube;chemical/x-qchem-output;
EOF

chmod +x ~/Desktop/Avogadro.desktop

And enjoy the application:

Avogadro 1.2 on 16.04 LTS