Problem in ardupilot gazebo plugin installation

I have been trying to use gazebo simulation with SITL. However, I get an error message while running ‘make -j4’ installation.
http://ardupilot.org/dev/docs/using-gazebo-simulator-with-sitl.html#plugin-installation
I have been following instructions from the above link.
The error message received is:
static assertion failed: boost::variant does not contain specified type U, call to boost::get(boost::variant<T…>&) will always throw boost::bad_get exception

Could anyone please help me about what is going wrong with the installation and how to fix the problem.

Thanks,
Prakhar