Copter 3.6 PX4Firmware build fails on MAC OSX High Sierra

Hi all. It seems cmake script is not working correctly for build of Copter 3.6 on MacOSX High Sierra. It seems files, that it wants to copy are non existent. Particularly extras directory. Any recommendations, where to correct this problem?

I have no problems with building on my Ubuntu environment. @lucasdemarchi I have been reading your older threads in regards of MacOSX. Any chance you came across similar issue?

[487/490] Linking build/aerofc-v1/lib/bin/libarducopter.a
[488/490] CMake Build px4 build_firmware_aerofc-v1
[ 1%] Generating romfs.o
Error copying directory from “/Users/mtrgina/ardupilot/build/aerofc-v1/modules/PX4Firmware/src/firmware/nuttx/extras” to “/Users/mtrgina/ardupilot/build/aerofc-v1/modules/PX4Firmware/tmp/custom-ROMFS/extras”.
make[3]: *** [src/firmware/nuttx/romfs.o] Error 1
make[2]: *** [src/firmware/nuttx/CMakeFiles/romfs.dir/all] Error 2
make[1]: *** [src/firmware/nuttx/CMakeFiles/build_firmware_aerofc-v1.dir/rule] Error 2
make: *** [build_firmware_aerofc-v1] Error 2

Waf: Leaving directory `/Users/mtrgina/ardupilot/build/aerofc-v1’
Build failed
-> task in ‘bin/arducopter’ failed (exit status 2):
{task 4530998560: cmake_build_task -> }
/usr/local/bin/cmake --build /Users/mtrgina/ardupilot/build/aerofc-v1/modules/PX4Firmware --target build_firmware_aerofc-v1

Thank you.

building for other controllers is working fine on MacOS

@trgiman No idea, I only use Linux

Is it consistent as “you can never build it” or does it happen sometimes? Not a solution, but you can get a clean build by removing the build directory.

Hi@lucasdemarchi unfortunately it is consistent. waf distclean or waf clean does not solve the issue. Basically it is px4 firmware build problem and directory nuttx/extras is not created. Are build rules different for MacOS versus Ubuntu? I was not able to locate correct CMakefile with rules for PX4Firmware part?

  • I also removed whole build - ardupilot cloned git and tried multipletimes always same result

Ubuntu - compilation works 100% ok , thanks again for correcting it!