working compile in Ubuntu 12.04