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

安装失败

Open YuxinHan258 opened this issue 3 years ago • 4 comments
trafficstars

./configure 报错内容

Is OSX: NO st-1.9t is ok. build http-parser-2.1 cc -I. -DHTTP_PARSER_STRICT=1 -Wall -Wextra -Werror -O0 -g -c http_parser.c http_parser.c: In function ‘http_parser_parse_url’: http_parser.c:2093:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 2093 | found_at = 1; | ~~~~~~~~~^~~ http_parser.c:2096:7: note: here 2096 | case s_req_server: | ^~~~ cc1: all warnings being treated as errors make: *** [Makefile:35:http_parser.o] 错误 1 build http-parser-2.1 failed, ret=2

YuxinHan258 avatar Jan 06 '22 10:01 YuxinHan258

http-parser的编译同时打开了-Wall -Wextra -Werror。 把http-parser库里的makefile中的 -Werror 去掉就行

This warning notifies the programmer about the fall through. This warning option can be controlled with the GCC compiler switch -Wimplicit-fallthrough. It is not enabled by default and is not enabled by -Wall, but it is enabled by -Wextra.

Warnings become errors if the -Werror switch is used. -Werror is not enabled by default.

C++17 introduced [[fallthrough]] attribute, which can be used to explicitly document the fall through when it is intentional. The compiler should not warn if it is used.

SU79840 avatar Mar 04 '22 03:03 SU79840

感谢,我已经放弃使用这个工具了

YuxinHan258 avatar Mar 04 '22 03:03 YuxinHan258

我遇上了同样的问题,但是每次用vi 把Makefile 里的-Werror 去掉后,一跑 ./configure, 那-Werror 又回到 Makefile 里面。

farmountain avatar Mar 31 '22 06:03 farmountain

@[farmountain] 你删错地方了,要vim ./3rdparty/http-parser-2.1.zip 中的Makefile。

apiha avatar Apr 01 '22 10:04 apiha