alexvoina g --no-auto-init but it is not recognized by the compiler. Any ideas?
that flag needs to be passed to
/usr/xenomai/bin/xeno-config when using it to obtain the linker flags. The full call to run on the board would be
/usr/xenomai/bin/xeno-config --skin=posix --ldflags --no-auto-init
-Wl,--no-as-needed -Wl,@/usr/xenomai/lib/cobalt.wrappers -Wl,@/usr/xenomai/lib/modechk.wrappers -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt
I normally then remove the two wrappers files (as I like to manually call the Xenomai versions of POSIX functions if and when needed, final result is:
-Wl,--no-as-needed -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt
Several years ago, when I was looking into running Valgrind on Bela, I stopped looking because I read somewhere that it didn't play nicely with Xenomai, possibly because of symbol wrapping. In the end I never tried it, but the above line disables all wrappings, so maybe it will work?
this error here would seem to suggest that you are not running it on Bela. Are you actually running this on Bela?????
alexvoina I'm suspecting it is because I'm calling xenomai_init() explicitly, and then it is called again at some point by JUCE code because I can see 2 calls to xenomai_init() on the dump file generated by valgrind, the second one being at the very end of the file.
if this annoys you, you could try calling
Bela_initAudio() early on, and then when it gets called again, the
gXenomaiInited variable will prevent it from initialising again. I don't think you can access that variable from the Juce program though. Alternatively you can edit your
core/RTAudio.cpp code so that it does not initialise xenomai, then rebuild the Bela lib (
make -C /root/Bela lib) and then it's up to your JUCE app to call it early on.