Compile error with a subpatch and a custom object


#1

I developed a 4 operator FM matrix (kinda like FM8, sytrus and stuff like that)
The object itself works fine, but when inserted in a subpatch it starts to create trouble.
I tried several configurations for the subpatch (my intention is to make it poly). The problem shows when the custom object is connected and the subpatch mode is poly.

I tried using midi in keyboard (instead of keyboard mod), but with no success

this is the compile log:

Generate code complete
Start creating directory on sdcard : /untitled
creating dir: /untitled
Done creating directory
Changing working directory on sdcard : /untitled
Change working directory: /untitled
Done changing working directory
Start compiling patch
BDIR = C:\Users\Filippo\DOCUME~1\axoloti/build
FIRMWARE = .
"RM"
rm -f C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.o C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.elf C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.bin C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.d C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.map C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.lst
"APP"
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 -H -IC:\PROGRA~2\Axoloti\app/CMSIS/Include -IC:\PROGRA~2\Axoloti\app/chibios/os/ports/common/ARMCMx/CMSIS/include -IC:\PROGRA~2\Axoloti\app/chibios/os/ports/common/ARMCMx -IC:\PROGRA~2\Axoloti\app/chibios/os/ports/GCC/ARMCMx -IC:\PROGRA~2\Axoloti\app/chibios/os/ports/GCC/ARMCMx/STM32F4xx -IC:\PROGRA~2\Axoloti\app/chibios/os/kernel/include -IC:\PROGRA~2\Axoloti\app/chibios/os/hal/include -IC:\PROGRA~2\Axoloti\app/chibios/os/hal/platforms/STM32F4xx -IC:\PROGRA~2\Axoloti\app/chibios/os/hal/platforms/STM32 -IC:\PROGRA~2\Axoloti\app/chibios/os/hal/platforms/STM32/GPIOv2 -IC:\PROGRA~2\Axoloti\app/chibios/os/hal/platforms/STM32/I2Cv1 -IC:\PROGRA~2\Axoloti\app/chibios/os/hal/platforms/STM32/OTGv1 -IC:\PROGRA~2\Axoloti\app/chibios/os/hal/platforms/STM32/RTCv2 -IC:\PROGRA~2\Axoloti\app/chibios/os/hal/platforms/STM32/SPIv1 -IC:\PROGRA~2\Axoloti\app/chibios/os/hal/platforms/STM32/TIMv1 -IC:\PROGRA~2\Axoloti\app/chibios/os/hal/platforms/STM32/USARTv1 -IC:\PROGRA~2\Axoloti\app/chibios/boards/ST_STM32F4_DISCOVERY -IC:\PROGRA~2\Axoloti\app/chibios/ext/fatfs/src -I. -IC:\PROGRA~2\Axoloti\app/chibios -Winvalid-pch -MD -MP --include C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.h -c C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.cpp -o C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.o 
! C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.h.gch
LINK
arm-none-eabi-gcc -nostartfiles -Tramlink.ld -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb  -mno-thumb-interwork C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.o -Wl,-Map=C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.map,--cref,--just-symbols=./build/axoloti.elf -o C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.elf
C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.o: In function `PatchDispose()':
xpatch.cpp:(.text+0xd2): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x182): undefined reference to `__cxa_guard_release'
C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.o: In function `xpatch_init2(int) [clone .part.19]':
xpatch.cpp:(.text+0x514): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x5c0): undefined reference to `__cxa_guard_release'
xpatch.cpp:(.text+0x856): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x908): undefined reference to `__cxa_guard_release'
xpatch.cpp:(.text+0x918): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x9cc): undefined reference to `__cxa_guard_release'
C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.o: In function `PatchProcess(long*, long*)':
xpatch.cpp:(.text+0x114a): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x11f6): undefined reference to `__cxa_guard_release'
xpatch.cpp:(.text+0x1206): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x12bc): undefined reference to `__cxa_guard_release'
xpatch.cpp:(.text+0x12d8): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x1388): undefined reference to `__cxa_guard_release'
xpatch.cpp:(.text+0x1390): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x143e): undefined reference to `__cxa_guard_release'
C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.o: In function `PatchMidiInHandler(midi_device_t, unsigned char, unsigned char, unsigned char, unsigned char)':
xpatch.cpp:(.text+0x157c): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x163a): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x16ee): undefined reference to `__cxa_guard_release'
xpatch.cpp:(.text+0x1706): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x17ba): undefined reference to `__cxa_guard_release'
xpatch.cpp:(.text+0x1808): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x18be): undefined reference to `__cxa_guard_release'
xpatch.cpp:(.text+0x18ca): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x197e): undefined reference to `__cxa_guard_release'
xpatch.cpp:(.text+0x19e8): undefined reference to `__cxa_guard_acquire'
xpatch.cpp:(.text+0x1a9a): undefined reference to `__cxa_guard_release'
xpatch.cpp:(.text+0x1632): undefined reference to `__cxa_guard_release'
collect2.exe: error: ld returned 1 exit status
make: *** [C:\Users\Filippo\DOCUME~1\axoloti/build/xpatch.bin] Error 1
shell task failed, exit value: 1
Compiling patch failed ( untitled )

And in case you're curious about the object here it is (you will want to connect something like sel i 16 to the matrix output and feed it back to matrix input)
4op FM.axo (3.3 KB)

this patch shows the error
erratic patch.axp (7.3 KB)


#2

The __cxa_guard_acquire/__cxa_guard_release is fixed in development, here's the relevant commit: https://github.com/axoloti/axoloti/commit/1d7f35ad575518809ad43a11e2dd0ae63ee15083
I'm working towards a release which will contain this fix.