It seems that this commit increased the C standard level from C99 to C17 for the purpose of supporting anonymous unions in accordance to the updated standard instead of using the compiler-specific __extension__
keyword. However, it looks like this improvement to the language took place in the transition from C99 to C11 (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2244.htm), so they could have as well specified C11 instead of C17. This was a pretty recent change and it doesn't look like any new code has been added since then that would rely on C17. For all of these reasons, I think it is safe to lower the requirement to C11 which is the latest C revision supported by gcc on the latest Bela version.
Apply this patch and you should be able to build:
diff --git a/wscript b/wscript
index 659328c..cdd25ab 100644
--- a/wscript
+++ b/wscript
@@ -281,9 +281,9 @@ def configure(conf):
if conf.options.enable_debug:
- conf.env.append_unique("CFLAGS", ["-std=c17", "-Wall", "-g", "-Og"])
+ conf.env.append_unique("CFLAGS", ["-std=c11", "-Wall", "-g", "-Og"])
else:
- conf.env.append_unique("CFLAGS", ["-std=c17", "-Wall", "-Werror", "-O2"])
+ conf.env.append_unique("CFLAGS", ["-std=c11", "-Wall", "-Werror", "-O2"])
if conf.env.CC_NAME in ["gcc", "clang"]:
(i.e.: replace c17
with c11
in wscript
). You'll have to rm -rf build
and ./waf configure
again after this for the changes to be picked up.