surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.15k stars 400 forks source link

surge-xt 1.0.1 doesn't build from AUR #6307

Closed abique closed 2 years ago

abique commented 2 years ago

Here the error when building from AUR:

[ 67%] Building CXX object src/common/CMakeFiles/surge-common.dir/dsp/filters/NonlinearFeedback.cpp.o
cd /home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/build/src/common && /bin/c++ -DGHC_FILESYSTEM_FWD -DGHC_RAISE_UNICODE_ERRORS -DGHC_WIN_WSTRING_STRING_TYPE -DJUCE_ALLOW_STATIC_NULL_VARIABLES=0 -DJUCE_ALSA=1 -DJUCE_CATCH_UNHANDLED_EXCEPTIONS=0 -DJUCE_COREGRAPHICS_DRAW_ASYNC=1 -DJUCE_DIRECTSOUND=1 -DJUCE_DISPLAY_SPLASH_SCREEN=0 -DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1 -DJUCE_JACK=1 -DJUCE_MODAL_LOOPS_PERMITTED=0 -DJUCE_MODULE_AVAILABLE_juce_audio_basics=1 -DJUCE_MODULE_AVAILABLE_juce_audio_formats=1 -DJUCE_MODULE_AVAILABLE_juce_core=1 -DJUCE_MODULE_AVAILABLE_juce_dsp=1 -DJUCE_REPORT_APP_USAGE=0 -DJUCE_STANDALONE_APPLICATION=0 -DJUCE_STRICT_REFCOUNTEDPOINTER=1 -DJUCE_USE_CAMERA=disabled -DJUCE_USE_CURL=0 -DJUCE_VST3_CAN_REPLACE_VST2=0 -DJUCE_WASAPI=1 -DJUCE_WEB_BROWSER=0 -DLINUX=1 -DNDEBUG=1 -DTIXML_USE_STL -D_NDEBUG=1 -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/effects -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/filters -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/modulators -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/oscillators -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/utilities -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/vembertech -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/simde -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/fmt/include -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/LuaJitLib/LuaJIT/src -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/libsamplerate/include -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/airwindows/include -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/eurorack/eurorack -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/eurorack/special_include -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/build/libs/filesystem/include -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/oddsound-mts/MTS-ESP/Client -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/sqlite-3.23.3/. -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/strnatcmp -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/tinyxml/include -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/build/src/common/juce_binarydata_surge-common-binary/JuceLibraryCode -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/tuning-library/include -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/build/src/lua/include -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/platform/include -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/PEGTL/include -I/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/libs/JUCE/modules -march=native -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -O3 -DNDEBUG -fPIC -Wno-multichar -Werror -fvisibility=hidden -fvisibility-inlines-hidden -Wformat-truncation=0 -Wno-free-nonheap-object -Wno-return-local-addr -std=c++17 -MD -MT src/common/CMakeFiles/surge-common.dir/dsp/filters/NonlinearFeedback.cpp.o -MF CMakeFiles/surge-common.dir/dsp/filters/NonlinearFeedback.cpp.o.d -o CMakeFiles/surge-common.dir/dsp/filters/NonlinearFeedback.cpp.o -c /home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/filters/NonlinearFeedback.cpp
/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/effects/chowdsp/spring_reverb/SpringReverbProc.cpp: In member function ‘void chowdsp::SpringReverbProc::setParams(const Params&, int)’:
/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/effects/chowdsp/spring_reverb/SpringReverbProc.cpp:85:75: error: cannot convert ‘__m128’ to ‘juce::dsp::SIMDRegister<float>’
   85 |         apf.setParams(msToSamples(0.35f + 3.0f * params.size), _mm_load_ps(apfGVec));
      |                                                                ~~~~~~~~~~~^~~~~~~~~
      |                                                                           |
      |                                                                           __m128
In file included from /home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/effects/chowdsp/spring_reverb/SpringReverbProc.h:24,
                 from /home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/effects/chowdsp/spring_reverb/SpringReverbProc.cpp:2:
/home/abique/.cache/yay/surge-xt/src/surge-xt-1.0.1/src/common/dsp/effects/chowdsp/spring_reverb/SchroederAllpass.h:30:39: note:   initializing argument 2 of ‘void chowdsp::SchroederAllpass<T, order>::setParams(float, T) [with T = juce::dsp::SIMDRegister<float>; int order = 2]’
   30 |     void setParams(float delaySamp, T feedback)
      |                                     ~~^~~~~~~~

Here is the package: https://aur.archlinux.org/packages/surge-xt

baconpaul commented 2 years ago

Looks like AUR is adding an avx compile flag and hitting this.

https://github.com/surge-synthesizer/surge/issues/5993

why would a distro change compile flags? It shouldn’t!

abique commented 2 years ago

Those are the flags in /etc/makepkg.conf:

CFLAGS="-march=native -mtune=generic -O2 -pipe -fno-plt -fexceptions \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"

I'm not sure if I tweaked that, but it contains a -march=native, maybe this is the problem?

baconpaul commented 2 years ago

Yeah surge won’t compile with thst

abique commented 2 years ago

So then that was a user error! Sorry for that.

baconpaul commented 2 years ago

No problem! We should fix it of course. One day. But there's this project called CLAP which has been keeping me busy. Maybe you've heard of it. It's a cool new.... no wait! :)