One thing I have had trouble with is compiling and running 32 bit apps in Linux not true multilib supported apps but specifically apps that use glib2 and gtk.

Finally I have found a way to get it to work!

Things to note

I have only got this to work on Fedora. Fedora Workstation 25 to be specific.

What I needed to do

All I needed to do is run the following command and both versions installed easily.

$ sudo dnf install glibc glibc.i686 gtk2 gtk2.i686

For some reason I have been unable to get this working in Ubuntu 16.04.

I also needed to install all the other dependencies for my particular project by installing both the 64 bit and i686 versions.

Then when building my code all I needed to do was set pkgconfig so that cmake can find the 32 bit packages.

In Fedora it is easy to set the path doing the following:

In fish the command is:

set -x PKG_CONFIG_PATH /usr/lib/pkgconfig

In bash the command is:
export PKG_CONFIG_PATH=/usr/lib/pkgconfig