Waf Building Error after 3.5.4 update

Hi all, today I just fetched the latest 3.5.4 to my repo and pulled it onto my local disk. Then I configured waf with board px4-v2 and started building the latest arducopter using “./waf copter”, however, the build failed and the error message is as follows:

Build failed
-> task in ‘bin/arducopter’ failed (exit status 1):
{task 140233206116096: cxx GCS_Mavlink.cpp -> GCS_Mavlink.cpp.18.o}
[’/home/osboxes/gcc-arm-none-eabi-5_4-2016q2/bin/arm-none-eabi-g++’, ‘-DCONFIG_ARCH_BOARD_PX4FMU_V2’, ‘-D__STDC_FORMAT_MACROS’, ‘-D__PX4_NUTTX’, ‘-D__DF_NUTTX’, ‘-g’, ‘-fno-exceptions’, ‘-fno-rtti’, ‘-std=gnu++0x’, ‘-fno-threadsafe-statics’, ‘-DCONFIG_WCHAR_BUILTIN’, ‘-D__CUSTOM_FILE_IO__’, ‘-Wall’, ‘-Werror’, ‘-Wextra’, ‘-Wno-sign-compare’, ‘-Wfloat-equal’, ‘-Wpointer-arith’, ‘-Wmissing-declarations’, ‘-Wno-unused-parameter’, ‘-Werror=format-security’, ‘-Werror=array-bounds’, ‘-Wfatal-errors’, ‘-Werror=unused-variable’, ‘-Werror=reorder’, ‘-Werror=uninitialized’, ‘-Werror=init-self’, ‘-Wframe-larger-than=1024’, ‘-Werror=unused-but-set-variable’, ‘-Wformat=1’, ‘-Wdouble-promotion’, ‘-Werror=double-promotion’, ‘-Wno-missing-field-initializers’, ‘-Os’, ‘-fno-strict-aliasing’, ‘-fomit-frame-pointer’, ‘-funsafe-math-optimizations’, ‘-ffunction-sections’, ‘-fdata-sections’, ‘-fno-strength-reduce’, ‘-fno-builtin-printf’, ‘-fvisibility=hidden’, ‘-include’, ‘visibility.h’, ‘-mcpu=cortex-m4’, ‘-mthumb’, ‘-march=armv7e-m’, ‘-mfpu=fpv4-sp-d16’, ‘-mfloat-abi=hard’, ‘-nodefaultlibs’, ‘-nostdlib’, ‘-std=gnu++11’, ‘-fdata-sections’, ‘-ffunction-sections’, ‘-fno-exceptions’, ‘-fsigned-char’, ‘-Wall’, ‘-Wextra’, ‘-Wformat’, ‘-Wshadow’, ‘-Wpointer-arith’, ‘-Wcast-align’, ‘-Wundef’, ‘-Wno-unused-parameter’, ‘-Wno-missing-field-initializers’, ‘-Wno-reorder’, ‘-Wno-redundant-decls’, ‘-Wno-unknown-pragmas’, ‘-Werror=format-security’, ‘-Werror=array-bounds’, ‘-Werror=uninitialized’, ‘-Werror=init-self’, ‘-Werror=switch’, ‘-Wfatal-errors’, ‘-Wno-trigraphs’, ‘-Werror=unused-but-set-variable’, ‘-Wno-error=cast-align’, ‘-Wlogical-op’, ‘-Wframe-larger-than=1300’, ‘-fsingle-precision-constant’, ‘-Wno-attributes’, ‘-Wno-error=double-promotion’, ‘-Wno-error=missing-declarations’, ‘-Wno-error=float-equal’, ‘-Wno-error=undef’, ‘-Wno-error=cpp’, ‘-include’, ‘ap_config.h’, ‘-Ilibraries’, ‘-Ilibraries/GCS_MAVLink’, ‘-Imodules/uavcan/libuavcan/include/dsdlc_generated’, ‘-I.’, ‘-I…/…/libraries’, ‘-I…/…/libraries/AP_Common/missing’, ‘-I…/…/modules/uavcan/libuavcan/include’, ‘-I…/…/modules/PX4Firmware/src’, ‘-Imodules/PX4Firmware’, ‘-Imodules/PX4Firmware/src’, ‘-I…/…/modules/PX4Firmware/src/modules’, ‘-I…/…/modules/PX4Firmware/src/include’, ‘-I…/…/modules/PX4Firmware/src/lib’, ‘-I…/…/modules/PX4Firmware/src/platforms’, ‘-I…/…/modules/PX4Firmware/src/drivers/boards/px4fmu-v2’, ‘-Imodules/PX4Firmware/src/modules/px4_messages’, ‘-Imodules/PX4Firmware/src/modules’, ‘-I…/…/modules/PX4Firmware/mavlink/include/mavlink’, ‘-I…/…/modules/PX4Firmware/src/lib/DriverFramework/framework/include’, ‘-IArduCopter/src/lib/matrix’, ‘-I…/…/ArduCopter/src/lib/matrix’, ‘-Imodules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/include’, ‘-Imodules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/include/cxx’, ‘-Imodules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/arch/chip’, ‘-Imodules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/arch/common’, ‘-DSKETCHBOOK="/home/osboxes/Desktop/ardupilot"’, ‘-DCONFIG_HAL_BOARD=HAL_BOARD_PX4’, ‘-DHAVE_OCLOEXEC=0’, ‘-DHAVE_STD_NULLPTR_T=0’, ‘-DUAVCAN_CPP_VERSION=UAVCAN_CPP03’, ‘-DUAVCAN_NO_ASSERTIONS=1’, ‘-DUAVCAN_NULLPTR=nullptr’, ‘-DFRAME_CONFIG=MULTICOPTER_FRAME’, ‘-DAPM_BUILD_DIRECTORY=APM_BUILD_ArduCopter’, ‘-DSKETCH=“ArduCopter”’, ‘-DSKETCHNAME=“ArduCopter”’, ‘…/…/ArduCopter/GCS_Mavlink.cpp’, ‘-c’, ‘-o/home/osboxes/Desktop/ardupilot/build/px4-v2/ArduCopter/GCS_Mavlink.cpp.18.o’]

When I tried to build only example sketches, similar problem occurs only with “objs/AP_Mission/UNKNOWN” and with the file AP_Mission.cpp.
The problem never occurred when I was using 3.5.3, and when I updated to 3.5.4, there was no serious conflict----only a merge conflict upon an example sketch occurred which I resolved by changing back the values.

OK, problem solved.
Found out it was caused by the inconsistency introduced by not updating the submodules. So besides fetching from the remote upstream (https://github.com/ArduPilot/ardupilot.git), it is also essential to update the submodules by “git submodule update --remote”.