giada
giada copied to clipboard
Build fails on Manjaro "error: ‘exchange’ is not a member of ‘std’"
Environment
- OS: Linux 5.15.46-1-MANJARO SMP PREEMPT Thu Jun 9 09:54:17 UTC 2022 x86_64 GNU/Linux
- Giada version: latest
config the cmake successfully and try to build with
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE='Release' -DWITH_VST3=ON -B build
cmake config
-- The CXX compiler identification is GNU 12.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0")
-- Could NOT find RtMidi (missing: RtMidi_DIR)
-- Checking for module 'rtmidi'
-- Found rtmidi, version 5.0.0
RtMidi library found
FLTK library found in /usr/share/fltk
Libsndfile library found in /usr/lib64/cmake/SndFile
Libsamplerate library found in /usr/lib64/cmake/SampleRate
-- Found nlohmann_json: /usr/local/lib/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.10.5")
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found ALSA: /usr/lib/libasound.so (found version "1.2.7")
-- Checking for module 'jack'
-- Found jack, version 1.9.21
-- Found Freetype: /usr/lib/libfreetype.so (found version "2.12.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/osboxes/dev/giada/build
error output:
error: ‘exchange’ is not a member of ‘std’
[ 0%] Building CXX object CMakeFiles/giada.dir/src/main.cpp.o
In file included from /home/osboxes/dev/giada/src/deps/juce/modules/juce_gui_basics/juce_gui_basics.h:270,
from /home/osboxes/dev/giada/src/deps/juce/modules/juce_audio_processors/juce_audio_processors.h:57,
from /home/osboxes/dev/giada/src/deps/juce-config.h:6,
from /home/osboxes/dev/giada/src/core/channels/channel.h:32,
from /home/osboxes/dev/giada/src/core/channels/channelManager.h:30,
from /home/osboxes/dev/giada/src/core/engine.h:32,
from /home/osboxes/dev/giada/src/main.cpp:27:
/home/osboxes/dev/giada/src/deps/juce/modules/juce_gui_basics/windows/juce_ComponentPeer.h: In member function ‘void juce::ComponentPeer::setAppStyle(Style)’:
/home/osboxes/dev/giada/src/deps/juce/modules/juce_gui_basics/windows/juce_ComponentPeer.h:442:18: error: ‘exchange’ is not a member of ‘std’
442 | if (std::exchange (style, s) != style)
| ^~~~~~~~
make[2]: *** [CMakeFiles/giada.dir/build.make:76: CMakeFiles/giada.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/giada.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
to fix this with the included juce(this was fixed in the develop branch) add #include
#include <utility>
did the trick
Thanks to bacon Paul (surge team) at the unfa discord for pointing it out
https://forum.juce.com/t/missing-header-in-juce-componentpeer/51665
This is #586