Mod Cloud Builder not Working

Hey, I tried to build/upload a simple test patch with the Mod Cloud Builder and it didnt work…

This is the log:

PURE DATA / HVCC PLUGIN BUILDER
Plugin settings
Plugin files
Plugin name
Plugin brand
Plugin uid/symbol
Plugin category
Status: build complete
/usr/bin/make -j1 O=/root/mod-workdir/moddwarf-new HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" silentoldconfig
make[1]: Entering directory '/root/mod-workdir/moddwarf-new/build/buildroot-2016.02'
GEN /root/mod-workdir/moddwarf-new/Makefile
BR2_DEFCONFIG='' KCONFIG_AUTOCONFIG=/root/mod-workdir/moddwarf-new/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/root/mod-workdir/moddwarf-new/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/root/mod-workdir/moddwarf-new/build/buildroot-config/tristate.config BR2_CONFIG=/root/mod-workdir/moddwarf-new/.config BR2_EXTERNAL=/root/mod-plugin-builder/plugins-dep HOST_GCC_VERSION="12" SKIP_LEGACY= /root/mod-workdir/moddwarf-new/build/buildroot-config/conf --silentoldconfig Config.in
make[1]: Leaving directory '/root/mod-workdir/moddwarf-new/build/buildroot-2016.02'
>>> tmphpp_clmz 4fbaa17f0e54f92ec3502b3e0033676469dde390 Downloading
Doing full clone
Cloning into bare repository 'tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390'...
>>> tmphpp_clmz 4fbaa17f0e54f92ec3502b3e0033676469dde390 Extracting
gzip -d -c /root/mod-workdir/download/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390.tar.gz | tar --strip-components=1 -C /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390 -xf -
>>> tmphpp_clmz 4fbaa17f0e54f92ec3502b3e0033676469dde390 Patching
>>> tmphpp_clmz 4fbaa17f0e54f92ec3502b3e0033676469dde390 Configuring
# install hvcc
pip3 install -e /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390 --break-system-packages
Obtaining file:///root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: Jinja2>=2.11 in /usr/lib/python3/dist-packages (from hvcc==0.9.0) (3.1.2)
Requirement already satisfied: importlib_resources>=5.1 in /usr/local/lib/python3.11/dist-packages (from hvcc==0.9.0) (6.0.1)
Requirement already satisfied: wstd2daisy>=0.5.0 in /usr/local/lib/python3.11/dist-packages (from hvcc==0.9.0) (0.5.0)
Installing collected packages: hvcc
Attempting uninstall: hvcc
Found existing installation: hvcc 0.9.0
Uninstalling hvcc-0.9.0:
Successfully uninstalled hvcc-0.9.0
Running setup.py develop for hvcc
Successfully installed hvcc-0.9.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
# place symlink to dpf (known working version)
ln -s /root/dpf /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390/dpf
# create plugin files
mkdir /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390/plugin
cp /root/mod-plugin-builder/plugins-dep/../plugins/package/tmphpp_clmz//*.pd /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390/plugin/plugin.pd
echo '{ "name": "_OSC Test", "dpf": { "description": "Pure Data (hvcc) based plugin, automatically generated via mod-cloud-builder", "homepage": "https://github.com/Wasted-Audio/hvcc", "license": "ISC", "lv2_info": "lv2:GeneratorPlugin", "maker": "_Blindsmyth", "midi_input": 0, "midi_output": 0, "plugin_uri": "urn:hvcc:OSC_Test", "plugin_formats ":["lv2_sep"], "version": "0, 0, 0" }}' > /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390/plugin/plugin.json
hvcc /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390/plugin/plugin.pd -m /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390/plugin/plugin.json -n "_OSC Test" -g dpf -o /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390
>>> tmphpp_clmz 4fbaa17f0e54f92ec3502b3e0033676469dde390 Building
PATH="/root/mod-workdir/moddwarf-new/host/bin:/root/mod-workdir/moddwarf-new/host/sbin:/root/mod-workdir/moddwarf-new/host/usr/bin:/root/mod-workdir/moddwarf-new/host/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" PATH="/root/mod-workdir/moddwarf-new/host/bin:/root/mod-workdir/moddwarf-new/host/sbin:/root/mod-workdir/moddwarf-new/host/usr/bin:/root/mod-workdir/moddwarf-new/host/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" AR="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-ar" AS="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-as" LD="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-ld" NM="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-nm" CC="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-gcc" GCC="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-gcc" CPP="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-cpp" CXX="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-g++" FC="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-gfortran" RANLIB="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-ranlib" READELF="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-readelf" STRIP="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-strip" OBJCOPY="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-objcopy" OBJDUMP="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/root/mod-workdir/moddwarf-new/host/usr/include" CFLAGS_FOR_BUILD="-O2 -I/root/mod-workdir/moddwarf-new/host/usr/include" CXXFLAGS_FOR_BUILD="-O2 -I/root/mod-workdir/moddwarf-new/host/usr/include" LDFLAGS_FOR_BUILD="-L/root/mod-workdir/moddwarf-new/host/lib -L/root/mod-workdir/moddwarf-new/host/usr/lib -Wl,-rpath,/root/mod-workdir/moddwarf-new/host/usr/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-as" DEFAULT_LINKER="/root/mod-workdir/moddwarf-new/host/usr/bin/aarch64-modaudio-linux-gnu-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 " LDFLAGS="-Wl,-O1,--as-needed,--strip-all" FCFLAGS="" PKG_CONFIG="/root/mod-workdir/moddwarf-new/host/usr/bin/pkg-config" STAGING_DIR="/root/mod-workdir/moddwarf-new/host/usr/aarch64-buildroot-linux-gnu/sysroot" INTLTOOL_PERL=/usr/bin/perl /usr/bin/make -j9 PREFIX=/usr NOOPT=true -C /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390
make[1]: Entering directory '/root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390'
/usr/bin/make all -C plugin/source
/usr/bin/make -C dpf/utils/lv2-ttl-generator
make[2]: Entering directory '/root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390/plugin/source'
make[2]: Entering directory '/root/dpf/utils/lv2-ttl-generator'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/dpf/utils/lv2-ttl-generator'
../../dpf/Makefile.plugins.mk:491: warning: overriding recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:481: warning: ignoring old recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:503: warning: overriding recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:491: warning: ignoring old recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:524: warning: overriding recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:503: warning: ignoring old recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:529: warning: overriding recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:524: warning: ignoring old recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:529: warning: overriding recipe for target 'Test.lv2/_OSC'
../../dpf/Makefile.plugins.mk:524: warning: ignoring old recipe for target 'Test.lv2/_OSC'
../../dpf/Makefile.plugins.mk:605: warning: overriding recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:529: warning: ignoring old recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:642: warning: overriding recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:605: warning: ignoring old recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:656: warning: overriding recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:642: warning: ignoring old recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:656: warning: overriding recipe for target 'Test.so'
../../dpf/Makefile.plugins.mk:524: warning: ignoring old recipe for target 'Test.so'
../../dpf/Makefile.plugins.mk:678: warning: overriding recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:656: warning: ignoring old recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:692: warning: overriding recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:678: warning: ignoring old recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:692: warning: overriding recipe for target 'Test.so'
../../dpf/Makefile.plugins.mk:656: warning: ignoring old recipe for target 'Test.so'
../../dpf/Makefile.plugins.mk:706: warning: overriding recipe for target '../../bin/_OSC'
../../dpf/Makefile.plugins.mk:692: warning: ignoring old recipe for target '../../bin/_OSC'
make[2]: *** No rule to make target '../../build/HeavyDPF__OSC.o', needed by '../../bin/_OSC'. Stop.
make[2]: *** Waiting for unfinished jobs....
Compiling HeavyContext.cpp
make[2]: Leaving directory '/root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390/plugin/source'
make[1]: *** [Makefile:21: plugin] Error 2
make[1]: Leaving directory '/root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390'
make: *** [package/pkg-generic.mk:198: /root/mod-workdir/moddwarf-new/build/tmphpp_clmz-4fbaa17f0e54f92ec3502b3e0033676469dde390/.stamp_built] Error 2
Build completed successfully.

after I click Upload I get this:
No plugins found in bundle

This is the test patch

#X obj 59 39 osc~ 440;
#X obj 118 197 dac~;
#X connect 0 0 1 0 empty;
#X connect 0 0 1 1 empty;

Try to not put a space in the project name.

Also: why are you adding a leading _ to the name fields?

I was trying to get this fixed by using a “symbol” variable (so we have a variable that is safe to use in paths and as C/C++ variable name) but it needs change on the template generator side which I do not 100% understand yet.
But anyhow, @dreamer here is a WIP patch for such changes.

Generating a “symbol” can be done with a single function, see https://github.com/moddevices/mod-cloud-builder/blob/main/webserver/server.py#L96

If we go with this approach we can solve the random oddities that happen when users name their files with unexpected characters. Not to mention a potential security issue as the generator runs on the cloud builder.

diff --git a/hvcc/generators/c2dpf/c2dpf.py b/hvcc/generators/c2dpf/c2dpf.py
index 2041d21..f3aab7a 100644
--- a/hvcc/generators/c2dpf/c2dpf.py
+++ b/hvcc/generators/c2dpf/c2dpf.py
@@ -125,15 +125,13 @@ class c2dpf:
             # plugin makefile
             with open(os.path.join(source_dir, "Makefile"), "w") as f:
                 f.write(env.get_template("Makefile_plugin").render(
-                    name=patch_name,
+                    symbol=symbol,
                     meta=dpf_meta,
                     dpf_path=dpf_path))
 
             # project makefile
             with open(os.path.join(source_dir, "../../Makefile"), "w") as f:
                 f.write(env.get_template("Makefile_project").render(
-                    name=patch_name,
-                    meta=dpf_meta,
                     dpf_path=dpf_path))
 
             return {
diff --git a/hvcc/generators/c2dpf/templates/DistrhoPluginInfo.h b/hvcc/generators/c2dpf/templates/DistrhoPluginInfo.h
index 8fe2f69..e330119 100644
--- a/hvcc/generators/c2dpf/templates/DistrhoPluginInfo.h
+++ b/hvcc/generators/c2dpf/templates/DistrhoPluginInfo.h
@@ -2,16 +2,16 @@
 
 #pragma once
 
-#define DISTRHO_PLUGIN_NAME                 "{{name.replace('_', ' ')}}"
+#define DISTRHO_PLUGIN_NAME                 "{{name}}"
 {%- if meta.plugin_uri is defined %}
 #define DISTRHO_PLUGIN_URI                  "{{meta.plugin_uri}}"
 {% else %}
-#define DISTRHO_PLUGIN_URI                  "urn:hvcc:{{name}}"
+#define DISTRHO_PLUGIN_URI                  "urn:hvcc:{{symbol}}"
 {%- endif %}
 {%- if meta.plugin_clap_id is defined %}
 #define DISTRHO_PLUGIN_CLAP_ID              "{{meta.plugin_clap_id}}"
 {% else %}
-#define DISTRHO_PLUGIN_CLAP_ID              "urn.hvcc.{{name}}"
+#define DISTRHO_PLUGIN_CLAP_ID              "urn.hvcc.{{symbol}}"
 {%- endif %}
 #define DISTRHO_PLUGIN_NUM_INPUTS           {{num_input_channels}}
 #define DISTRHO_PLUGIN_NUM_OUTPUTS          {{num_output_channels}}
diff --git a/hvcc/generators/c2dpf/templates/HeavyDPF.cpp b/hvcc/generators/c2dpf/templates/HeavyDPF.cpp
index a942d9b..bae6514 100644
--- a/hvcc/generators/c2dpf/templates/HeavyDPF.cpp
+++ b/hvcc/generators/c2dpf/templates/HeavyDPF.cpp
@@ -1,6 +1,6 @@
 {{copyright}}
 
-#include "Heavy_{{name}}.h"
+#include "Heavy_{{symbol}}.h"
 #include "{{class_name}}.hpp"
 #include <set>
 
diff --git a/hvcc/generators/c2dpf/templates/Makefile_plugin b/hvcc/generators/c2dpf/templates/Makefile_plugin
index 97cf6a5..9f263eb 100644
--- a/hvcc/generators/c2dpf/templates/Makefile_plugin
+++ b/hvcc/generators/c2dpf/templates/Makefile_plugin
@@ -1,16 +1,16 @@
-NAME = {{name}}
+NAME = {{symbol}}
 {%- if meta.enable_modgui is defined %}
-MODGUI_CLASS_NAME = hv_{{name}}
+MODGUI_CLASS_NAME = hv_{{symbol}}
 {%- endif %}
 {%- if meta.enable_ui is defined %}
-FILES_DSP = $(filter-out HeavyDPF_{{name}}_UI.cpp, $(wildcard *.cpp))
+FILES_DSP = $(filter-out HeavyDPF_{{symbol}}_UI.cpp, $(wildcard *.cpp))
 {%- else %}
 FILES_DSP = $(wildcard *.cpp)
 {%- endif %}
 FILES_DSP += $(wildcard *.c)
 
 {%- if meta.enable_ui is defined %}
-FILES_UI = HeavyDPF_{{name}}_UI.cpp
+FILES_UI = HeavyDPF_{{symbol}}_UI.cpp
 FILES_UI += ../../{{dpf_path}}dpf-widgets/opengl/DearImGui.cpp
 {%- endif %}
 

Ah that’s it.

I didnt do this.

Another noob question:


How do I get the param “trigger” as a button in mod? As of know all 3 params show up as knobs in mod:

EDIT: I Got it:

Also:
is Midi supported already?
I used a note in as stated here:

But my mod plugin doesnt come with a midi in…

Because the form doesn’t allow for adding midi configuration. This needs to be added separately.

btw you are not linking to any specific lines of documentation, but I assume you are using the bool and trig types?

So this has to be added somewhere in the code?

Yes, i got it to work from the documentation

This has to be added to the formhttps://github.com/moddevices/mod-cloud-builder/blob/main/webserver/templates/builder.html#L228

This is still setup to be very rudimentary and the same between gen/faust/hvcc. We still need special input fields for properly configuring hvcc. It’s already fully supported, but limited by how generic the current form implementation is.