I think I have bigger problems actually as I’m having troubles getting anything to build on the dev branch atm. Can’t even get the plugin examples to compile
did you do a recursive pull on git to get all the submodules?
(after checkout of branch)
git submodule update --init --recursive
I’ve not built 2.0-dev but last time I built the firmware everything that was required for build was linked as a submodule.
are you able to build/run the released branch?
I would always do that before attempting to build a dev branch… as its more likely something is missing/not updated/incomplete on a dev branch.
I did! I definitely double checked that. Funnily enough I can get my own plugins building on v2.0-dev but I can’t build all the examples, and can’t build the simulator, so there’s something odd going on. At least I can start working on my own code though
I will probably try to build the current stable branch next but I really want to target the dev branch because of some of the new sdk features which I need.
@danngreen since pulling your most recent commits in the sdk, base etc… and rebuilding my plugins I now get a failure on the MM when trying to load them which says there is no init function. There is definitely an init function and they work in VCV rack locally so any idea what might have happened to cause this? They were working yesterday!
Thanks very much.
Ah, oops. The init function needs to be declared extern "C". I just made that change to the SDK (it’s the latest commit).
Life on the bleeding edge, indeed!
But if your init function has a different signature (like just plain void init()) then you’ll need to declare it extern C yourself.
I probably will make this work without needing extern "C", by having firmware look for the mangled symbol name (the only point of extern C in this case is to bypass the C++ symbol mangling)
Ok, so sounds like for some reason the linker was not making the init symbol visible.
I played with those linker flags a lot, and it seemed like the --require-defined=init flag was forcing it to export the symbol, though perhaps not…
Can you share your plugin’s CMakeLists.txt file?
The lines you commented out speed up function calls from within the plugin, and also make plugin loading faster. So it’s OK to have those off.
You’re using arm-gcc v12.2 or 12.3?
Ah, yes you need to put the version in the plugin name. So:
Pluginname-v2.0.0-dev10.3.mmplugin
The autoloader assumes a plugin with no version in the name, is v1.x, so it skips that on the v2.0 branch.
One more thing: I just pushed a change on the v2.0-dev branch of the SDK to add default visibility to the init() function. Can you pull and see if that fixes it for you (you’ll need to uncomment those lines about visibility in the plugin.cmake)