Bundle does not export the required 'bundleEntry' function

Hi,

I updated my system to macOS Big Sur recently, and when I run my plugin through the validator, I get this error message:

Invalid Module!
Bundle does not export the required 'bundleEntry' function
Program ended with exit code: 255

I didn’t have this problem before, and I didn’t change anything to my code.
Is there something new related to Big Sur, or am I missing something ?

Thanks in advance for your help.

I’ve tried to narrow down the issue, but I didn’t manage to make any progress.

I thought at first that it was due to the need to call VSTGUI::init() with the latest version of the VST3 SDK, but I get the exact same issue whatever SDK version I use.

Am I the only one to encounter this ?
Is there something specific to Xcode 12.5 I’m forgetting to do ?

You can check first if the functions are exported correctly with this command in terminal:

nm -Uj PathTo/YourPlugin.vst3/Contents/Mac/YourPlugin

This should print out:

_GetPluginFactory
_bundleEntry
_bundleExit

If you build a debug version than it will print out much more so you have to look for the above strings.

Thanks for your answer Arne.

When running nm -Uj in debug, I see lots of symbols as expected.
“_GetPluginFactory” is displayed, but not “_bundleEntry” or “_bundleExit”.

Then this is missing. But just by upgrading the macOS version you cannot loose two functions :wink: So this must have happened before too. These functions are normally exported when adding the file

public.sdk/source/macmain.cpp

Fixed it, thanks for your help Arne !

The issue was that “public_sdk_SOURCE_DIR” was empty when calling “smtg_add_library_main” from “SMTG_AddSMTGLibrary.cmake”.

I still don’t understand why since it seems to be properly set in the main vst3sdk CMakeLists.txt file and there is no other place where it’s reassigned.

It worked before because I assigned “public_sdk_SOURCE_DIR” in an external cmake file of mine, which I cleared a bit a few days before updating my system to Big Sur.