Error with cross compiling APM

Hello,
I am having some troubles installing APM. Any help would be much appreciated :slight_smile: This is what I have :smile:

MacBook-Air-de-Mays:~ Maysun$ cd ~/ardupilot/ArduPlane
MacBook-Air-de-Mays:ArduPlane Maysun$ git checkout navio
Already on 'navio’
Your branch is up-to-date with ‘origin/navio’.
MacBook-Air-de-Mays:ArduPlane Maysun$ make configure
…/mk/configure.mk:2: WARNING - A /Users/Maysun/ardupilot/config.mk file has been written
…/mk/configure.mk:2: Please edit the file to match your system configuration, if you use a different board or port
MacBook-Air-de-Mays:ArduPlane Maysun$ make navio
// BUILDROOT=/var/folders/n5/b8zq5nvd56n4l3c9grjr7wjw0000gn/T/ArduPlane.build HAL_BOARD=HAL_BOARD_LINUX HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_LINUX_NAVIO TOOLCHAIN=RPI EXTRAFLAGS=-DGIT_VERSION="f486dd46"
building /var/folders/n5/b8zq5nvd56n4l3c9grjr7wjw0000gn/T/ArduPlane.build/ArduPlane.cpp
%% ArduPlane.cpp
%% ArduPlane.o
/bin/sh: /opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++: cannot execute binary file
make: *** [/var/folders/n5/b8zq5nvd56n4l3c9grjr7wjw0000gn/T/ArduPlane.build/ArduPlane.o] Error 126

@Maysun_Hassanaly

The error is pretty clear: it says that you don’t have a compiler!

If that’s not the issue and you have one, you need to check your PATH environment variable.

The build on a Mac can be a little more difficult that on a Linux machine. A virtual machine with a Linux distribution might be the easiest solution for you. Actually, I came across the same problem a couple of months ago and compiled a simple tutorial how to get it done.

Thanks for this. I am following the tutorial step by step and when I type “ct-ng build” it says my file system is not case sensitive.Is it related to the fact that when I rename the config file to .config and copy it to the new disk image (RPi-EADI), it says the file will be hidden ?

After running it again this is what I get :

MacBook-Air-de-Mays:ArduPlane Maysun$ make configure
…/mk/configure.mk:2: WARNING - A /Users/Maysun/ardupilot/config.mk file has been written
…/mk/configure.mk:2: Please edit the file to match your system configuration, if you use a different board or port
MacBook-Air-de-Mays:ArduPlane Maysun$ make navio
…/mk/find_tools.mk:68: *** missing separator. Stop.

@Maysun_Hassanaly

I suggest you to use a virtual machine with Ubuntu. It’ll be easier and quicker.

That’s what I did, it works perfectly and much faster !