Cannot build PX4 Firmware on mac

With latest px4 firmware and git updated, I still cannot build the target.
Here is what I got when tried to make px4fmu-v2_default

[ 11%] Building NuttX for px4fmu-v2 with nsh
stdio/lib_dtoa.c:820:21: error: ‘tinytens’ defined but not used [-Werror=unused-const-variable=]
static const double tinytens[] =
^~~~~~~~
nsh_syscmds.c:89:19: error: ‘g_unknown’ defined but not used [-Werror=unused-const-variable=]
static const char g_unknown[] = “unknown”;
^~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [nsh_syscmds.o] Error 1
make[5]: *** [nshlib_all] Error 2
make[4]: *** […/apps/libapps.a] Error 2
make[4]: *** Waiting for unfinished jobs…
cc1: all warnings being treated as errors
make[5]: *** [bin/lib_dtoa.o] Error 1
make[5]: *** Waiting for unfinished jobs…
make[4]: *** [libc/libc.a] Error 2
make[3]: *** [px4fmu-v2/nuttx_export.stamp] Error 2
make[2]: *** [CMakeFiles/nuttx_export_px4fmu-v2.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [px4fmu-v2_default] Error 2

and cmake version is 3.8.0

Does your compiler version match the developer documentation? https://dev.px4.io/en/setup/dev_env_mac.html

Hi dagar,
Well, my other git version
“PX4 VERSION: v1.6.0rc1-749-g0b8e88f” builds no problem however
the latest git cloned version
“PX4 VERSION: v1.6.0rc1-945-gfc30f88” builds gives above error.

I don’t understand why -Werror=unused-const-variable causes build error.

There was a NuttX problem where these warnings flags weren’t being used in the build.
Can you make sure you’re updated to latest PX4 master, run make distclean and try rebuilding?

If that doesn’t work please share the full output, including the configure step at the beginning with compilers versions.

make distclean didn’t help solving the problem.

$ make distclean
Removing .DS_Store
Synchronizing submodule url for ‘NuttX’
Synchronizing submodule url for ‘NuttX/NxWidgets’
Synchronizing submodule url for ‘NuttX/apps’
Synchronizing submodule url for ‘NuttX/misc/tools’
Synchronizing submodule url for ‘NuttX/nuttx’
Synchronizing submodule url for ‘Tools/gencpp’
Synchronizing submodule url for ‘Tools/genmsg’
Synchronizing submodule url for ‘Tools/jMAVSim’
Synchronizing submodule url for ‘Tools/jMAVSim/jMAVlib’
Synchronizing submodule url for ‘Tools/sitl_gazebo’
Synchronizing submodule url for ‘Tools/sitl_gazebo/external/OpticalFlow’
Synchronizing submodule url for ‘Tools/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker’
Synchronizing submodule url for ‘cmake/cmake_hexagon’
Synchronizing submodule url for ‘mavlink/include/mavlink/v1.0’
Synchronizing submodule url for ‘mavlink/include/mavlink/v2.0’
Synchronizing submodule url for ‘src/drivers/gps/devices’
Synchronizing submodule url for ‘src/lib/DriverFramework’
Synchronizing submodule url for ‘src/lib/DriverFramework/dspal’
Synchronizing submodule url for ‘src/lib/DriverFramework/dspal/cmake_hexagon’
Synchronizing submodule url for ‘src/lib/ecl’
Synchronizing submodule url for ‘src/lib/ecl/matrix’
Synchronizing submodule url for ‘src/lib/matrix’
Synchronizing submodule url for ‘src/modules/uavcan/libuavcan’
Synchronizing submodule url for ‘src/modules/uavcan/libuavcan/dsdl’
Synchronizing submodule url for ‘src/modules/uavcan/libuavcan/libuavcan/dsdl_compiler/pyuavcan’
Synchronizing submodule url for ‘src/modules/uavcan/libuavcan/libuavcan/dsdl_compiler/pyuavcan/dsdl’
Synchronizing submodule url for ‘unittests/googletest’
Submodule path ‘NuttX’: checked out ‘44ad7e224c1ef17911ab8b4101fd624ad9ee4177’
Submodule path ‘NuttX/NxWidgets’: checked out ‘275a9281b1c782912b7bb02ff033d0713171f8b8’
Submodule path ‘NuttX/apps’: checked out ‘bfec325aded112dbad1194494e53c11ef4713ae3’
Submodule path ‘NuttX/misc/tools’: checked out ‘5ed6d86a6b2990314abf440e6c50e8f3bb3ae031’
Submodule path ‘NuttX/nuttx’: checked out ‘8b81cf5c7ece0c228eaaea3e9d8e667fc4d21a06’
Submodule path ‘Tools/gencpp’: checked out ‘26a86f04bcec0018af6652b3ddd3f680e6e3fa2a’
Submodule path ‘Tools/genmsg’: checked out ‘72f0383f0e6a489214c51802ae12d6e271b1e454’
Submodule path ‘Tools/jMAVSim’: checked out ‘cc62e5b61d3cd67854bfc1d46840ba081f44da81’
Submodule path ‘Tools/jMAVSim/jMAVlib’: checked out ‘44ad30b704fec791fa76f26b958bcba450da616e’
Submodule path ‘Tools/sitl_gazebo’: checked out ‘f2b29a7e20849721d40fbc20816b4183bdb9e4a7’
Submodule path ‘Tools/sitl_gazebo/external/OpticalFlow’: checked out ‘a36a1b04ad47488451d36edac12a2f55ed81f17f’
Submodule path ‘Tools/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker’: checked out ‘34871a67648e560c7125de5ab79404f81f9d0caa’
Submodule path ‘cmake/cmake_hexagon’: checked out ‘07168bd5715818802b78f674816ec851307998a7’
Submodule path ‘mavlink/include/mavlink/v1.0’: checked out ‘ba39afecc6ad838f4ec22fb5487b6d0a770b3bcf’
Submodule path ‘mavlink/include/mavlink/v2.0’: checked out ‘0c358ad66f4a7442177780712cdff6309a85a6b1’
Submodule path ‘src/drivers/gps/devices’: checked out ‘c32a3980d0a8e8323cd3750015b3b447aa663ddf’
Submodule path ‘src/lib/DriverFramework’: checked out ‘87de5cbab3e652b4dfdf2161f2440437b89ee399’
Submodule path ‘src/lib/DriverFramework/dspal’: checked out ‘9b46b4a57f230672ee0806a523963af70bc44f1c’
Submodule path ‘src/lib/DriverFramework/dspal/cmake_hexagon’: checked out ‘07168bd5715818802b78f674816ec851307998a7’
Submodule path ‘src/lib/ecl’: checked out ‘c62bdcbdb2bb5df27455af03ffde2ba1f39ab6b9’
Submodule path ‘src/lib/ecl/matrix’: checked out ‘cf924956d7d62ce18bfc4f8441e9177ddb69c0dc’
Submodule path ‘src/lib/matrix’: checked out ‘471e96ff6f5f22018b782441c6a8df19d8294181’
Submodule path ‘src/modules/uavcan/libuavcan’: checked out ‘4a9da04407244e22de4f9da601cbf79a39ff690b’
Submodule path ‘src/modules/uavcan/libuavcan/dsdl’: checked out ‘f28ecec932abef318b660bc1e3669772aa2de175’
Submodule path ‘src/modules/uavcan/libuavcan/libuavcan/dsdl_compiler/pyuavcan’: checked out ‘c58477a644d20ccf95a20c151f3a0402f271c3b8’
Submodule path ‘src/modules/uavcan/libuavcan/libuavcan/dsdl_compiler/pyuavcan/dsdl’: checked out ‘fd12483ddd4e58242d61d74a163e7aeaa1e0f466’
Submodule path ‘unittests/googletest’: checked out ‘c99458533a9b4c743ed51537e25989ea55944908’
Removing .DS_Store
Removing .settings/
Removing Tools/px4airframes/init.pyc
Removing Tools/px4airframes/markdownout.pyc
Removing Tools/px4airframes/rcout.pyc
Removing Tools/px4airframes/srcparser.pyc
Removing Tools/px4airframes/srcscanner.pyc
Removing Tools/px4airframes/xmlout.pyc
Removing Tools/px4params/init.pyc
Removing Tools/px4params/dokuwikiout.pyc
Removing Tools/px4params/dokuwikirpc.pyc
Removing Tools/px4params/markdownout.pyc
Removing Tools/px4params/srcparser.pyc
Removing Tools/px4params/srcscanner.pyc
Removing Tools/px4params/xmlout.pyc
Removing build_px4fmu-v2_default/

here is the full output from the make px4fmu-v2_default

$ make px4fmu-v2_default
– PX4 VERSION: v1.6.0rc1-945-gfc30f88
– CONFIG: nuttx-px4fmu-v2-default
– CMAKE_MODULE_PATH: /Users/kyuhyongyou/px4/src/Firmware/cmake
– Nuttx build for px4fmu-v2 on m4 hardware, using nsh with ROMFS on px4fmu_common
CMake Deprecation Warning at /usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeForceCompiler.cmake:69 (message):
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:31 (cmake_force_c_compiler)
/usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeDetermineSystem.cmake:88 (include)
CMakeLists.txt:260 (project)

CMake Deprecation Warning at /usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeForceCompiler.cmake:83 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:37 (cmake_force_cxx_compiler)
/usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeDetermineSystem.cmake:88 (include)
CMakeLists.txt:260 (project)

CMake Deprecation Warning at /usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeForceCompiler.cmake:69 (message):
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:31 (cmake_force_c_compiler)
build_px4fmu-v2_default/CMakeFiles/3.8.0/CMakeSystem.cmake:6 (include)
CMakeLists.txt:260 (project)

CMake Deprecation Warning at /usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeForceCompiler.cmake:83 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:37 (cmake_force_cxx_compiler)
build_px4fmu-v2_default/CMakeFiles/3.8.0/CMakeSystem.cmake:6 (include)
CMakeLists.txt:260 (project)

– The ASM compiler identification is GNU
– Found assembler: /usr/local/bin/arm-none-eabi-gcc
– Found PythonInterp: /usr/local/bin/python (found version “2.7.13”)
– Found PY_jinja2: /usr/local/lib/python2.7/site-packages/jinja2
– C compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors 6-2017-q1-update) 6.3.1 20170215 (release) [ARM/embedded-6-branch revision 245512]
– C++ compiler: arm-none-eabi-g++ (GNU Tools for ARM Embedded Processors 6-2017-q1-update) 6.3.1 20170215 (release) [ARM/embedded-6-branch revision 245512]
– Adding ROMFS on px4fmu-v2
– Nuttx build for px4fmu-v2 on m3 hardware, using nsh
– Configuring done
– Generating done
– Build files have been written to: /Users/kyuhyongyou/px4/src/Firmware/build_px4fmu-v2_default
Scanning dependencies of target ver_gen
Scanning dependencies of target git_genmsg
Scanning dependencies of target git_gencpp
Scanning dependencies of target git_nuttx
[ 0%] Generating git hash header
[ 0%] Generating git_init_Tools_genmsg.stamp
[ 0%] Generating git_init_NuttX.stamp
[ 0%] Generating git_init_Tools_gencpp.stamp
[ 0%] Built target git_genmsg
[ 0%] Built target git_nuttx
[ 0%] Built target git_gencpp
Scanning dependencies of target git_mavlink
Scanning dependencies of target git_uavcan
[ 0%] Generating git_init_src_modules_uavcan_libuavcan.stamp
Scanning dependencies of target git_matrix
[ 0%] Generating git_init_mavlink_include_mavlink_v1.0.stamp
[ 0%] Built target git_uavcan
[ 0%] Generating git_init_src_lib_matrix.stamp
[ 0%] Built target git_mavlink
Scanning dependencies of target mixer_gen
[ 0%] Built target git_matrix
[ 0%] Generating mixer_multirotor.generated.h
Scanning dependencies of target git_ecl
[ 0%] Generating git_init_src_lib_ecl.stamp
[ 0%] Built target git_ecl
Scanning dependencies of target xml_gen
[ 0%] Built target mixer_gen
[ 0%] Generating parameters.xml
[ 0%] Built target ver_gen
[ 1%] Generating airframes.xml
Scanning dependencies of target nuttx_copy_px4fmu-v2
Scanning dependencies of target nuttx_copy_px4io-v2
[ 1%] Built target xml_gen
[ 2%] Copying NuttX for px4io-v2 with nsh
[ 2%] Copying NuttX for px4fmu-v2 with nsh
[ 2%] Built target nuttx_copy_px4io-v2
Scanning dependencies of target px4io-v2-nuttx_patch_00001-REJECTED-add-math.h.patch
[ 2%] px4io-v2: nuttx-patches/00001-REJECTED-add-math.h.patch applied
[ 2%] Built target px4io-v2-nuttx_patch_00001-REJECTED-add-math.h.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00002-REJECTED-fix-shadow-wanings.patch
[ 2%] px4io-v2: nuttx-patches/00002-REJECTED-fix-shadow-wanings.patch applied
[ 2%] Built target px4io-v2-nuttx_patch_00002-REJECTED-fix-shadow-wanings.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00003-REJECTED-add-var-expansion-in-nsh-parse.patch
[ 3%] px4io-v2: nuttx-patches/00003-REJECTED-add-var-expansion-in-nsh-parse.patch applied
[ 3%] Built target px4io-v2-nuttx_patch_00003-REJECTED-add-var-expansion-in-nsh-parse.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00004-REJECTED-avoid-export-copy-with-export-insitu.patch
[ 3%] px4io-v2: nuttx-patches/00004-REJECTED-avoid-export-copy-with-export-insitu.patch applied
[ 3%] Built target nuttx_copy_px4fmu-v2
Scanning dependencies of target px4fmu-v2-nuttx_patch_00001-REJECTED-add-math.h.patch
[ 3%] Built target px4io-v2-nuttx_patch_00004-REJECTED-avoid-export-copy-with-export-insitu.patch
[ 3%] px4fmu-v2: nuttx-patches/00001-REJECTED-add-math.h.patch applied
Scanning dependencies of target px4io-v2-nuttx_patch_00005-REJECTED-support-c++11.patch
[ 3%] px4io-v2: nuttx-patches/00005-REJECTED-support-c++11.patch applied
[ 3%] Built target px4fmu-v2-nuttx_patch_00001-REJECTED-add-math.h.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00002-REJECTED-fix-shadow-wanings.patch
[ 3%] Built target px4io-v2-nuttx_patch_00005-REJECTED-support-c++11.patch
[ 3%] px4fmu-v2: nuttx-patches/00002-REJECTED-fix-shadow-wanings.patch applied
Scanning dependencies of target px4io-v2-nuttx_patch_00006-REJECTED-cstdint-fix.patch
[ 3%] px4io-v2: nuttx-patches/00006-REJECTED-cstdint-fix.patch applied
[ 3%] Built target px4fmu-v2-nuttx_patch_00002-REJECTED-fix-shadow-wanings.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00003-REJECTED-add-var-expansion-in-nsh-parse.patch
[ 3%] Built target px4io-v2-nuttx_patch_00006-REJECTED-cstdint-fix.patch
[ 3%] px4fmu-v2: nuttx-patches/00003-REJECTED-add-var-expansion-in-nsh-parse.patch applied
Scanning dependencies of target px4io-v2-nuttx_patch_00007-REJECTED-silence-jobserver-warnings.patch
[ 3%] px4io-v2: nuttx-patches/00007-REJECTED-silence-jobserver-warnings.patch applied
[ 3%] Built target px4fmu-v2-nuttx_patch_00003-REJECTED-add-var-expansion-in-nsh-parse.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00004-REJECTED-avoid-export-copy-with-export-insitu.patch
[ 3%] Built target px4io-v2-nuttx_patch_00007-REJECTED-silence-jobserver-warnings.patch
[ 3%] px4fmu-v2: nuttx-patches/00004-REJECTED-avoid-export-copy-with-export-insitu.patch applied
Scanning dependencies of target px4io-v2-nuttx_patch_00008-REJECTED-static-assert-fix.patch
[ 3%] px4io-v2: nuttx-patches/00008-REJECTED-static-assert-fix.patch applied
[ 3%] Built target px4fmu-v2-nuttx_patch_00004-REJECTED-avoid-export-copy-with-export-insitu.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00005-REJECTED-support-c++11.patch
[ 3%] Built target px4io-v2-nuttx_patch_00008-REJECTED-static-assert-fix.patch
[ 4%] px4fmu-v2: nuttx-patches/00005-REJECTED-support-c++11.patch applied
Scanning dependencies of target px4io-v2-nuttx_patch_00009-REJECTED-ctype-fix-shadow-wanings.patch
[ 4%] Built target px4fmu-v2-nuttx_patch_00005-REJECTED-support-c++11.patch
[ 5%] px4io-v2: nuttx-patches/00009-REJECTED-ctype-fix-shadow-wanings.patch applied
Scanning dependencies of target px4fmu-v2-nuttx_patch_00006-REJECTED-cstdint-fix.patch
[ 5%] px4fmu-v2: nuttx-patches/00006-REJECTED-cstdint-fix.patch applied
[ 5%] Built target px4io-v2-nuttx_patch_00009-REJECTED-ctype-fix-shadow-wanings.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00010-BACKPORT-stm32-flash-F4-dcache-corruption-fix-no-HSI-on.patch
[ 5%] Built target px4fmu-v2-nuttx_patch_00006-REJECTED-cstdint-fix.patch
[ 5%] px4io-v2: nuttx-patches/00010-BACKPORT-stm32-flash-F4-dcache-corruption-fix-no-HSI-on.patch applied
Scanning dependencies of target px4fmu-v2-nuttx_patch_00007-REJECTED-silence-jobserver-warnings.patch
[ 5%] px4fmu-v2: nuttx-patches/00007-REJECTED-silence-jobserver-warnings.patch applied
[ 5%] Built target px4io-v2-nuttx_patch_00010-BACKPORT-stm32-flash-F4-dcache-corruption-fix-no-HSI-on.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00011-BACKPORT-priority-restoration-fix.patch
[ 5%] Built target px4fmu-v2-nuttx_patch_00007-REJECTED-silence-jobserver-warnings.patch
[ 5%] px4io-v2: nuttx-patches/00011-BACKPORT-priority-restoration-fix.patch applied
Scanning dependencies of target px4fmu-v2-nuttx_patch_00008-REJECTED-static-assert-fix.patch
[ 5%] px4fmu-v2: nuttx-patches/00008-REJECTED-static-assert-fix.patch applied
[ 5%] Built target px4io-v2-nuttx_patch_00011-BACKPORT-priority-restoration-fix.patch
[ 5%] Built target px4fmu-v2-nuttx_patch_00008-REJECTED-static-assert-fix.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00012-BACKPORT-stack-coloration-overreach-fix.patch
[ 5%] px4io-v2: nuttx-patches/00012-BACKPORT-stack-coloration-overreach-fix.patch applied
Scanning dependencies of target px4fmu-v2-nuttx_patch_00009-REJECTED-ctype-fix-shadow-wanings.patch
[ 5%] px4fmu-v2: nuttx-patches/00009-REJECTED-ctype-fix-shadow-wanings.patch applied
[ 5%] Built target px4io-v2-nuttx_patch_00012-BACKPORT-stack-coloration-overreach-fix.patch
[ 5%] Built target px4fmu-v2-nuttx_patch_00009-REJECTED-ctype-fix-shadow-wanings.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00013-BACKPORT-stm32-serial-dma-hotfix.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00010-BACKPORT-stm32-flash-F4-dcache-corruption-fix-no-HSI-on.patch
[ 5%] px4io-v2: nuttx-patches/00013-BACKPORT-stm32-serial-dma-hotfix.patch applied
[ 6%] px4fmu-v2: nuttx-patches/00010-BACKPORT-stm32-flash-F4-dcache-corruption-fix-no-HSI-on.patch applied
[ 6%] Built target px4io-v2-nuttx_patch_00013-BACKPORT-stm32-serial-dma-hotfix.patch
[ 6%] Built target px4fmu-v2-nuttx_patch_00010-BACKPORT-stm32-flash-F4-dcache-corruption-fix-no-HSI-on.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00011-BACKPORT-priority-restoration-fix.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00014-BACKPORT-i2c-hotfix.patch
[ 6%] px4io-v2: nuttx-patches/00014-BACKPORT-i2c-hotfix.patch applied
[ 6%] px4fmu-v2: nuttx-patches/00011-BACKPORT-priority-restoration-fix.patch applied
[ 6%] Built target px4fmu-v2-nuttx_patch_00011-BACKPORT-priority-restoration-fix.patch
[ 6%] Built target px4io-v2-nuttx_patch_00014-BACKPORT-i2c-hotfix.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00012-BACKPORT-stack-coloration-overreach-fix.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00015-BACKPORT-stm32f7-DTCM.patch
[ 6%] px4fmu-v2: nuttx-patches/00012-BACKPORT-stack-coloration-overreach-fix.patch applied
[ 7%] px4io-v2: nuttx-patches/00015-BACKPORT-stm32f7-DTCM.patch applied
[ 7%] Built target px4io-v2-nuttx_patch_00015-BACKPORT-stm32f7-DTCM.patch
[ 7%] Built target px4fmu-v2-nuttx_patch_00012-BACKPORT-stack-coloration-overreach-fix.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00016-BACKPORT-fix-CRTSCTS-defines.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00013-BACKPORT-stm32-serial-dma-hotfix.patch
[ 7%] px4io-v2: nuttx-patches/00016-BACKPORT-fix-CRTSCTS-defines.patch applied
[ 7%] px4fmu-v2: nuttx-patches/00013-BACKPORT-stm32-serial-dma-hotfix.patch applied
[ 7%] Built target px4io-v2-nuttx_patch_00016-BACKPORT-fix-CRTSCTS-defines.patch
[ 7%] Built target px4fmu-v2-nuttx_patch_00013-BACKPORT-stm32-serial-dma-hotfix.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00017-BACKPORT-cdcacm.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00014-BACKPORT-i2c-hotfix.patch
[ 7%] px4io-v2: nuttx-patches/00017-BACKPORT-cdcacm.patch applied
[ 7%] px4fmu-v2: nuttx-patches/00014-BACKPORT-i2c-hotfix.patch applied
[ 7%] Built target px4io-v2-nuttx_patch_00017-BACKPORT-cdcacm.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00018-BACKPORT-stm32-serial-break.patch
[ 7%] Built target px4fmu-v2-nuttx_patch_00014-BACKPORT-i2c-hotfix.patch
[ 7%] px4io-v2: nuttx-patches/00018-BACKPORT-stm32-serial-break.patch applied
Scanning dependencies of target px4fmu-v2-nuttx_patch_00015-BACKPORT-stm32f7-DTCM.patch
[ 7%] px4fmu-v2: nuttx-patches/00015-BACKPORT-stm32f7-DTCM.patch applied
[ 7%] Built target px4io-v2-nuttx_patch_00018-BACKPORT-stm32-serial-break.patch
[ 7%] Built target px4fmu-v2-nuttx_patch_00015-BACKPORT-stm32f7-DTCM.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00019-BACKPORT-stm32-rcc-keep-HSI-on.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00016-BACKPORT-fix-CRTSCTS-defines.patch
[ 7%] px4io-v2: nuttx-patches/00019-BACKPORT-stm32-rcc-keep-HSI-on.patch applied
[ 8%] px4fmu-v2: nuttx-patches/00016-BACKPORT-fix-CRTSCTS-defines.patch applied
[ 8%] Built target px4io-v2-nuttx_patch_00019-BACKPORT-stm32-rcc-keep-HSI-on.patch
[ 8%] Built target px4fmu-v2-nuttx_patch_00016-BACKPORT-fix-CRTSCTS-defines.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00020-BACKPORT-ramtron-CONFIG-prefix.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00017-BACKPORT-cdcacm.patch
[ 9%] px4io-v2: nuttx-patches/00020-BACKPORT-ramtron-CONFIG-prefix.patch applied
[ 9%] px4fmu-v2: nuttx-patches/00017-BACKPORT-cdcacm.patch applied
[ 9%] Built target px4io-v2-nuttx_patch_00020-BACKPORT-ramtron-CONFIG-prefix.patch
[ 9%] Built target px4fmu-v2-nuttx_patch_00017-BACKPORT-cdcacm.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00021-BACKPORT-stm32f3x-add-BKP.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00018-BACKPORT-stm32-serial-break.patch
[ 9%] px4io-v2: nuttx-patches/00021-BACKPORT-stm32f3x-add-BKP.patch applied
[ 9%] px4fmu-v2: nuttx-patches/00018-BACKPORT-stm32-serial-break.patch applied
[ 9%] Built target px4fmu-v2-nuttx_patch_00018-BACKPORT-stm32-serial-break.patch
[ 9%] Built target px4io-v2-nuttx_patch_00021-BACKPORT-stm32f3x-add-BKP.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00019-BACKPORT-stm32-rcc-keep-HSI-on.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00022-BACKPORT-stm32-bkp-reference-fix.patch
[ 9%] px4fmu-v2: nuttx-patches/00019-BACKPORT-stm32-rcc-keep-HSI-on.patch applied
[ 9%] px4io-v2: nuttx-patches/00022-BACKPORT-stm32-bkp-reference-fix.patch applied
[ 9%] Built target px4fmu-v2-nuttx_patch_00019-BACKPORT-stm32-rcc-keep-HSI-on.patch
[ 9%] Built target px4io-v2-nuttx_patch_00022-BACKPORT-stm32-bkp-reference-fix.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00020-BACKPORT-ramtron-CONFIG-prefix.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00023-BACKPORT-stm32f7-bkp-reference-fix.patch
[ 9%] px4fmu-v2: nuttx-patches/00020-BACKPORT-ramtron-CONFIG-prefix.patch applied
[ 9%] px4io-v2: nuttx-patches/00023-BACKPORT-stm32f7-bkp-reference-fix.patch applied
[ 9%] Built target px4fmu-v2-nuttx_patch_00020-BACKPORT-ramtron-CONFIG-prefix.patch
[ 9%] Built target px4io-v2-nuttx_patch_00023-BACKPORT-stm32f7-bkp-reference-fix.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00021-BACKPORT-stm32f3x-add-BKP.patch
Scanning dependencies of target px4io-v2-nuttx_patch_00024-BACKPORT-stm32f7-serial-dma-hotfix.patch
[ 9%] px4fmu-v2: nuttx-patches/00021-BACKPORT-stm32f3x-add-BKP.patch applied
[ 9%] px4io-v2: nuttx-patches/00024-BACKPORT-stm32f7-serial-dma-hotfix.patch applied
[ 9%] Built target px4fmu-v2-nuttx_patch_00021-BACKPORT-stm32f3x-add-BKP.patch
[ 9%] Built target px4io-v2-nuttx_patch_00024-BACKPORT-stm32f7-serial-dma-hotfix.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00022-BACKPORT-stm32-bkp-reference-fix.patch
[ 10%] px4fmu-v2: nuttx-patches/00022-BACKPORT-stm32-bkp-reference-fix.patch applied
Scanning dependencies of target px4io-v2-nuttx_patch_00025-BACKPORT-add-set-ex-to-nsh.patch
[ 10%] px4io-v2: nuttx-patches/00025-BACKPORT-add-set-ex-to-nsh.patch applied
[ 10%] Built target px4fmu-v2-nuttx_patch_00022-BACKPORT-stm32-bkp-reference-fix.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00023-BACKPORT-stm32f7-bkp-reference-fix.patch
[ 10%] Built target px4io-v2-nuttx_patch_00025-BACKPORT-add-set-ex-to-nsh.patch
[ 10%] px4fmu-v2: nuttx-patches/00023-BACKPORT-stm32f7-bkp-reference-fix.patch applied
Scanning dependencies of target px4io-v2-nuttx_patch_90000-PENDING-wip-inflight-to-upstream.patch
[ 11%] px4io-v2: nuttx-patches/90000-PENDING-wip-inflight-to-upstream.patch applied
[ 11%] Built target px4fmu-v2-nuttx_patch_00023-BACKPORT-stm32f7-bkp-reference-fix.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_00024-BACKPORT-stm32f7-serial-dma-hotfix.patch
[ 11%] Built target px4io-v2-nuttx_patch_90000-PENDING-wip-inflight-to-upstream.patch
[ 11%] px4fmu-v2: nuttx-patches/00024-BACKPORT-stm32f7-serial-dma-hotfix.patch applied
Scanning dependencies of target nuttx_patch_px4io-v2
[ 11%] Built target px4fmu-v2-nuttx_patch_00024-BACKPORT-stm32f7-serial-dma-hotfix.patch
[ 11%] Built target nuttx_patch_px4io-v2
Scanning dependencies of target px4fmu-v2-nuttx_patch_00025-BACKPORT-add-set-ex-to-nsh.patch
Scanning dependencies of target nuttx_configure_px4io-v2
[ 11%] Configuring NuttX for px4io-v2 with nsh
[ 11%] px4fmu-v2: nuttx-patches/00025-BACKPORT-add-set-ex-to-nsh.patch applied
[ 11%] Built target px4fmu-v2-nuttx_patch_00025-BACKPORT-add-set-ex-to-nsh.patch
Scanning dependencies of target px4fmu-v2-nuttx_patch_90000-PENDING-wip-inflight-to-upstream.patch
[ 11%] px4fmu-v2: nuttx-patches/90000-PENDING-wip-inflight-to-upstream.patch applied
[ 11%] Built target nuttx_configure_px4io-v2
[ 11%] Built target px4fmu-v2-nuttx_patch_90000-PENDING-wip-inflight-to-upstream.patch
Scanning dependencies of target nuttx_patch_px4fmu-v2
Scanning dependencies of target nuttx_export_px4io-v2
[ 11%] Building NuttX for px4io-v2 with nsh
[ 11%] Built target nuttx_patch_px4fmu-v2
Scanning dependencies of target nuttx_configure_px4fmu-v2
[ 11%] Configuring NuttX for px4fmu-v2 with nsh
[ 11%] Built target nuttx_configure_px4fmu-v2
Scanning dependencies of target nuttx_export_px4fmu-v2
[ 11%] Building NuttX for px4fmu-v2 with nsh
stdio/lib_dtoa.c:820:21: error: ‘tinytens’ defined but not used [-Werror=unused-const-variable=]
static const double tinytens[] =
^~~~~~~~
nsh_syscmds.c:89:19: error: ‘g_unknown’ defined but not used [-Werror=unused-const-variable=]
static const char g_unknown[] = “unknown”;
^~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [nsh_syscmds.o] Error 1
make[5]: *** [nshlib_all] Error 2
make[4]: *** […/apps/libapps.a] Error 2
make[4]: *** Waiting for unfinished jobs…
cc1: all warnings being treated as errors
make[5]: *** [bin/lib_dtoa.o] Error 1
make[5]: *** Waiting for unfinished jobs…
make[4]: *** [libc/libc.a] Error 2
make[3]: *** [px4fmu-v2/nuttx_export.stamp] Error 2
make[2]: *** [CMakeFiles/nuttx_export_px4fmu-v2.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs…
[ 11%] Built target nuttx_export_px4io-v2
make[1]: *** [all] Error 2
make: *** [px4fmu-v2_default] Error 2

You’re using GCC 6.3.1. If you follow the dev guide instructions you should have 5.4.1. You’ll either need to fix this warnings so that you can build with 6.3, or switch to version the builds use.
https://circleci.com/gh/PX4/Firmware/5137

-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/bin/arm-none-eabi-gcc
-- Found PythonInterp: /usr/bin/python (found version "2.7.10") 
-- Found PY_jinja2: /Library/Python/2.7/site-packages/jinja2  
-- C compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
-- C++ compiler: arm-none-eabi-g++ (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
-- Using C++03
-- Release build type: RelWithDebInfo
-- Adding UAVCAN STM32 platform driver
-- Adding ROMFS on px4fmu-v3
-- Nuttx build for px4fmu-v3 on m3 hardware, using nsh 
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/distiller/Firmware/build_px4fmu-v3_default

OK I finally can solve this issue by uninstalling cask installed gcc-arm and reinstall gcc-arm 5.4 and re link the compiler as shown below.
It’s been a long way to figure this out.
Thanks for your help!

$ brew cask uninstall gcc-arm-embedded

then

$ brew install gcc-arm-none-eabi-54

or

$ brew reinstall gcc-arm-none-eabi-54

then

$ brew unlink gcc-arm-none-eabi
$ brew link gcc-arm-none-eabi-54

now I get

$ make px4fmu-v2_default
– PX4 VERSION: v1.6.0rc1-945-gfc30f88
– CONFIG: nuttx-px4fmu-v2-default
– CMAKE_MODULE_PATH: /Users/kyuhyongyou/px4/src/Firmware/cmake
– Nuttx build for px4fmu-v2 on m4 hardware, using nsh with ROMFS on px4fmu_common
CMake Deprecation Warning at /usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeForceCompiler.cmake:69 (message):
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:31 (cmake_force_c_compiler)
/usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeDetermineSystem.cmake:88 (include)
CMakeLists.txt:260 (project)

CMake Deprecation Warning at /usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeForceCompiler.cmake:83 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:37 (cmake_force_cxx_compiler)
/usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeDetermineSystem.cmake:88 (include)
CMakeLists.txt:260 (project)

CMake Deprecation Warning at /usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeForceCompiler.cmake:69 (message):
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:31 (cmake_force_c_compiler)
build_px4fmu-v2_default/CMakeFiles/3.8.0/CMakeSystem.cmake:6 (include)
CMakeLists.txt:260 (project)

CMake Deprecation Warning at /usr/local/Cellar/cmake/3.8.0/share/cmake/Modules/CMakeForceCompiler.cmake:83 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:37 (cmake_force_cxx_compiler)
build_px4fmu-v2_default/CMakeFiles/3.8.0/CMakeSystem.cmake:6 (include)
CMakeLists.txt:260 (project)

– The ASM compiler identification is GNU
– Found assembler: /usr/local/bin/arm-none-eabi-gcc
– Found PythonInterp: /usr/local/bin/python (found version “2.7.13”)
– Found PY_jinja2: /usr/local/lib/python2.7/site-packages/jinja2
– C compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
– C++ compiler: arm-none-eabi-g++ (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
– Adding ROMFS on px4fmu-v2
– Nuttx build for px4fmu-v2 on m3 hardware, using nsh
– Configuring done
– Generating done
– Build files have been written to: /Users/kyuhyongyou/px4/src/Firmware/build_px4fmu-v2_default
[549/549] Generating px4fmu-v2_default.px4, firmware_nuttx.bin