Apparently, your system compiles sarg from sources during install. It doesn't just install a pre-build executable. The configure script couldn't find a working C compiler to compile sarg. It tried gcc, cc and cl but none of these were found to be working. Either no suitable compiler is installed or, if one is installed, it is unable to produce a valid executable. I see you had to install autoconf, automake and a bunch of devel packages from the command line. Don't you need to install gcc too?
It looks like you are building sarg 2.4.0. Can you try sarg 2.4.0-pre1 (https://sourceforge.net/projects/sarg/files/sarg/sarg-2.4.0-pre1/). It is really version 2.4.1 but I never took the time to release it. All those issues are reported by gcc 8 and later. They should have been fixed in 2.4.0-pre1.
Have you tried to build sarg 2.4.0-pre1 (https://sourceforge.net/projects/sarg/files/sarg/sarg-2.4.0-pre1/)? Does it build on debian 11? Sarg 2.4.0-pre1 is supposed to become 2.4.1. Issues raised by gcc 10 should be fixed.
Thank you for your patch. After more than two years, I finally found some time to integrate it :-).
Add more spaces to the code.
Some bug reports suggest this variable must be at least 14 bytes long
Allow for very long connection time in report
Sarg ignores connections with a duration longer than max_elapsed seconds. Is that parameter set to a non zero value in your sarg.conf ?