Problems building, can't remove moduleinfo.json

I’ve been using JUCE 7.0.5 since last year but I decided to update to 7.0.11. For one project I’m working on it was fine but for the other I get this error:

FAILED: Source/PhaseVocoder_artefacts/Debug/VST3/Phase Vocoder.vst3/Contents/x86_64-win/Phase Vocoder.vst3
cmd.exe /C "cd . && C:\PROGRA~1\LLVM\bin\CLANG_~1.EXE -fuse-ld=lld-link -nostartfiles -nostdlib -O0 -g -Xclang -gcodeview -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd   -shared -o "Source\PhaseVocoder_artefacts\Debug\VST3\Phase Vocoder.vst3\Contents\x86_64-win\Phase Vocoder.vst3"  -Xlinker /MANIFEST:EMBED -Xlinker /implib:"Source\PhaseVocoder_artefacts\Debug\VST3\Phase Vocoder.lib" -Xlinker /pdb:"Source\PhaseVocoder_artefacts\Debug\VST3\Phase Vocoder.pdb" -Xlinker /version:0.0 Source/CMakeFiles/PhaseVocoder_rc_lib.dir/PhaseVocoder_artefacts/JuceLibraryCode/PhaseVocoder_resources.rc.res Source/CMakeFiles/PhaseVocoder_VST3.dir/C_/Program_Files/JUCE_v7.0.11/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp.obj Source/CMakeFiles/PhaseVocoder_VST3.dir/C_/Program_Files/JUCE_v7.0.11/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX_utils.cpp.obj Source/CMakeFiles/PhaseVocoder_VST3.dir/C_/Program_Files/JUCE_v7.0.11/modules/juce_audio_plugin_client/juce_audio_plugin_client_ARA.cpp.obj Source/CMakeFiles/PhaseVocoder_VST3.dir/C_/Program_Files/JUCE_v7.0.11/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp.obj Source/CMakeFiles/PhaseVocoder_VST3.dir/C_/Program_Files/JUCE_v7.0.11/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp.obj Source/CMakeFiles/PhaseVocoder_VST3.dir/C_/Program_Files/JUCE_v7.0.11/modules/juce_audio_plugin_client/juce_audio_plugin_client_Unity.cpp.obj Source/CMakeFiles/PhaseVocoder_VST3.dir/C_/Program_Files/JUCE_v7.0.11/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp.obj Source/CMakeFiles/PhaseVocoder_VST3.dir/C_/Program_Files/JUCE_v7.0.11/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp.obj  "Source/PhaseVocoder_artefacts/Debug/Phase Vocoder_SharedCode.lib"  "C:/Dev/Juce Projects/Phase-Vocoder/Dependencies/x64/lib/libfftw3-3.lib"  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -loldnames  && cmd.exe /C "cd /D "C:\Dev\Juce Projects\Phase-Vocoder\build\Source" && "C:\Program Files\CMake\bin\cmake.exe" -E echo "removing moduleinfo.json" && "C:\Program Files\CMake\bin\cmake.exe" -E remove -f "C:/Dev/Juce Projects/Phase-Vocoder/build/Source/PhaseVocoder_artefacts/Debug/VST3/Phase Vocoder.vst3/Contents/moduleinfo.json" "C:/Dev/Juce Projects/Phase-Vocoder/build/Source/PhaseVocoder_artefacts/Debug/VST3/Phase Vocoder.vst3/Contents/Resources/moduleinfo.json" && cd /D "C:\Dev\Juce Projects\Phase-Vocoder\build\Source" && "C:\Program Files\CMake\bin\cmake.exe" -E make_directory "C:/Dev/Juce Projects/Phase-Vocoder/build/Source/PhaseVocoder_artefacts/Debug/VST3/Phase Vocoder.vst3/Contents/Resources" && "C:\Dev\Juce Projects\Phase-Vocoder\build\Source\juce_vst3_helper.exe" -create -version 1.0.0 -path "C:/Dev/Juce Projects/Phase-Vocoder/build/Source/PhaseVocoder_artefacts/Debug/VST3/Phase Vocoder.vst3" -output "C:/Dev/Juce Projects/Phase-Vocoder/build/Source/PhaseVocoder_artefacts/Debug/VST3/Phase Vocoder.vst3/Contents/Resources/moduleinfo.json"""
removing moduleinfo.json
ninja: build stopped: subcommand failed.

When I check the build directory I can see that the Resource directory is still there and the moduleinfo.json file is also in there but doesn’t contain anything.

The only major difference between the two projects is that this one that generates the error is also linking with another library (FFTW library).
It seems that the VST3 is generated but doesn’t load correctly according to AudioPluginHost, although that also happens with JUCE 7.0.5. I might be doing something wrong in CMake but I can’t figure it out.

juce_add_plugin(${PLUGIN_PROJECT_NAME}
    COMPANY_NAME "Subnite Plugins"                          # Specify the name of the plugin's author
    IS_SYNTH FALSE
    NEEDS_MIDI_INPUT FALSE
    NEEDS_MIDI_OUTPUT FALSE
    IS_MIDI_EFFECT FALSE
    PLUGIN_MANUFACTURER_CODE SBNT
    PLUGIN_CODE Phsd
    FORMATS VST3
    PRODUCT_NAME ${PLUGIN_VST3_NAME}
    DESCRIPTION "A phase vocoder for pitch shifting"
    VST3_CATEGORIES "Fx" "Pitch Shift"
    COPY_PLUGIN_AFTER_BUILD FALSE
    VST3_COPY_DIR ${POST_BUILD_PLUGIN_COPY_DIR}
)

I’m using Windows 10.0.19045 Home,
CMake 3.26.4 with Ninja as the generator, I’ve tried Visual Studio 17 and MinGW Makefiles as well.
I used Clang 17.0.1 and G++ 13.2.0

Just to confirm, I’ve been getting the same error for all versions of juce above 7.0.5. while trying to link to another library while making a juce vst3 plugin in CMake.

Having also hit this issue, googled to here and spent ages wondering why…
The problem appears to be that the VST3 helper in cmake runs the plugin in some way and if that plugin crashes then this can happen.

To solve this, build the VST2, Standalone, AAX (or even perhaps the AU on a mac) and then try and debug that, it likely wont even be recognised as a valid plugin.

So, at least in my case, the issue was a very silly bug I’d added with construction order causing the whole thing to die on first attempt at loading.

6>removing moduleinfo.json
6>creating <project path>_artefacts/Debug/VST3/<plugin>.vst3/Contents/Resources/moduleinfo.json
6>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: The command "setlocal
6>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -E echo "removing moduleinfo.json"

.... much more stuff removed ...

HTH

1 Like

By now some time has passed and I don’t exactly remember what I did, but I do remember indeed using the VST3 helper to figure out what was going wrong, which fixed my plugin in v7.0.5, but compiling with any newer version than that still resulted in the same error. In the end I just decided to stick with v7.0.5

Just now I tried on version 8.0.1 too, and also using different generators (Ninja and VS17 2022) and compilers (Clang and MSVC). It still has the same errors.

This can happen if your plugin has a bug in it as the manifest tool loads your plugin as a DAW would, in turn crashing the manifest tool.

Getting nice errors out of this post build step is really difficult but, it is something we’re thinking about behind the scenes.

We introduced the ability to disable this step in JUCE 7.0.7 via the VST3_AUTO_MANIFEST option. Set this to False and it won’t generate a manifest for you. Allowing you to debug any crashes first. Just remember to re-enable it later/for Release builds.

1 Like