falkTX / Carla

Audio plugin host
https://kx.studio/carla
1.55k stars 144 forks source link

fails to build on debian bookworm #1890

Open trebmuh opened 1 month ago

trebmuh commented 1 month ago
Compiling carla_juce.cpp (64bit)
In file included from ../mingw-std-threads/mingw.condition_variable.h:43,
                 from ../mingw-std-threads/condition_variable:3,
                 from ../juce_core/system/juce_StandardHeader.h:55,
                 from ../juce_core/juce_core.h:204,
                 from ../juce_events/juce_events.h:52,
                 from carla_juce.cpp:26:
../mingw-std-threads/mingw.mutex.h:472:24: error: 'class mingw_stdthread::once_flag' conflicts with a previous declaration
  472 | using mingw_stdthread::once_flag;
      |                        ^~~~~~~~~
In file included from ../mingw-std-threads/mutex:2,
                 from ../mingw-std-threads/mingw.mutex.h:40:
/usr/lib/gcc/x86_64-w64-mingw32/12-win32/include/c++/mutex:866:10: note: previous declaration 'struct std::once_flag'
  866 |   struct once_flag
      |          ^~~~~~~~~
make[3]: *** [Makefile:96: ../../../build/carla_juce/Release/carla_juce.cpp.win64.o] Error 1

Tried with 2.5.8 and with head from the hotfix-2.5 branch (2f5bd5c) From within a pbuilder chroot. Note that 2.5.8 was building fine in Debian Bullseye (the 2.5.8 bookworm one is a rebuild of this one with no change by me).


Edit: Note that if I'm trying to build it in a CLI (ie: not in a chroot) with make win64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++, I got the same:

Compiling carla_juce.cpp (64bit)
In file included from ../mingw-std-threads/mingw.condition_variable.h:43,
                 from ../mingw-std-threads/condition_variable:3,
                 from ../juce_core/system/juce_StandardHeader.h:55,
                 from ../juce_core/juce_core.h:204,
                 from ../juce_events/juce_events.h:52,
                 from carla_juce.cpp:26:
../mingw-std-threads/mingw.mutex.h:472:24: error: ‘class mingw_stdthread::once_flag’ conflicts with a previous declaration
  472 | using mingw_stdthread::once_flag;
      |                        ^~~~~~~~~
In file included from ../mingw-std-threads/mutex:2,
                 from ../mingw-std-threads/mingw.mutex.h:40:
/usr/lib/gcc/x86_64-w64-mingw32/12-win32/include/c++/mutex:866:10: note: previous declaration ‘struct std::once_flag’
  866 |   struct once_flag
      |          ^~~~~~~~~
make[1]: *** [Makefile:96 : ../../../build/carla_juce/Release/carla_juce.cpp.win64.o] Erreur 1
falkTX commented 1 month ago

this is a bug that turned into another bug, kinda. the sad answer is "wont fix" for 2.5 series, the issue is on mingw side

you can build without juce support (which I removed in next 2.6.x to be released) with "make ... USING_JUCE=false" but that takes out bridged vst3 support

trebmuh commented 1 month ago

I did so, and after a few tests, it seems that VST3 support is working correctly. I'm a bit puzzled since I thought that the "bridged vst3 support" was meaning "VST3 windows-native support". I might be wrong.