srs-bench
srs-bench copied to clipboard
configure build failed.
ubuntu 18.04 message:
http_parser.c:2093:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
found_at = 1;
~~~~~~~~~^~~
http_parser.c:2096:7: note: here
case s_req_server:
^~~~
cc1: all warnings being treated as errors
Makefile:35: recipe for target 'http_parser.o' failed
make: *** [http_parser.o] Error 1
build http-parser-2.1 failed, ret=2 ```
same error, any solution?
Higher version of gcc doesn't allow switch cases to fall through. (I checked the same error with gcc version 7.5)
To fix this error, you need to modify http_parser.c
in http-parser-2.1.zip (located in 3rdparty/http-parser-2.1.zip)
In line 2095, add: __attribute__((fallthrough));
, so this should look like:
case s_req_server_with_at:
found_at = 1;
__attribute__((fallthrough));
/* FALLTROUGH */
case s_req_server:
uf = UF_HOST;
break;
And then, try build again after replacing with the zip file containing the modified file.
check https://github.com/praveenkumarKajla/srs-bench for the changes suggested clone and run
cd srs-bench && ./configure && make &&
./objs/sb_rtmp_load -c 1 -r rtmp://127.0.0.1:1935/live/livestream
check https://github.com/praveenkumarKajla/srs-bench for the changes suggested clone and run
cd srs-bench && ./configure && make && ./objs/sb_rtmp_load -c 1 -r rtmp://127.0.0.1:1935/live/livestream
nice
check https://github.com/praveenkumarKajla/srs-bench for the changes suggested clone and run
cd srs-bench && ./configure && make && ./objs/sb_rtmp_load -c 1 -r rtmp://127.0.0.1:1935/live/livestream
good
check https://github.com/praveenkumarKajla/srs-bench for the changes suggested clone and run
cd srs-bench && ./configure && make && ./objs/sb_rtmp_load -c 1 -r rtmp://127.0.0.1:1935/live/livestream
Size of the git repositories:
687820 ./srs-bench-praveenkumarKajla
29944 ./srs-bench
Hmmm... Definitely seems suspicious to me...