Pixhawk calibration failing with compiled firmware


I compiled the ArduCopter firmware and loaded it onto the Pixhawk using these instructions dev.ardupilot.com/wiki/building- … with-make/

When I start it up now everything seems to work and it shows “PreArm: INS not calibrated” in MissionPlanner (which is normal after loading a new firmware I assume?). Then when I go and try to calibrate it it first shows “Initializing APM…” for a while and then “Calibration FAILED”.

Does anyone know what the problem is or can be?
Compilation was done in a Linux Mint 17 virtual machine and I loaded the firmware using MissionPlanner.

Thanks in advance