kronihias / ambix

cross-platform Ambisonic VST, LV2 plug-ins with variable order for use in Digital Audio Workstations like Reaper or Ardour or as Jack standalone applications
GNU General Public License v2.0
237 stars 34 forks source link

ambix build fails #30

Open friskgit opened 4 years ago

friskgit commented 4 years ago

Hi,

Trying to build ambix on Ubuntu Studio. It fails with the following message (ending with):

home/henrikfr/bin/ambix/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h:361:17: note: defined here 361 | class JUCE_API PixelRGB make[3]: [JUCE/CMakeFiles/JUCE_STATIC.dir/build.make:89: JUCE/CMakeFiles/JUCE_STATIC.dir/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp. Error 1 make[2]: [CMakeFiles/Makefile2:760: JUCE/CMakeFiles/JUCE_STATIC.dir/all] Error 2
make[1]: [CMakeFiles/Makefile2:794: ambix_binaural/ambix_binaural/CMakeFiles/ambix_binaural_o5.dir/rule] Error 2
make:
[Makefile:131: ambix_binaural_o5] Error 2

This was from trying to build only binaural_o5 but the same happens when building all.

friskgit commented 4 years ago

This was with a fresh download from github and Ubuntu 20.04.

ratherlargerobot commented 4 years ago

I encountered the same error on Ubuntu 18.04 LTS. However, it only happens if the Zita convolver is enabled during ccmake. If I disable the Zita convolver, the make step succeeds.

If I run and re-run make with multiple CPU cores a few times, until only this error is left, this is what the error messages look like:

$ make -j 6
[  9%] Built target JUCE_STATIC
[ 13%] Built target ambix_decoder_o5
[ 15%] Built target ambix_converter_o5
[ 16%] Building CXX object ambix_binaural/ambix_binaural/CMakeFiles/ambix_binaural_o5.dir/__/Source/PluginProcessor.cpp.o
[ 24%] Built target ambix_directional_loudness_o5
[ 32%] Built target ambix_encoder_i2_o5
[ 41%] Built target ambix_encoder_o5
[ 43%] Built target ambix_mirror_o5
[ 51%] Built target ambix_encoder_i4_o5
[ 59%] Built target ambix_encoder_i6_o5
[ 62%] Built target ambix_maxre_o5
[ 67%] Built target ambix_rotator_z_o5
[ 72%] Built target ambix_encoder_i8_o5
[ 78%] Built target ambix_rotator_o5
[ 87%] Built target ambix_warp_o5
[ 87%] Built target ambix_widening_o5
[ 95%] Built target ambix_vmic_o5
In file included from /home/someuser/studio/Software/src/ambix/ambix/JUCE/modules/juce_gui_basics/juce_gui_basics.h:178:0,
                 from /home/someuser/studio/Software/src/ambix/ambix/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client.h:52,
                 from /home/someuser/studio/Software/src/ambix/ambix/ambix_binaural/JuceLibraryCode/JuceHeader.h:20,
                 from /home/someuser/studio/Software/src/ambix/ambix/ambix_binaural/Source/PluginProcessor.h:23,
                 from /home/someuser/studio/Software/src/ambix/ambix/ambix_binaural/Source/PluginProcessor.cpp:20:
/home/someuser/studio/Software/src/ambix/ambix/JUCE/modules/juce_gui_basics/mouse/juce_LassoComponent.h: In member function ‘void juce::LassoComponent<SelectableItemType>::paint(juce::Graphics&)’:
/home/someuser/studio/Software/src/ambix/ambix/JUCE/modules/juce_gui_basics/mouse/juce_LassoComponent.h:202:23: warning: invalid use of incomplete type ‘class juce::LookAndFeel’
         getLookAndFeel().drawLasso (g, *this);
         ~~~~~~~~~~~~~~^~
In file included from /home/someuser/studio/Software/src/ambix/ambix/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client.h:52:0,
                 from /home/someuser/studio/Software/src/ambix/ambix/ambix_binaural/JuceLibraryCode/JuceHeader.h:20,
                 from /home/someuser/studio/Software/src/ambix/ambix/ambix_binaural/Source/PluginProcessor.h:23,
                 from /home/someuser/studio/Software/src/ambix/ambix/ambix_binaural/Source/PluginProcessor.cpp:20:
/home/someuser/studio/Software/src/ambix/ambix/JUCE/modules/juce_gui_basics/juce_gui_basics.h:115:7: note: forward declaration of ‘class juce::LookAndFeel’
 class LookAndFeel;
       ^~~~~~~~~~~
/home/someuser/studio/Software/src/ambix/ambix/ambix_binaural/Source/PluginProcessor.cpp: In member function ‘void Ambix_binauralAudioProcessor::LoadConfiguration(juce::File)’:
/home/someuser/studio/Software/src/ambix/ambix/ambix_binaural/Source/PluginProcessor.cpp:938:202: error: no matching function for call to ‘Convproc::configure(int, int, unsigned int, int&, Convproc::<unnamed enum>, Convproc::<unnamed enum>, const float&)’
 hannels(), (unsigned int)conv_data.getMaxLength(), ConvBufferSize,Convproc::MINPART, Convproc::MAXPART, density);
                                                                                                                ^
In file included from /home/someuser/studio/Software/src/ambix/ambix/ambix_binaural/Source/PluginProcessor.h:28:0,
                 from /home/someuser/studio/Software/src/ambix/ambix/ambix_binaural/Source/PluginProcessor.cpp:20:
/usr/include/zita-convolver.h:386:9: note: candidate: int Convproc::configure(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)
     int configure (unsigned int ninp,
         ^~~~~~~~~
/usr/include/zita-convolver.h:386:9: note:   candidate expects 6 arguments, 7 provided
ambix_binaural/ambix_binaural/CMakeFiles/ambix_binaural_o5.dir/build.make:182: recipe for target 'ambix_binaural/ambix_binaural/CMakeFiles/ambix_binaural_o5.dir/__/Source/PluginProcessor.cpp.o' failed
make[2]: *** [ambix_binaural/ambix_binaural/CMakeFiles/ambix_binaural_o5.dir/__/Source/PluginProcessor.cpp.o] Error 1
CMakeFiles/Makefile2:158: recipe for target 'ambix_binaural/ambix_binaural/CMakeFiles/ambix_binaural_o5.dir/all' failed
make[1]: *** [ambix_binaural/ambix_binaural/CMakeFiles/ambix_binaural_o5.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
ratherlargerobot commented 4 years ago

It appears that I am using Zita Convolver 3, as provided by Ubuntu 18.04 LTS, but Zita Convolver 4 is the latest version. Perhaps this is a version mismatch?

Here is the definition of configure() in my /usr/include/zita-convolver.h file:

    int configure (unsigned int ninp,
                   unsigned int nout,
                   unsigned int maxsize,
                   unsigned int quantum,
                   unsigned int minpart,
                   unsigned int maxpart);

Meanwhile, the call to this method from ambix/ambix_binaural/Source/PluginProcessor.cpp has an extra "density" parameter as the seventh argument:

        const float density = 0.5f;

        err = zita_conv.configure(conv_data.getNumInputChannels(), conv_data.getNumOutputChannels(), (unsigned int)conv_data.getMaxLength(), ConvBufferSize,Convproc::MINPART, Convproc::MAXPART, density);
dvzrv commented 4 years ago

The fix for zita-convolver >= 4.0.0 has been discussed in #23.

ratherlargerobot commented 2 years ago

It seems that the fix described in #23 has fixed builds where Zita Convolver version 4 is used.

However, it also appears to have broken builds on Ubuntu (including 20.04 LTS), where Zita Convolver 3 is still the latest version provided by the operating system.

ratherlargerobot commented 2 years ago

Additionally, the README.md file still suggests that Debian/Ubuntu users install the libzita-convolver3 package.