Issue building from source

Hi Guys hoping you can help.

Im trying to install copter 3.5 from source as i need to make use of some of its features.

Ive followed the steps in the documents to the letter, everything is updated/installed but when i run
-waf copter its exiting and throwing the below error

pi@navio:~/ardupilot $ waf copter
Waf: Entering directory `/home/pi/ardupilot/build/navio2’
[4/4] Processing modules/mavlink/message_definitions/v1.0/ardupilotmega.xml
/usr/bin/python: can’t open file ‘/home/pi/ardupilot/modules/mavlink/pymavlink/tools/’: [Errno 2] No such file or directory

mavgen returned 2 error code
Waf: Leaving directory `/home/pi/ardupilot/build/navio2’
Build failed
** -> task in ‘mavlink’ failed (exit status 2):**
{task 1985505480: mavgen ardupilotmega.xml -> }

I’ve googled this to death and feel like im missing something obvious, any help is appreciated.

Kind regards

i assume you checked if this file exists and that its readable /home/pi/ardupilot/modules/mavlink/pymavlink/tools/

That will be the obvious bit i’ve missed :sweat: ill check that later

Thanks for your time

right just had a check,

ive got everything upto pymavlink /home/pi/ardupilot/modules/mavlink/pymavlink/ but when i look in that directory its empty. so git git cloned the pymavlink over and it started to compile.

all was looking good untill i hit this error and the build failed

Build failed
-> task in ‘objs/GCS_MAVLink’ failed (exit status 1):
{task 1974092504: cxx GCS_Common.cpp -> GCS_Common.cpp.0.o}
[’/usr/bin/arm-linux-gnueabihf-g++’, ‘-std=gnu++11’, ‘-fdata-sections’, ‘-ffunct ion-sections’, ‘-fno-exceptions’, ‘-fsigned-char’, ‘-Wall’, ‘-Wextra’, '-Wformat ', ‘-Wshadow’, ‘-Wpointer-arith’, ‘-Wcast-align’, ‘-Wundef’, ‘-Wno-unused-parame ter’, ‘-Wno-missing-field-initializers’, ‘-Wno-reorder’, ‘-Wno-redundant-decls’, ‘-Wno-unknown-pragmas’, ‘-Werror=format-security’, ‘-Werror=array-bounds’, ‘-We rror=uninitialized’, ‘-Werror=init-self’, ‘-Wfatal-errors’, ‘-Werror=unused-but- set-variable’, ‘-O3’, ‘-include’, ‘ap_config.h’, ‘-Ilibraries’, ‘-Ilibraries/GCS _MAVLink’, ‘-I.’, ‘-I…/…/libraries’, ‘-I…/…/libraries/AP_Common/missing’, ‘- DSKETCHBOOK="/home/pi/ardupilot"’, ‘-DCONFIG_HAL_BOARD=HAL_BOARD_LINUX’, ‘-DCONF IG_HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_LINUX_NAVIO2’, ‘…/…/libraries/GCS_MAVLi nk/GCS_Common.cpp’, ‘-c’, ‘-o/home/pi/ardupilot/build/navio2/libraries/GCS_MAVLi nk/GCS_Common.cpp.0.o’]
pi@navio:~/ardupilot $

Anyone have any ideas on how to apprach this error

Kind regards


Seems like missing some modules. Did you clone ardupilot with --recursive flag? You may try this command:
git submodule update --init --recursive.


Managed to trace the missing modules and get them installed, now running 3.5 thanks for the help. learnt a lot about linux so far.


1 Like