Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure build failed. #19

Open
geelaro opened this issue Dec 6, 2019 · 6 comments
Open

configure build failed. #19

geelaro opened this issue Dec 6, 2019 · 6 comments

Comments

@geelaro
Copy link

geelaro commented Dec 6, 2019

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 ```
@tanero
Copy link

tanero commented Apr 4, 2020

same error, any solution?

@smartx-jshan
Copy link

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.

@praveenkumarKajla
Copy link

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

@xvxieweilai
Copy link

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

@lersure
Copy link

lersure commented Mar 2, 2022

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

@pksml85
Copy link

pksml85 commented Apr 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants