Compiling Patch on Ubuntu 14.04: shell task failed, exit value: 2


#1

Hi,

i just wanted to run the first tutorial patch and encountered the following problem:

USB device found
connected
Authentic Axoloti Core
search path : objects
Firmware version: 1.0.0.1, crc=0x38289B65, entrypoint=0x20011000
finished loading objects
upgraded object by SHA : math/*c
Generate code complete
Start compiling patch
Compiling patch... with /opt/Axoloti/app/firmware
BDIR = /home/rudi/axoloti/build
FIRMWARE = .
Build precompiled header
make: arm-none-eabi-g++: Befehl nicht gefunden
make: *** [/home/rudi/axoloti/build/xpatch.h.gch] Fehler 127
arm-none-eabi-g++ -nostdlib -fno-exceptions -fno-rtti -mcpu=cortex-m4 -O3 -fomit-frame-pointer -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -Wunused-parameter -DCORTEX_USE_FPU=TRUE -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB -std=c++11 -DARM_MATH_CM4 -D__FPU_PRESENT -I/opt/Axoloti/app/CMSIS/Include -I/opt/Axoloti/app/chibios/os/ports/common/ARMCMx/CMSIS/include -I/opt/Axoloti/app/chibios/os/ports/common/ARMCMx -I/opt/Axoloti/app/chibios/os/ports/GCC/ARMCMx -I/opt/Axoloti/app/chibios/os/ports/GCC/ARMCMx/STM32F4xx -I/opt/Axoloti/app/chibios/os/kernel/include -I/opt/Axoloti/app/chibios/os/hal/include -I/opt/Axoloti/app/chibios/os/hal/platforms/STM32F4xx -I/opt/Axoloti/app/chibios/os/hal/platforms/STM32 -I/opt/Axoloti/app/chibios/os/hal/platforms/STM32/GPIOv2 -I/opt/Axoloti/app/chibios/os/hal/platforms/STM32/I2Cv1 -I/opt/Axoloti/app/chibios/os/hal/platforms/STM32/OTGv1 -I/opt/Axoloti/app/chibios/os/hal/platforms/STM32/RTCv2 -I/opt/Axoloti/app/chibios/os/hal/platforms/STM32/SPIv1 -I/opt/Axoloti/app/chibios/os/hal/platforms/STM32/TIMv1 -I/opt/Axoloti/app/chibios/os/hal/platforms/STM32/USARTv1 -I/opt/Axoloti/app/chibios/boards/ST_STM32F4_DISCOVERY -I/opt/Axoloti/app/chibios/ext/fatfs/src -I. -I/opt/Axoloti/app/chibios -Winvalid-pch -MD -MP -c ./xpatch.h  -o /home/rudi/axoloti/build/xpatch.h.gch
shell task failed, exit value: 2
Compiling patch failed ( /opt/Axoloti/app/patches/tutorials/01_sine_oscillator.axp )

It's probably just a simple install issue, but which one?

Rudi


#2

you need to install axoloti_runtime


#3

you need to install axoloti_runtime

I think I did (hopefully correctly). There are two folders in my home directory, axoloti and axoloti_runtime. Their contents are (terminal output from ls):

rudi@HP-ProBook:~/axoloti_runtime/platform_linux$ ls
49-axoloti.rules   bin                  compile_java.sh   lib
add_udev_rules.sh  build.sh             compile_patch.sh  upload_fw_dfu.sh
arm-none-eabi      compile_firmware.sh  include

rudi@HP-ProBook:~/axoloti_runtime/platform_linux$ cd ~/axoloti
rudi@HP-ProBook:~/axoloti$ ls -R
.:
axoloti.prefs  build

./build:
xpatch.cpp
rudi@HP-ProBook:~/axoloti$

Any idea what's wrong?


#4

Hi,

I reinstalled the runtime and I still get the same result. Any ideas?

Rudi


#5

as you can see this error means it cant fine the cross compiler.

try typing at the command lne

~/axoloti_runtime/platform_linux/bin/arm-none-eabi-g++

you should get:

arm-none-eabi-g++: fatal error: no input files
compilation terminated.

this will show its running properly, and not some how corrupted.

then start axoloti, and in preferences check the the runtime directory is pointing to where it should be, i.e. where you can see it above (i.e. in your home directory)


#6

Thanks for the hint, the problem is solved.
The reason was that the 32bit-libraries were missing; I thought they were installed already.

sudo apt-get install -y lib32z1 lib32ncurses5 lib32bz2-1.0

solved the problem.

BTW, when I tried to run arm-none-eabi-g++ this happened:

rudi@HP-ProBook:~/axoloti_runtime/platform_linux/bin$ ./arm-none-eabi-g++
bash: ./arm-none-eabi-g++: Datei oder Verzeichnis nicht gefunden

It took me some time to find out that the real reason were the missing libraries.

Thanks again,
Rudi