Compiling problem


(Anemos) #1

Hello, I have the following error when trying to compile the zubax_babel product

Compiling config.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
zubax_chibios///zubax_chibios/config/config.cpp: In function ‘void configRegisterParam_(const ConfigParam*)’:
zubax_chibios///zubax_chibios/config/config.cpp:173:22: warning: declaration of ‘ch’ shadows a global declaration [-Wshadow]
for (const char* ch = param->name; ch; ch++)
^~
In file included from zubax_chibios///chibios/os/rt/include/ch.h:78:0,
from zubax_chibios///chibios/os/various/cpp_wrappers/ch.hpp:25,
from zubax_chibios///zubax_chibios/config/config.cpp:14:
zubax_chibios///chibios/os/rt/include/chschd.h:521:20: note: shadowed declaration is here
extern ch_system_t ch;
^~
zubax_chibios///zubax_chibios/config/config.cpp: In function 'bool isValid(const ConfigParam
, float)’:
zubax_chibios///zubax_chibios/config/config.cpp:114:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
}
^
zubax_chibios///zubax_chibios/config/config.cpp:117:5: note: here
case CONFIG_TYPE_FLOAT:
^~~~
cc1plus: all warnings being treated as errors
make: *** [zubax_chibios///chibios/os/common/ports/ARMCMx/compilers/GCC/rules.mk:194: build/obj/config.o] Error 1


(Pavel Kirienko) #2

Wrong toolchain. You need GCC v6.3.


(Anemos) #3

why do we need a precise version of the toolchain ?
this is not very convenient, especially if an other project needs an other gcc version.


(Pavel Kirienko) #4

Ultimately, this question should be directed towards the GCC maintainers. There is no guarantee that a binary compiled with a newer or older toolchain will work as expected, so we freeze the version number per release.