Use last ardupilot releases on SITL + Gazebo or or ERLE-BRAIN 3

How to update ArduCopter erlerobotics to last release?

Hi.
with Link I setup simulation. in steps specific branch of ardupilot cloned. how to update to last version Copter-3.4.6 releases1 and so…

for example I update ArduCopter and library folder with last ardupilot releases, in “…/Tools/autotest/sim_vehicle.sh -j 4 -f Gazebo” occur some error:

compilation terminated.
make: *** [/tmp/ArduCopter.build/libraries/AP_Common/Location.o] Error 1
make: *** Waiting for unfinished jobs…
make: *** [/tmp/ArduCopter.build/libraries/GCS_MAVLink/GCS_Common.o] Error 1
make: *** [/tmp/ArduCopter.build/libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.o] Error 1
make: *** [/tmp/ArduCopter.build/libraries/AP_Param/AP_Param.o] Error 1
…/Tools/autotest/sim_vehicle.sh: Build failed

What is the certain way to update software ؟