ArduPlane SITL build failing on Ubuntu 18.04

I’m trying to build ArduPlane locally so I can get SITL up and running. So far I’ve cloned the repo, configured waf, and built waf plane. I’m getting two issues.

  1. When I run --map --console -f plane compilation succeeds, but I get

    [Run MavProxy] An exception has occurred with command: ‘ --map --console --out --out --master tcp: --sitl’
    [Errno 2] No such file or directory

mavproxy was installed successfully via pip install mavproxy

  1. If I add --osd, I don’t even get a successful build. I see

    [147/669] Compiling libraries/AP_Gripper/AP_Gripper_EPM.cpp
    In file included from …/…/libraries/AP_Filesystem/AP_Filesystem_ROMFS.cpp:21:0:
    …/…/libraries/AP_Math/AP_Math.h: In instantiation of ‘decltype (((one < two) ? one : two)) MIN(const A&, const B&) [with A = unsigned int; B = int; decltype (((one < two) ? one : two)) = unsigned int]’:
    …/…/libraries/AP_Filesystem/AP_Filesystem_ROMFS.cpp:100:49: required from here
    …/…/libraries/AP_Math/AP_Math.h:209:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
    return one < two ? one : two;
    compilation terminated due to -Wfatal-errors.
    cc1plus: some warnings being treated as errors

Waf: Leaving directory `/home/noah/code/ardupilot/build/sitl’
Build failed
-> task in ‘objs/AP_Filesystem’ failed (exit status 1):
{task 140387936722512: cxx AP_Filesystem_ROMFS.cpp -> AP_Filesystem_ROMFS.cpp.0.o}
(run with -v to display more information)
SIM_VEHICLE: Build failed

Looks like people haven’t had this issue on 18.04 in the past. Not sure what I’m doing wrong. Is there a earlier more stable tag I should check out on git?

I’m using Ubuntu 18:

Can you run the which command and post the output? It could be that Ubuntu cannot find mavproxy in your system path.

Yep, I get that error too in the latest master. Worth reporting this on Github is not on my path. Where does it normally live, and what command should have put it on my path?

I added the sign-compare compilation issue here.

Did you configure waf like so?:

 ./waf configure --board sitl --debug --enable-sfml --sitl-osd

It’s working for me

No, but when I try with that configuration command, it then fails to build with ./waf plane, same error. Are you on 18.04, latest ardupilot from master?

Depends how you installed it. If you used pip install mavproxy --user, then it lives in the ~/.local/bin/ folder.

To put it on your system path, add this to your ~.bashrc file:

export PATH=$PATH:~/.local/bin

EDIT: Fixed folder locations.

1 Like

Thank you, I didn’t do the --user flag so I guess that was important. I got other paths from ardupilot automatically added to my .profile so it’s weird that it missed mavproxy.

The sign bug got fixed over in the git repo so I’m all up and running!


I’ve got this same error on Ubuntu 16.04 LTS.
Would you please be able to elaborate as to how you were able to fix this?

Thanks in advance :slight_smile:

I manually added ~/.local/bin to my path as stephen mentioned.