Hello there!
I installed the latest release (axoloti-linux-1.0.12-2.deb) of the Axoloti software via dpkg on Ubuntu 18.04.3 LTS. The Software starts fine, asked me to upgrade the firmware on the Axoloti (Version 1.0 first batch) which also worked fine.
The software can connect to the Axoloti, but when I try to run any of the supplied demo patches I always get the same error about the rand() function being redeclared, one time 'extern' and one time 'static'.
An hints and help would be appreciated. Thanks in advance!
-rolf
Generate code complete
Start compiling patch
Compiling patch... with /opt/Axoloti/app/firmware
BDIR = /home/romor001/axoloti/build
FIRMWARE = .
Build precompiled header
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 -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 -fno-math-errno -fno-threadsafe-statics -fno-use-cxa-atexit -Wno-unused-parameter -I/opt/Axoloti/app/CMSIS/Include -I/opt/Axoloti/app/CMSIS/DSP_Lib/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 -I./mutable_instruments -Winvalid-pch -MD -MP -c ./xpatch.h -o /home/romor001/axoloti/build/xpatch.h.gch
In file included from ./axoloti.h:24:0,
from ./xpatch.h:3:
./axoloti_math.h:180:0: warning: "RAND_MAX" redefined
#define RAND_MAX INT32_MAX
In file included from /usr/arm-none-eabi/include/c++/7.3.1/bits/std_abs.h:38:0,
from /usr/arm-none-eabi/include/c++/7.3.1/cmath:47,
from /usr/arm-none-eabi/include/c++/7.3.1/math.h:36,
from /usr/arm-none-eabi/include/fastmath.h:7,
from ./axoloti.h:21,
from ./xpatch.h:3:
/usr/arm-none-eabi/include/stdlib.h:63:0: note: this is the location of the previous definition
#define RAND_MAX _RANDMAX
In file included from ./axoloti.h:24:0,
from ./xpatch.h:3:
./axoloti_math.h: In function 'int rand()':
./axoloti_math.h:181:57: error: 'int rand()' was declared 'extern' and later 'static' [-fpermissive]
attribute ( ( always_inline ) ) _STATICINLINE int rand(void) {
^~~~
In file included from /usr/arm-none-eabi/include/c++/7.3.1/bits/std_abs.h:38:0,
from /usr/arm-none-eabi/include/c++/7.3.1/cmath:47,
from /usr/arm-none-eabi/include/c++/7.3.1/math.h:36,
from /usr/arm-none-eabi/include/fastmath.h:7,
from ./axoloti.h:21,
from ./xpatch.h:3:
/usr/arm-none-eabi/include/stdlib.h:140:5: note: previous declaration of 'int rand()'
int rand (void);
^~~~
Makefile.patch:53: recipe for target '/home/romor001/axoloti/build/xpatch.h.gch' failed
make: *** [/home/romor001/axoloti/build/xpatch.h.gch] Error 1
shell task failed, exit value: 2
Compiling patch failed ( /home/romor001/axoloti/axoloti-factory/patches/demos/synth/dreamy.axp )