VCVRack / AudibleInstruments

VCV Rack plugin based on Mutable Instruments Eurorack modules
https://vcvrack.com/AudibleInstruments.html
Other
387 stars 84 forks source link

Braids not building on Linux #10

Closed hammerandtongs closed 6 years ago

hammerandtongs commented 6 years ago

commit 2025f3f9041a8befd4a9cbd525344b92f6c4eacb

In file included from src/Braids.cpp:6:0: ./eurorack/braids/signature_waveshaper.h: In member function ‘void braids::SignatureWaveshaper::Init(uint32_t)’: ./eurorack/braids/signature_waveshaper.h:68:46: error: invalid operands of types ‘gnu_cxx::__enable_if<true, double>::type {aka double}’ and ‘int’ to binary ‘operator>>’ (8192 + (sigmoid_strength * abs(x) >> 5));


../../compile.mk:49: recipe for target 'build/src/Braids.cpp.o' failed
make: *** [build/src/Braids.cpp.o] Error 1
AndrewBelt commented 6 years ago

What is your OS? Could you do a make clean, make?

hammerandtongs commented 6 years ago

I'm on Ubuntu 17.04-kxstudio.

Sorry I elided the rest of the make clean&&make.

Here is the same error with fresh pull of rack and audible instruments just now -

make clean;make rm -rfv build plugin.so dist removed directory 'build/src' removed directory 'build' g++ -fshort-enums -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/Frames.cpp.o src/Frames.cpp g++ -fshort-enums -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/Rings.cpp.o src/Rings.cpp g++ -fshort-enums -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/Warps.cpp.o src/Warps.cpp g++ -fshort-enums -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/Elements.cpp.o src/Elements.cpp g++ -fshort-enums -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/Braids.cpp.o src/Braids.cpp In file included from src/Braids.cpp:6:0: ./eurorack/braids/signature_waveshaper.h: In member function ‘void braids::SignatureWaveshaper::Init(uint32_t)’: ./eurorack/braids/signature_waveshaper.h:68:46: error: invalid operands of types ‘gnu_cxx::__enable_if<true, double>::type {aka double}’ and ‘int’ to binary ‘operator>>’ (8192 + (sigmoid_strength * abs(x) >> 5));


../../compile.mk:49: recipe for target 'build/src/Braids.cpp.o' failed
make: *** [build/src/Braids.cpp.o] Error 1
AndrewBelt commented 6 years ago

What if you move all the

#include "braids/..."

lines from src/Braids.cpp up to the very top of that file?

hammerandtongs commented 6 years ago

make clean;make rm -rfv build plugin.so dist removed 'build/src/Frames.cpp.d' removed 'build/src/Frames.cpp.o' removed 'build/src/Rings.cpp.d' removed 'build/src/Rings.cpp.o' removed 'build/src/Warps.cpp.d' removed 'build/src/Warps.cpp.o' removed 'build/src/Elements.cpp.d' removed 'build/src/Elements.cpp.o' removed directory 'build/src' removed directory 'build' g++ -fshort-enums -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/Frames.cpp.o src/Frames.cpp g++ -fshort-enums -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/Rings.cpp.o src/Rings.cpp g++ -fshort-enums -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/Warps.cpp.o src/Warps.cpp g++ -fshort-enums -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/Elements.cpp.o src/Elements.cpp g++ -fshort-enums -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/Braids.cpp.o src/Braids.cpp In file included from src/Braids.cpp:3:0: ./eurorack/braids/signature_waveshaper.h: In member function ‘void braids::SignatureWaveshaper::Init(uint32_t)’: ./eurorack/braids/signature_waveshaper.h:68:44: error: ‘abs’ was not declared in this scope (8192 + (sigmoid_strength * abs(x) >> 5)); ^ ../../compile.mk:49: recipe for target 'build/src/Braids.cpp.o' failed make: *** [build/src/Braids.cpp.o] Error 1

AndrewBelt commented 6 years ago

Is your compiler maybe in fact clang? Run g++ --version

hammerandtongs commented 6 years ago

g++ --version g++ (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

AndrewBelt commented 6 years ago

Looks like Olivier has written noncompliant C++ in this one! Reset the file the way it was and put

int16_t abs(int16_t x) {return abs((int32_t)x);}

before including signature_waveshaper.h.

hammerandtongs commented 6 years ago

works :), shall I close or wait for update?

Btw now Eseries has issues

AndrewBelt commented 6 years ago

Might as well post the issues here instead of closing. The reason you're getting these messages is because you have a very strict compiler version.

hammerandtongs commented 6 years ago

Audible plugins do run as well.

ESeries built and ran last night just fine it's just the recent changes.

make clean;make rm -rfv build plugin.so dist g++ -fPIC -I../../include -I../../dep/include -DVERSION=dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_LIN -std=c++11 -c -o build/src/E340.cpp.o src/E340.cpp src/E340.cpp: In member function ‘virtual void E340::step()’: src/E340.cpp:65:74: error: cannot convert ‘gnu_cxx::alloc_traits<std::allocator >::value_type {aka rack::Input}’ to ‘const float’ for argument ‘1’ to ‘float rack::getf(const float, float)’ float basePitch = params[COARSE_PARAM] + 12.0 getf(inputs[PITCH_INPUT]); ^ src/E340.cpp:66:22: error: could not convert ‘((E340)this)->E340::.rack::Module::inputs.std::vector<_Tp, _Alloc>::operator[]<rack::Input, std::allocator >(1ul)’ from ‘gnu_cxx::alloc_traits<std::allocator >::value_type {aka rack::Input}’ to ‘bool’ if (inputs[FM_INPUT]) { ^ src/E340.cpp:67:35: error: no match for ‘operator’ (operand type is ‘__gnu_cxx::__alloc_traits<std::allocator >::value_type {aka rack::Input}’) basePitch += params[FM_PARAM] *inputs[FM_INPUT];

src/E340.cpp:69:12: error: no match for ‘operator+=’ (operand types are ‘float’ and ‘__gnu_cxx::__alloc_traits<std::allocator >::value_type {aka rack::Param}’) basePitch += params[FINE_PARAM];

src/E340.cpp:72:65: error: cannot convert ‘gnu_cxx::alloc_traits<std::allocator >::value_type {aka rack::Input}’ to ‘const float’ for argument ‘1’ to ‘float rack::getf(const float, float)’ float spread = params[SPREAD_PARAM] + getf(inputs[SPREAD_INPUT]) / 10.0; ^ src/E340.cpp:78:62: error: cannot convert ‘gnu_cxx::alloc_traits<std::allocator >::value_type {aka rack::Input}’ to ‘const float’ for argument ‘1’ to ‘float rack::getf(const float, float)’ float chaos = params[CHAOS_PARAM] + getf(inputs[CHAOS_INPUT]) / 10.0; ^ src/E340.cpp:84:70: error: cannot convert ‘gnu_cxx::alloc_traits<std::allocator >::value_type {aka rack::Input}’ to ‘const float’ for argument ‘1’ to ‘float rack::getf(const float, float)’ float chaosBW = params[CHAOS_BW_PARAM] + getf(inputs[CHAOS_BW_INPUT]) / 10.0; ^ src/E340.cpp:91:41: error: cannot convert ‘gnu_cxx::alloc_traits<std::allocator >::value_type {aka rack::Input}’ to ‘const float’ for argument ‘1’ to ‘float rack::getf(const float, float)’ float newSync = getf(inputs[SYNC_INPUT]) - 0.25; ^ src/E340.cpp:101:43: error: cannot convert ‘gnu_cxx::__alloc_traits<std::allocator >::value_type {aka rack::Param}’ to ‘float’ for argument ‘1’ to ‘float roundf(float)’ switch ((int)roundf(params[DENSITY_PARAM])) { ^ src/E340.cpp:175:56: error: cannot convert ‘gnu_cxx::alloc_traits<std::allocator >::value_type {aka rack::Output}’ to ‘float’ for argument ‘1’ to ‘void rack::setf(float, float)’ setf(outputs[SINE_OUTPUT], 5.0 * sineFilter.highpass()); ^ src/E340.cpp:176:54: error: cannot convert ‘__gnu_cxx::alloc_traits<std::allocator >::value_type {aka rack::Output}’ to ‘float’ for argument ‘1’ to ‘void rack::setf(float, float)’ setf(outputs[SAW_OUTPUT], 5.0 * sawFilter.highpass()); ^ ../../compile.mk:49: recipe for target 'build/src/E340.cpp.o' failed make: *** [build/src/E340.cpp.o] Error 1

AndrewBelt commented 6 years ago

Whoops, had some uncommitted working changes. git pull and try again.

hammerandtongs commented 6 years ago

Very nice, works great!

Thanks for doing this software it's been fun.

AndrewBelt commented 6 years ago

Great, glad it's working for you!