Could not load plugin

I have tried to follow the plugin tutorial, however the VCV Rack Free 2.2.2 refuses to load the MyPlugin on my M1 Pro MacBook running macOS 13. The log.txt indicates the error like so: “Could not load plugin /Rack2/plugins/MyPlugin: Plugin binary not found at /Rack2/plugins/MyPlugin/plugin.dylib”

I run the arm64 versions of VCV Rack and the SDK. However, I suspect there is a problem with the arm64 build, but I can not find the problem nor solve it. Do anyone of you have a suggestion how to work around this issue?

Thank you in advance!

Cheers, Rikard

Obvious first question. The error message says a file was not found. Is there a file in that location by that name?

1 Like

make dist isn’t required for development so make in the MyPlugin directory should build without errors. What is in the MyPlugin directory?

EDIT: with the SDK and official Rack I remember I had to make install though. With my own build of Rack I don’t have to do that.

EDIT2: make clean && make install > happened.txt and copy/paste/upload happened.txt.

And when you pick a slug for your module, rename the directory, and perhaps call the github repository the same as the slug. :smiley:

Take heart! My first git commit was horrid. git commit -m "this stuff" for a few weeks to then later drop with VSCode (my NSA spying tool of choice :smiley: ) git integration, … I’d still have to google once how to put issue numbers in commits.

EDIT: It was a “nice” DSL for an older VCV 1.x version with #include conditionals to expand preprocessor macros to make just one source file to make for a set of modules. It was complex, but …

EDIT2: And then nanosvg wouldn’t build so I got out of Rack dev a while until 2.x was kinda nice.

Thank you @jackokring I will mock about with the slug and file names and structures in accordance with your suggestions. I thought it might be a fat binary lipo issue where the actual binary you need is missing although you have a library.

Cheers, Rikard

No there was only the plugin-arm64.dylib. I built a plugin.dylib binary with lipo from the plugin-arm64.dylib that now givs a new error message that essentially says: Could not load Rack2/plugins/MyPlugin: Failed to load library /plugin.dylib: tried: ‘/MyPlugin/plugin.dylib’ (fat file, but missing compatible architecture (have ‘arm64’, need ‘x86_64’)),

My interpretation of this is that VCV Rack 2 only supports x86_64 architecture and I need to edit the make files to compile and link an x86_64 dylib. Would you agree?

Cheers, Rikard

Was the last builds. Mac supports either, but only one at a time with the specific SDK needed for the architecture of the rack used for testing.

Linux is x86_64 only but with some fiddling about building rack free from source Linux can also be arm64. No official library though as only for official versions. Some modules are architecture specific but the demo module is not.

EDIT: I am not a Rosetta specialist. But you sound like you might need to zip up your x64 rack into an archive, and install rack free arm64 for testing?

EDIT2: I think to run a double SDK system has maybe issues with which is placed in the environment variables used, and merging both binaries into one usable by either. It sounds Apple.

EDIT3: x64 is likely the either but only choice as the older does not have the newer were as the newer may or may not have the older. So arm64 is beta test for natives, so you might lose module compatibility in some specific cases.

EDIT4: a goog slug could be “System 7” oh how a module named 68k would be funny. :smiley:

I found a link to an arm64 beta version of VCV Rack. And now the MyPlugin loads, runs and plays.

macOS arm64 beta lipo plugin-arm64.dylib -output plugin.dylib -create

Cheers

1 Like

The alternative is to use rack fee and rack pro and build in a Rosetta shell (arch -x86_64 zsh) or launch Rosetta makes (RACK_DIR=foo arch -x86_64 make install)