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.

1 Like

Hi @mike13_2 !
I think “public_sdk_SOURCE_DIR” remains empty if you forget to call the macro “smtg_enable_vst3_sdk()” in your CMakeLists.txt, defined in the vst3sdk module SMTG_Global.cmake.
Hope it helps!

Actually the issue was happening because I had multiple levels of cmake files in my projects, and calling smtg_enable_vst3_sdk() from a sublevel library’s CMakeLists.txt didn’t properly set public_sdk_SOURCE_DIR in the top level file.

I just needed to set vst3sdk_SOURCE_DIR and call smtg_enable_vst3_sdk() from the top level CMakeLists.txt.

Now everything works fine.