cmake adds -std=gnu90
it seems the the CFLAGS are not properly set in the CMakeLists.txt. Cmake currently appends -std=gnu90 at the end of the CFLAGS, overriding the earlier set -std=c99.
This makes the build fail:
[ 59%] Building C object CMakeFiles/buho.dir/QGumboParser/gumbo-parser/src/attribute.c.o
/home/pmos/build/src/buho-375480f43ca3f1eefb0fe029582426ad94e760ae/QGumboParser/gumbo-parser/src/attribute.c: In function 'gumbo_get_attribute':
/home/pmos/build/src/buho-375480f43ca3f1eefb0fe029582426ad94e760ae/QGumboParser/gumbo-parser/src/attribute.c:30:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
30 | for (unsigned int i = 0; i < attributes->length; ++i) {
| ^~~
/home/pmos/build/src/buho-375480f43ca3f1eefb0fe029582426ad94e760ae/QGumboParser/gumbo-parser/src/attribute.c:30:3: note: use option '-std=c99', '-std=gnu99', '-std=c11' or '-std=gnu11' to compile your code
make[2]: *** [CMakeFiles/buho.dir/build.make:303: CMakeFiles/buho.dir/QGumboParser/gumbo-parser/src/attribute.c.o] Error 1
In postmarketOS, we're using this workaround for now:
https://gitlab.com/postmarketOS/pmaports/commit/7308632f6c145109d876bf202fda880725fae4f8