srs-bench icon indicating copy to clipboard operation
srs-bench copied to clipboard

configure build failed.

Open geelaro opened this issue 4 years ago • 6 comments

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 ```

geelaro avatar Dec 06 '19 12:12 geelaro

same error, any solution?

tanero avatar Apr 04 '20 19:04 tanero

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.

smartx-jshan avatar Jul 29 '20 06:07 smartx-jshan

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

praveenkumarKajla avatar May 26 '21 09:05 praveenkumarKajla

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

xvxieweilai avatar Oct 23 '21 20:10 xvxieweilai

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

lersure avatar Mar 02 '22 07:03 lersure

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...

pksml85 avatar Apr 19 '24 00:04 pksml85