Px4 firmware make error linux

#1

Hi everyone,
I am trying to understand the building px4 firmware files.

I was installed the px4 development toolchain,But when I tried to build a px4 file, I am getting the following error:

mirko@mirko:~/PX4FirmwareDev/Firmware$ make px4fmu-v4_default
ninja: Entering directory `/home/mirko/PX4FirmwareDev/Firmware/build/nuttx_px4fmu-v4_default’
[6/434] Building CXX object src/driver…eter__lps22hb.dir/lps22hb_main.cpp.obj
FAILED: /usr/bin/ccache /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4FMU_V4 -DMODULE_NAME=“lps22hb” -DPX4_MAIN=lps22hb_app_main -D__DF_NUTTX -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -I. -Isrc -Isrc/lib -Isrc/modules -I…/…/src -I…/…/src/drivers/boards/px4fmu-v4 -I…/…/src/include -I…/…/src/lib -I…/…/src/lib/DriverFramework/framework/include -I…/…/src/lib/matrix -I…/…/src/modules -I…/…/src/platforms -INuttX/nuttx/arch/arm/src/armv7-m -INuttX/nuttx/arch/arm/src/chip -INuttX/nuttx/arch/arm/src/common -INuttX/apps/include -Iexternal/Install/include -fno-common -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fno-common -ffunction-sections -fdata-sections -g -fno-exceptions -fno-rtti -std=gnu++11 -fno-threadsafe-statics -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -fcheck-new -Wall -Wextra -Werror -Warray-bounds -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wmissing-declarations -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-implicit-fallthrough -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -Wunused-but-set-variable -Wformat=1 -Wno-overloaded-virtual -Wreorder -Wno-format-truncation -fvisibility=hidden -include visibility.h -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Os -DNDEBUG -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Wframe-larger-than=1024 -MMD -MT src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/lps22hb_main.cpp.obj -MF src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/lps22hb_main.cpp.obj.d -o src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/lps22hb_main.cpp.obj -c …/…/src/drivers/barometer/lps22hb/lps22hb_main.cpp
ccache: error: execv of /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ failed: No such file or directory
[6/434] Building CXX object src/driver…drivers__bmp280.dir/bmp280_i2c.cpp.obj
FAILED: /usr/bin/ccache /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4FMU_V4 -DMODULE_NAME=“bmp280” -DPX4_MAIN=bmp280_app_main -D__DF_NUTTX -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -I. -Isrc -Isrc/lib -Isrc/modules -I…/…/src -I…/…/src/drivers/boards/px4fmu-v4 -I…/…/src/include -I…/…/src/lib -I…/…/src/lib/DriverFramework/framework/include -I…/…/src/lib/matrix -I…/…/src/modules -I…/…/src/platforms -INuttX/nuttx/arch/arm/src/armv7-m -INuttX/nuttx/arch/arm/src/chip -INuttX/nuttx/arch/arm/src/common -INuttX/apps/include -Iexternal/Install/include -fno-common -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fno-common -ffunction-sections -fdata-sections -g -fno-exceptions -fno-rtti -std=gnu++11 -fno-threadsafe-statics -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -fcheck-new -Wall -Wextra -Werror -Warray-bounds -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wmissing-declarations -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-implicit-fallthrough -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -Wunused-but-set-variable -Wformat=1 -Wno-overloaded-virtual -Wreorder -Wno-format-truncation -fvisibility=hidden -include visibility.h -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Os -DNDEBUG -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Wframe-larger-than=1200 -MMD -MT src/drivers/barometer/bmp280/CMakeFiles/drivers__bmp280.dir/bmp280_i2c.cpp.obj -MF src/drivers/barometer/bmp280/CMakeFiles/drivers__bmp280.dir/bmp280_i2c.cpp.obj.d -o src/drivers/barometer/bmp280/CMakeFiles/drivers__bmp280.dir/bmp280_i2c.cpp.obj -c …/…/src/drivers/barometer/bmp280/bmp280_i2c.cpp
ccache: error: execv of /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ failed: No such file or directory
[6/434] Building CXX object src/driver…les/drivers__bmp280.dir/bmp280.cpp.obj
FAILED: /usr/bin/ccache /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4FMU_V4 -DMODULE_NAME=“bmp280” -DPX4_MAIN=bmp280_app_main -D__DF_NUTTX -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -I. -Isrc -Isrc/lib -Isrc/modules -I…/…/src -I…/…/src/drivers/boards/px4fmu-v4 -I…/…/src/include -I…/…/src/lib -I…/…/src/lib/DriverFramework/framework/include -I…/…/src/lib/matrix -I…/…/src/modules -I…/…/src/platforms -INuttX/nuttx/arch/arm/src/armv7-m -INuttX/nuttx/arch/arm/src/chip -INuttX/nuttx/arch/arm/src/common -INuttX/apps/include -Iexternal/Install/include -fno-common -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fno-common -ffunction-sections -fdata-sections -g -fno-exceptions -fno-rtti -std=gnu++11 -fno-threadsafe-statics -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -fcheck-new -Wall -Wextra -Werror -Warray-bounds -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wmissing-declarations -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-implicit-fallthrough -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -Wunused-but-set-variable -Wformat=1 -Wno-overloaded-virtual -Wreorder -Wno-format-truncation -fvisibility=hidden -include visibility.h -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Os -DNDEBUG -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Wframe-larger-than=1200 -MMD -MT src/drivers/barometer/bmp280/CMakeFiles/drivers__bmp280.dir/bmp280.cpp.obj -MF src/drivers/barometer/bmp280/CMakeFiles/drivers__bmp280.dir/bmp280.cpp.obj.d -o src/drivers/barometer/bmp280/CMakeFiles/drivers__bmp280.dir/bmp280.cpp.obj -c …/…/src/drivers/barometer/bmp280/bmp280.cpp
ccache: error: execv of /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ failed: No such file or directory
[6/434] Building CXX object src/driver…meter__lps22hb.dir/LPS22HB_I2C.cpp.obj
FAILED: /usr/bin/ccache /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4FMU_V4 -DMODULE_NAME=“lps22hb” -DPX4_MAIN=lps22hb_app_main -D__DF_NUTTX -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -I. -Isrc -Isrc/lib -Isrc/modules -I…/…/src -I…/…/src/drivers/boards/px4fmu-v4 -I…/…/src/include -I…/…/src/lib -I…/…/src/lib/DriverFramework/framework/include -I…/…/src/lib/matrix -I…/…/src/modules -I…/…/src/platforms -INuttX/nuttx/arch/arm/src/armv7-m -INuttX/nuttx/arch/arm/src/chip -INuttX/nuttx/arch/arm/src/common -INuttX/apps/include -Iexternal/Install/include -fno-common -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fno-common -ffunction-sections -fdata-sections -g -fno-exceptions -fno-rtti -std=gnu++11 -fno-threadsafe-statics -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -fcheck-new -Wall -Wextra -Werror -Warray-bounds -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wmissing-declarations -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-implicit-fallthrough -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -Wunused-but-set-variable -Wformat=1 -Wno-overloaded-virtual -Wreorder -Wno-format-truncation -fvisibility=hidden -include visibility.h -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Os -DNDEBUG -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Wframe-larger-than=1024 -MMD -MT src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/LPS22HB_I2C.cpp.obj -MF src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/LPS22HB_I2C.cpp.obj.d -o src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/LPS22HB_I2C.cpp.obj -c …/…/src/drivers/barometer/lps22hb/LPS22HB_I2C.cpp
ccache: error: execv of /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ failed: No such file or directory
[6/434] Building CXX object src/driver…barometer__lps22hb.dir/LPS22HB.cpp.obj
FAILED: /usr/bin/ccache /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4FMU_V4 -DMODULE_NAME=“lps22hb” -DPX4_MAIN=lps22hb_app_main -D__DF_NUTTX -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -I. -Isrc -Isrc/lib -Isrc/modules -I…/…/src -I…/…/src/drivers/boards/px4fmu-v4 -I…/…/src/include -I…/…/src/lib -I…/…/src/lib/DriverFramework/framework/include -I…/…/src/lib/matrix -I…/…/src/modules -I…/…/src/platforms -INuttX/nuttx/arch/arm/src/armv7-m -INuttX/nuttx/arch/arm/src/chip -INuttX/nuttx/arch/arm/src/common -INuttX/apps/include -Iexternal/Install/include -fno-common -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fno-common -ffunction-sections -fdata-sections -g -fno-exceptions -fno-rtti -std=gnu++11 -fno-threadsafe-statics -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -fcheck-new -Wall -Wextra -Werror -Warray-bounds -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wmissing-declarations -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-implicit-fallthrough -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -Wunused-but-set-variable -Wformat=1 -Wno-overloaded-virtual -Wreorder -Wno-format-truncation -fvisibility=hidden -include visibility.h -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Os -DNDEBUG -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Wframe-larger-than=1024 -MMD -MT src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/LPS22HB.cpp.obj -MF src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/LPS22HB.cpp.obj.d -o src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/LPS22HB.cpp.obj -c …/…/src/drivers/barometer/lps22hb/LPS22HB.cpp
ccache: error: execv of /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ failed: No such file or directory
[6/434] Building CXX object src/driver…meter__lps22hb.dir/LPS22HB_SPI.cpp.obj
FAILED: /usr/bin/ccache /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4FMU_V4 -DMODULE_NAME=“lps22hb” -DPX4_MAIN=lps22hb_app_main -D__DF_NUTTX -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -I. -Isrc -Isrc/lib -Isrc/modules -I…/…/src -I…/…/src/drivers/boards/px4fmu-v4 -I…/…/src/include -I…/…/src/lib -I…/…/src/lib/DriverFramework/framework/include -I…/…/src/lib/matrix -I…/…/src/modules -I…/…/src/platforms -INuttX/nuttx/arch/arm/src/armv7-m -INuttX/nuttx/arch/arm/src/chip -INuttX/nuttx/arch/arm/src/common -INuttX/apps/include -Iexternal/Install/include -fno-common -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fno-common -ffunction-sections -fdata-sections -g -fno-exceptions -fno-rtti -std=gnu++11 -fno-threadsafe-statics -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -fcheck-new -Wall -Wextra -Werror -Warray-bounds -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wmissing-declarations -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-implicit-fallthrough -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -Wunused-but-set-variable -Wformat=1 -Wno-overloaded-virtual -Wreorder -Wno-format-truncation -fvisibility=hidden -include visibility.h -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Os -DNDEBUG -fno-strict-aliasing -fomit-frame-pointer -fno-math-errno -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -Wframe-larger-than=1024 -MMD -MT src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/LPS22HB_SPI.cpp.obj -MF src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/LPS22HB_SPI.cpp.obj.d -o src/drivers/barometer/lps22hb/CMakeFiles/drivers__barometer__lps22hb.dir/LPS22HB_SPI.cpp.obj -c …/…/src/drivers/barometer/lps22hb/LPS22HB_SPI.cpp
ccache: error: execv of /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ failed: No such file or directory
ninja: build stopped: subcommand failed.
Makefile:176: recipe for target ‘px4fmu-v4_default’ failed
make: *** [px4fmu-v4_default] Error 1

Could someone help me out on this?

1 Like
#2

Which compiler are you using? It should be GCC 7-2017-q4 as reported in https://dev.px4.io/en/setup/dev_env_linux_ubuntu.html#nuttx-based-hardware

#3

Hi @Matteo_Scanavino

I had also guessed that was the issue but was not sure. My gcc-arm-embedded version which gets installed is 2015, even though I am following the commands to the letter. Any idea how to fix this issue?

Regards,