Home        Store        Learn        Blog

Build cmake error

i am not able to build using ./waf build sub
here is the command output

Waf: Entering directory `/home/sudheesh/ardupilot/build/px4-v2’
[ 8/14] CMake Configure px4
– nuttx-px4fmu-v2-apm
– could not find gdbtui
– could not find ddd
– Found PythonInterp: /usr/bin/python (found version “2.7.12”)
– GIT_DESC = 8d505a020154e4e59f50b34735f9739b6f36b800
– Configuring done
– Generating done
– Build files have been written to: /home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware
INCLUDE_DIRS=/home/sudheesh/ardupilot/modules/PX4Firmware/src;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/src;/home/sudheesh/ardupilot/modules/PX4Firmware/src/modules;/home/sudheesh/ardupilot/modules/PX4Firmware/src/include;/home/sudheesh/ardupilot/modules/PX4Firmware/src/lib;/home/sudheesh/ardupilot/modules/PX4Firmware/src/platforms;/home/sudheesh/ardupilot/modules/PX4Firmware/src/drivers/boards/px4fmu-v2;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/src/modules/px4_messages;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/src/modules;/home/sudheesh/ardupilot/modules/PX4Firmware/mavlink/include/mavlink;/home/sudheesh/ardupilot/modules/PX4Firmware/src/lib/DriverFramework/framework/include;src/lib/matrix;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/include;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/include/cxx;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/arch/chip;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/arch/common
ADDING DRIVERS

[13/14] CMake Build px4 msg_gen
Scanning dependencies of target git_genmsg
[ 0%] Built target git_genmsg
Scanning dependencies of target git_gencpp
[ 50%] Built target git_gencpp
Scanning dependencies of target msg_gen
[100%] Built target msg_gen
[14/14] CMake Build px4 prebuild_targets
Scanning dependencies of target __nuttx_patch_px4fmu-v2
[ 0%] Built target __nuttx_patch_px4fmu-v2
Scanning dependencies of target __nuttx_copy_px4fmu-v2
[ 0%] Built target __nuttx_copy_px4fmu-v2
Scanning dependencies of target nuttx_export_px4fmu-v2
[100%] Built target nuttx_export_px4fmu-v2
Scanning dependencies of target prebuild_targets
[100%] Built target prebuild_targets
[ 387/1141] CMake Configure px4
– nuttx-px4fmu-v2-apm
– could not find gdbtui
– could not find ddd
– Found PythonInterp: /usr/bin/python (found version “2.7.12”)
– GIT_DESC = 8d505a020154e4e59f50b34735f9739b6f36b800
– Configuring done
– Generating done
– Build files have been written to: /home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware
INCLUDE_DIRS=/home/sudheesh/ardupilot/modules/PX4Firmware/src;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/src;/home/sudheesh/ardupilot/modules/PX4Firmware/src/modules;/home/sudheesh/ardupilot/modules/PX4Firmware/src/include;/home/sudheesh/ardupilot/modules/PX4Firmware/src/lib;/home/sudheesh/ardupilot/modules/PX4Firmware/src/platforms;/home/sudheesh/ardupilot/modules/PX4Firmware/src/drivers/boards/px4fmu-v2;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/src/modules/px4_messages;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/src/modules;/home/sudheesh/ardupilot/modules/PX4Firmware/mavlink/include/mavlink;/home/sudheesh/ardupilot/modules/PX4Firmware/src/lib/DriverFramework/framework/include;src/lib/matrix;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/include;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/include/cxx;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/arch/chip;/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware/px4fmu-v2/NuttX/nuttx-export/arch/common
ADDING DRIVERS

[ 995/1141] CMake Build px4 fw_io
[ 0%] Built target __nuttx_patch_px4io-v2
[ 4%] Built target __nuttx_copy_px4io-v2
[ 13%] Built target nuttx_export_px4io-v2
Scanning dependencies of target git_genmsg
[ 13%] Built target git_genmsg
Scanning dependencies of target git_gencpp
[ 17%] Built target git_gencpp
Scanning dependencies of target msg_gen
[ 21%] Built target msg_gen
[ 26%] Built target mixer_gen
[ 26%] Built target io_prebuild_targets
[ 95%] Built target px4io-v2
[100%] Built target fw_io
[1119/1141] CMake Build px4 build_firmware_px4fmu-v2
[ 1%] Built target romfs
[ 1%] Built target git_genmsg
[ 2%] Built target git_gencpp
[ 4%] Built target msg_gen
Scanning dependencies of target git_mavlink
[ 5%] Built target git_mavlink
Scanning dependencies of target git_uavcan
[ 6%] Built target git_uavcan
Scanning dependencies of target git_matrix
[ 6%] Built target git_matrix
Scanning dependencies of target __nuttx_patch_px4fmu-v2
[ 6%] Built target __nuttx_patch_px4fmu-v2
Scanning dependencies of target __nuttx_copy_px4fmu-v2
[ 6%] Built target __nuttx_copy_px4fmu-v2
Scanning dependencies of target nuttx_export_px4fmu-v2
[ 8%] Built target nuttx_export_px4fmu-v2
Scanning dependencies of target prebuild_targets
[ 8%] Built target prebuild_targets
[ 9%] Built target platforms__common
[ 10%] Building CXX object src/platforms/nuttx/CMakeFiles/platforms__nuttx.dir/px4_nuttx_impl.cpp.obj
src/platforms/nuttx/CMakeFiles/platforms__nuttx.dir/build.make:62: recipe for target ‘src/platforms/nuttx/CMakeFiles/platforms__nuttx.dir/px4_nuttx_impl.cpp.obj’ failed
CMakeFiles/Makefile2:876: recipe for target ‘src/platforms/nuttx/CMakeFiles/platforms__nuttx.dir/all’ failed
CMakeFiles/Makefile2:2466: recipe for target ‘src/firmware/nuttx/CMakeFiles/build_firmware_px4fmu-v2.dir/rule’ failed
Makefile:925: recipe for target ‘build_firmware_px4fmu-v2’ failed
In file included from /opt/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/string:52:0,
from /opt/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/stdexcept:39,
from /opt/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/array:39,
from /opt/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/tuple:39,
from /opt/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/functional:55,
from /home/sudheesh/ardupilot/modules/PX4Firmware/src/include/…/platforms/px4_subscriber.h:42,
from /home/sudheesh/ardupilot/modules/PX4Firmware/src/include/…/platforms/px4_nodehandle.h:42,
from /home/sudheesh/ardupilot/modules/PX4Firmware/src/include/px4.h:46,
from /home/sudheesh/ardupilot/modules/PX4Firmware/src/platforms/nuttx/px4_nuttx_impl.cpp:40:
/opt/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/bits/basic_string.h: In function ‘float std::__cxx11::stof(const string&, size_t*)’:
/opt/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/bits/basic_string.h:5454:31: error: ‘strtof’ is not a member of ‘std’
{ return __gnu_cxx::__stoa(&std::strtof, “stof”, __str.c_str(), __idx); }
^~~
compilation terminated due to -Wfatal-errors.
make[3]: *** [src/platforms/nuttx/CMakeFiles/platforms__nuttx.dir/px4_nuttx_impl.cpp.obj] Error 1
make[2]: *** [src/platforms/nuttx/CMakeFiles/platforms__nuttx.dir/all] Error 2
make[1]: *** [src/firmware/nuttx/CMakeFiles/build_firmware_px4fmu-v2.dir/rule] Error 2
make: *** [build_firmware_px4fmu-v2] Error 2

Waf: Leaving directory `/home/sudheesh/ardupilot/build/px4-v2’
Build failed
-> task in ‘bin/ardurover’ failed (exit status 2):
{task 140096141134176: cmake_build_task -> }
[’/usr/bin/cmake’, ‘–build’, ‘/home/sudheesh/ardupilot/build/px4-v2/modules/PX4Firmware’, ‘–target’, ‘build_firmware_px4fmu-v2’]

Hi,

Please avoid multiple posts.
Check my previous answer.