khrykin / BlackBird

AU/VST3 Synth built with JUCE
GNU General Public License v3.0
51 stars 15 forks source link

Compile error on Linux #2

Open tank-trax opened 2 years ago

tank-trax commented 2 years ago

OS: Linux Debian Bullseye JUCE: v6.1.1

I tried compiling BlackBird and got this error

Compiling DSPParameters.cpp
In file included from ../../Source/DSP/Voice.h:16,
                 from ../../Source/DSP/Synth.h:15,
                 from ../../Source/DSP/DSPParameters.cpp:12:
../../Source/DSP/VCAOscillator.h:24:11: error: declaration of ‘using LookupTablesBank = class LookupTablesBank<ValueType>’ changes meaning of ‘LookupTablesBank’ [-fpermissive]
   24 |     using LookupTablesBank = LookupTablesBank<ValueType>;
      |           ^~~~~~~~~~~~~~~~
In file included from ../../Source/DSP/VCAOscillator.h:18,
                 from ../../Source/DSP/Voice.h:16,
                 from ../../Source/DSP/Synth.h:15,
                 from ../../Source/DSP/DSPParameters.cpp:12:
../../Source/DSP/LookupTablesBank.h:27:7: note: ‘LookupTablesBank’ declared here as ‘class LookupTablesBank<ValueType>’
   27 | class LookupTablesBank {
      |       ^~~~~~~~~~~~~~~~
make: *** [Makefile:179: build/intermediate/Release/DSPParameters_9b3e457e.o] Error 1

was wondering if you had any clues as to a workaround

khrykin commented 2 years ago

Hi! I haven't tested the build on Linux - it might need a fix or two. If you're able to work on a PR, I would love to give help and guidance. Unfortunately, I won't be able to work towards supporting Linux build right now.

For this particular error, this fix for https://github.com/khrykin/BlackBird/blob/37fb619a703ab24e95d7ff386effdb516d81acce/Source/DSP/VCAOscillator.h#L20 might resolve the issue:

template<typename ValueType>
class VCAOscillator {
public:
    using Oscillator = dsp::Oscillator<ValueType>;
    using Waveform = typename LookupTablesBank<ValueType>::Waveform;

    VCAOscillator() noexcept = default;

#pragma mark - Initialization

    void initialize(const LookupTablesBank<ValueType> &lookupTable) {
        oscillator().initialise([this, &lookupTable](ValueType phase) {
            return lookupTable(phase,
                               currentWaveform,
                               oscillator().getFrequency());
        });
    }
tank-trax commented 2 years ago

thanks for taking a look, unfortunately that did not resolve the issue

please keep this open, hopefully will grab someone's attention

kmturley commented 2 years ago

+1 for a linux build.

I'm working on a site that lists open-source plugins: https://studiorack.github.io/studiorack-site/ But to list the plugin a minimum requirement is binaries for Mac, Windows and Linux.

Could you test using a Github Action workflow? GitHub can automatically spin up Mac, Windows and Linux images and run the build (at least you would know that it builds, although not whether it runs)

I have examples for Juce: https://github.com/studiorack/studiorack-plugin-juce/blob/main/.github/workflows/release.yml

and Projucer here: https://github.com/studiorack/studiorack-plugin-juce/blob/main/.github/workflows/release_projucer.yml

Thanks for the awesome plugin!

RustoMCSpit commented 2 months ago

any update here?