free-audio / clap-wrapper

Wrappers for using CLAP in other plugin environments
MIT License
111 stars 18 forks source link

Not working on Mac Studio M1 (Monterey) #47

Closed dathinaios closed 1 year ago

dathinaios commented 1 year ago

Hello,

First of all thank you for making this šŸ™‚

I am trying to build on the Mac but the resulting plugin when scanned in a DAW produces an error:

com.bitwig.flt.library.metadata.reader.exception.CouldNotReadMetadataException: could not read metadata: Communications error with plugin host process
exit code:139

Makes sense since looking inside the VST3 package it appears to be empty:

Screenshot 2023-07-17 at 14 14 09

The output from cmake -B build -DCLAP_WRAPPER_OUTPUT_NAME=True_Grain is:

-- searching CLAP SDK in "/Users/dathin/Develop/Rust/clap-wrapper"...
-- CLAP SDK detected in subdirectory
-- CLAP SDK at /Users/dathin/Develop/Rust/clap-wrapper/clap
-- Configuring CLAP SDK
-- CLAP version: 1.1.8
-- searching VST3 SDK in "/Users/dathin/Develop/Rust/clap-wrapper"...
-- VST3 SDK detected in subdirectory
-- VST3 SDK location: /Users/dathin/Develop/Rust/clap-wrapper/vst3sdk
-- Configuring VST3 SDK
-- [SMTG] Check C++ compiler
-- [SMTG] Building with Xcode version: 14.2
-- [SMTG] SMTG_VSTGUI_SOURCE_DIR is set to: /Users/dathin/Develop/Rust/clap-wrapper/vst3sdk/vstgui4
-- VSTGUI will use the Expat library at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/lib/libexpat.tbd
-- VSTGUI will use the Expat header found in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include
-- [SMTG] SMTG_AAX_SDK_PATH is not set. If you need it, please download the AAX SDK!
-- Could NOT find LIBJACK (missing: LIBJACK_INCLUDE_DIR)
-- [SMTG] LIBJACK_FOUND is not set. If you need it, please install Jack Audio from http://www.jackaudio.org!
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
* To enable building the AUv3 Wrapper example for iOS you need to set the SMTG_IOS_DEVELOPMENT_TEAM and use the Xcode generator
-- executing at /Users/dathin/Develop/Rust/clap-wrapper
-- plugin name is True_Grain
-- platform is MAC
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/dathin/Library/Audio/Plug-Ins/VST3
--  current source dir: /Users/dathin/Develop/Rust/clap-wrapper
-- Configuring done (0.5s)
-- Generating done (0.2s)
-- Build files have been written to: /Users/dathin/Develop/Rust/clap-wrapper/build
defiantnerd commented 1 year ago

Have you used the "Xcode" generator in the cmake call?

cmake -B build -G Xcode -DCLAP_WRAPPER_OUTPUT_NAME=True_Grain

?

dathinaios commented 1 year ago

No I wasn't using that command, thank you. Tried it with out and it build succesfully but it didn't produce a vst at all this time. It created these files:

Screenshot 2023-07-17 at 21 23 08

defiantnerd commented 1 year ago

Now you can open the xcodeproj file in Xcode and debug and build the vst3.

dathinaios commented 1 year ago

I tried but I am not familiar with Xcode. No worries I will investigate. Thanks for the help šŸ™‚

dathinaios commented 1 month ago

I am trying again to build this. I build from command line with:

cmake -B build -G Xcode -DCLAP_WRAPPER_OUTPUT_NAME=Plugin_Name

I get an XCode project but when I build it (ALL_BUILD) I get error:

vstparameters.h
-> Missing field 'title' initializer
--> in file included from /Users/dathin/develop/Rust/clap-wrapper/src/detail/vst3/parameter.cpp:1:
--> in file included from /Users/dathin/develop/Rust/clap-wrapper/src/detail/vst3/parameter.h: 27:

Would be grateful for any pointers of how to resolve this. Thanks!

defiantnerd commented 1 month ago

Which VST3 SDK are you using? vstparameters.h is a file from the VST3 SDK.

You might also remove the build folder and run cmake again.

dathinaios commented 1 month ago

I am using the SDK from here. I just cloned the repo and pointed the wrapper to it. Tried to remove the build folder but the issue persists.

EDIT: Ok, I got the SDK from https://www.steinberg.net/developers/ instead and now I get a different error about conde signing so hopefully I am on the right track.. šŸ˜…

defiantnerd commented 1 month ago

I think this is something in the VST3 SDK - check out the version 3.7.9, this is the one I am building with. I can also check out newer builds, but not today.

dathinaios commented 1 month ago

Thank you for your answer. Managed to get it working for vst3 šŸ„³ Now going for au. Thanks for the help!

defiantnerd commented 1 month ago

What was the solution?

dathinaios commented 1 month ago

I just used the SDK from here instead and did everything from the start and it worked. Then in XCode I was getting a code signing error so had to go to the build settings and make the field for Code Signing Identity contain nothing.

Just for reference in case anyone else ends up here, I then moved to build for AU which wasn't obvious how to do. After investigating I found out I had to set -DCLAP_WRAPPER_BUILD_AUV2=ON '(full command for build was cmake -B build -G Xcode -DCLAP_WRAPPER_OUTPUT_NAME=Plugin_Name -DCLAP_WRAPPER_BUILD_AUV2=ON).

I am still having code signing issues and the trick I mentioned above is not working with error An empty identity is not valid when signing a binary for the product type 'Command-line Tool'. for the True Grain as auv2-build-helper so I will check again tomorrow.