Skip to content

Build VST3 for Linux - #73

Open
probonopd wants to merge 2 commits into
Birch-san:masterfrom
probonopd:copilot/build-vst3-for-linux
Open

Build VST3 for Linux#73
probonopd wants to merge 2 commits into
Birch-san:masterfrom
probonopd:copilot/build-vst3-for-linux

Conversation

@probonopd

@probonopd probonopd commented Apr 27, 2026

Copy link
Copy Markdown
  • Build VST3 for Linux using GitHub Actions for x86_64 and aarch64 (ARM) architectures. Tested on Raspberry Pi 500 with REAPER
  • Fix compilation error on Ubuntu: Ubuntu 24.04 ships fluidsynth with fluid_synth_process expecting float**, but JUCE's AudioBuffer::getArrayOfWritePointers() returns float* const*. Added a const_cast at the call site

Copilot AI review requested due to automatic review settings April 27, 2026 16:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Linux VST3 build support and updates the FluidSynth processing call to compile against newer FluidSynth headers (Ubuntu 24.04), enabling Linux builds (including ARM) and CI artifact generation.

Changes:

  • Adjust fluid_synth_process call to satisfy float** API expectations on Ubuntu 24.04.
  • Add a GitHub Actions workflow to build the VST3 on Linux for x86_64 and aarch64 and upload artifacts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
Source/FluidSynthModel.cpp Updates the FluidSynth render call to compile with the fluid_synth_process signature used by newer FluidSynth packages.
.github/workflows/build-vst3-linux.yml Introduces CI to build Linux VST3 artifacts (x86_64 + ARM) and upload the resulting .vst3.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

nullptr,
buffer.getNumChannels(),
buffer.getArrayOfWritePointers());
const_cast<float**>(buffer.getArrayOfWritePointers()));

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid casting away constness here. AudioBuffer::getArrayOfWritePointers() returns float* const* (the pointer array is const), and const_cast<float**> can become undefined behavior if fluid_synth_process ever writes to that pointer array. Prefer creating a local non-const array (e.g., std::vector<float*> outs; outs[ch]=buffer.getWritePointer(ch);) and pass outs.data().

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +55
path: /opt/JUCE
key: juce-7.0.12-${{ matrix.arch }}

- name: Clone and install JUCE
if: steps.cache-juce.outputs.cache-hit != 'true'
run: |
git clone --depth 1 --branch 7.0.12 \
https://github.com/juce-framework/JUCE.git /tmp/JUCE
cmake -B /tmp/JUCE/build -S /tmp/JUCE \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/JUCE \
-DJUCE_BUILD_EXTRAS=OFF \
-DJUCE_BUILD_EXAMPLES=OFF
cmake --build /tmp/JUCE/build --target install

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow installs/caches JUCE under /opt/JUCE but the subsequent cmake --build ... --target install is not run with sudo, and /opt is typically not writable on GitHub-hosted runners. This will likely fail at install time (and cache restore/save can also fail due to permissions). Use a user-writable prefix (e.g. $HOME/.local or ${{ github.workspace }}/.deps/JUCE) or run the install and any required chown steps with sudo consistently.

Copilot uses AI. Check for mistakes.
- name: Locate VST3 binary
id: locate
run: |
SO=$(find build -name "*.so" -path "*/VST3/*" | head -1)

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If find doesn't locate a VST3 .so, SO will be empty and later steps (ls, stat) will fail with a less clear error (or ls may list the current directory). Add an explicit check after find to fail fast with a clear message when no binary is found.

Suggested change
SO=$(find build -name "*.so" -path "*/VST3/*" | head -1)
SO=$(find build -name "*.so" -path "*/VST3/*" | head -1)
if [ -z "$SO" ]; then
echo "ERROR: No VST3 .so binary found under build matching */VST3/*"
exit 1
fi

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants