Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Braids not building on Linux #10

Closed
hammerandtongs opened this issue Sep 28, 2017 · 13 comments
Closed

Braids not building on Linux #10

hammerandtongs opened this issue Sep 28, 2017 · 13 comments

Comments

@hammerandtongs
Copy link

commit 2025f3f

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
Copy link
Member

AndrewBelt commented Sep 28, 2017

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

@hammerandtongs
Copy link
Author

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
Copy link
Member

AndrewBelt commented Sep 28, 2017

What if you move all the

#include "braids/..."

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

@hammerandtongs
Copy link
Author

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
Copy link
Member

AndrewBelt commented Sep 28, 2017

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

@hammerandtongs
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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

Btw now Eseries has issues

@AndrewBelt
Copy link
Member

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
Copy link
Author

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::allocatorrack::Input >::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::allocatorrack::Input >(1ul)’ from ‘__gnu_cxx::__alloc_traits<std::allocatorrack::Input >::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::allocatorrack::Input >::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::allocatorrack::Param >::value_type {aka rack::Param}’)
basePitch += params[FINE_PARAM];

src/E340.cpp:72:65: error: cannot convert ‘__gnu_cxx::__alloc_traits<std::allocatorrack::Input >::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::allocatorrack::Input >::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::allocatorrack::Input >::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::allocatorrack::Input >::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::allocatorrack::Param >::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::allocatorrack::Output >::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::allocatorrack::Output >::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
Copy link
Member

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

@hammerandtongs
Copy link
Author

Very nice, works great!

Thanks for doing this software it's been fun.

@AndrewBelt
Copy link
Member

Great, glad it's working for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants