Plaits_test.cc Compile Error (unrecognized command line option "-Wno-unused-local-typedef" [-Werror])

Hello,

I’m trying to build plaits_test.cc (in the plaits/test folder) from within the mutable development environment (vagrant) and am getting the following compile error:

cc1plus: error: unrecognized command line option “-Wno-unused-local-typedef” [-Werror]

Any ideas why this might be? I’m compiling from the root folder with the following command:

make -f plaits/test/makefile

Full compiler output included below:

Regards,
Graham

vagrant@vagrant-ubuntu-trusty-64:/vagrant/eurorack-modules$ make -f plaits/test/makefile
cat build/plaits_test/additive_engine.d build/plaits_test/bass_drum_engine.d build/plaits_test/chord_engine.d build/plaits_test/fm_engine.d build/plaits_test/grain_engine.d build/plaits_test/hi_hat_engine.d build/plaits_test/lpc_speech_synth.d build/plaits_test/lpc_speech_synth_controller.d build/plaits_test/lpc_speech_synth_phonemes.d build/plaits_test/lpc_speech_synth_words.d build/plaits_test/modal_engine.d build/plaits_test/modal_voice.d build/plaits_test/naive_speech_synth.d build/plaits_test/noise_engine.d build/plaits_test/particle_engine.d build/plaits_test/plaits_test.d build/plaits_test/random.d build/plaits_test/resonator.d build/plaits_test/resources.d build/plaits_test/sam_speech_synth.d build/plaits_test/snare_drum_engine.d build/plaits_test/speech_engine.d build/plaits_test/string.d build/plaits_test/string_engine.d build/plaits_test/string_voice.d build/plaits_test/swarm_engine.d build/plaits_test/units.d build/plaits_test/virtual_analog_engine.d build/plaits_test/voice.d build/plaits_test/waveshaping_engine.d build/plaits_test/wavetable_engine.d > build/plaits_test/depends.mk
g++ -c -DTEST -g -Wall -Werror -msse2 -Wno-unused-variable -Wno-unused-local-typedef -O2 -I. plaits/dsp/engine/particle_engine.cc -o build/plaits_test/particle_engine.o
In file included from ./plaits/dsp/dsp.h:32:0,
from ./plaits/dsp/engine/engine.h:32,
from ./plaits/dsp/engine/particle_engine.h:32,
from plaits/dsp/engine/particle_engine.cc:29:
./plaits/dsp/fx/fx_engine.h: In member function ‘void plaits::FxEngine<size, format>::Context::Write(D&, int32_t, float)’:
./stmlib/stmlib.h:58:95: error: typedef ‘__static_assertion_test_at_line_171’ locally defined but not used [-Werror=unused-local-typedefs]
typedef impl::StaticAssertionTest<sizeof(JOIN(_static_assertion_at_line, LINE))> JOIN(_static_assertion_test_at_line, LINE)
^
./stmlib/stmlib.h:51:27: note: in definition of macro ‘JOIN_2’
#define JOIN_2(lhs, rhs) lhs##rhs
^
./stmlib/stmlib.h:49:27: note: in expansion of macro ‘JOIN_1’
#define JOIN(lhs, rhs) JOIN_1(lhs, rhs)
^
./stmlib/stmlib.h:58:90: note: in expansion of macro ‘JOIN’
typedef impl::StaticAssertionTest<sizeof(JOIN(_static_assertion_at_line, LINE))> JOIN(_static_assertion_test_at_line, LINE)
^
./plaits/dsp/fx/fx_engine.h:171:7: note: in expansion of macro ‘STATIC_ASSERT’
STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);
^
./plaits/dsp/fx/fx_engine.h: In member function ‘void plaits::FxEngine<size, format>::Context::Read(D&, int32_t, float)’:
./stmlib/stmlib.h:58:95: error: typedef ‘__static_assertion_test_at_line_199’ locally defined but not used [-Werror=unused-local-typedefs]
typedef impl::StaticAssertionTest<sizeof(JOIN(_static_assertion_at_line, LINE))> JOIN(_static_assertion_test_at_line, LINE)
^
./stmlib/stmlib.h:51:27: note: in definition of macro ‘JOIN_2’
#define JOIN_2(lhs, rhs) lhs##rhs
^
./stmlib/stmlib.h:49:27: note: in expansion of macro ‘JOIN_1’
#define JOIN(lhs, rhs) JOIN_1(lhs, rhs)
^
./stmlib/stmlib.h:58:90: note: in expansion of macro ‘JOIN’
typedef impl::StaticAssertionTest<sizeof(JOIN(_static_assertion_at_line, LINE))> JOIN(_static_assertion_test_at_line, LINE)
^
./plaits/dsp/fx/fx_engine.h:199:7: note: in expansion of macro ‘STATIC_ASSERT’
STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);
^
./plaits/dsp/fx/fx_engine.h: In member function ‘void plaits::FxEngine<size, format>::Context::Interpolate(D&, float, float)’:
./stmlib/stmlib.h:58:95: error: typedef ‘__static_assertion_test_at_line_228’ locally defined but not used [-Werror=unused-local-typedefs]
typedef impl::StaticAssertionTest<sizeof(JOIN(_static_assertion_at_line, LINE))> JOIN(_static_assertion_test_at_line, LINE)
^
./stmlib/stmlib.h:51:27: note: in definition of macro ‘JOIN_2’
#define JOIN_2(lhs, rhs) lhs##rhs
^
./stmlib/stmlib.h:49:27: note: in expansion of macro ‘JOIN_1’
#define JOIN(lhs, rhs) JOIN_1(lhs, rhs)
^
./stmlib/stmlib.h:58:90: note: in expansion of macro ‘JOIN’
typedef impl::StaticAssertionTest<sizeof(JOIN(_static_assertion_at_line, LINE))> JOIN(_static_assertion_test_at_line, LINE)
^
./plaits/dsp/fx/fx_engine.h:228:7: note: in expansion of macro ‘STATIC_ASSERT’
STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);
^
./plaits/dsp/fx/fx_engine.h: In member function ‘void plaits::FxEngine<size, format>::Context::Interpolate(D&, float, plaits::LFOIndex, float, float)’:
./stmlib/stmlib.h:58:95: error: typedef ‘__static_assertion_test_at_line_242’ locally defined but not used [-Werror=unused-local-typedefs]
typedef impl::StaticAssertionTest<sizeof(JOIN(_static_assertion_at_line, LINE))> JOIN(_static_assertion_test_at_line, LINE)
^
./stmlib/stmlib.h:51:27: note: in definition of macro ‘JOIN_2’
#define JOIN_2(lhs, rhs) lhs##rhs
^
./stmlib/stmlib.h:49:27: note: in expansion of macro ‘JOIN_1’
#define JOIN(lhs, rhs) JOIN_1(lhs, rhs)
^
./stmlib/stmlib.h:58:90: note: in expansion of macro ‘JOIN’
typedef impl::StaticAssertionTest<sizeof(JOIN(_static_assertion_at_line, LINE))> JOIN(_static_assertion_test_at_line, LINE)
^
./plaits/dsp/fx/fx_engine.h:242:7: note: in expansion of macro ‘STATIC_ASSERT’
STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);
^
At global scope:
cc1plus: error: unrecognized command line option “-Wno-unused-local-typedef” [-Werror]
cc1plus: all warnings being treated as errors
make: *** [build/plaits_test/particle_engine.o] Error 1

These files are not meant to be compiled with the arm compiler (they don’t run on the module’s hardware!), but with whichever compiler is available on the host system.

Ah yes, of course! Sorry, it’s been a long week :slight_smile:

In case anyone comes across this and is also trying to get the tests to work, I had to remove the -lprofiler flag in the makefile (easier than figuring out which profiling tool needs to be installed, at this point…)

After that everything built fine (lots of .o and .d files in build/plaits_test), but it took me a little while to realise that the plaits_test executable gets put in the root folder and need to be run (./plaits_test) to create the WAV(s).

Thanks for help and for the wealth of knowledge contained in everything you’ve made here, so much to learn!

1 Like