weibocom/nginx-upsync-module

nginx-upsync-module与nginx_upstream_check_module同时编译,编译不过,报错

shuqingzai opened this issue · 1 comments

nginx 是 1.19.3,我也是了好几个nginx(1.16.1,1.17.3,1.18.0)的版本也不行
nginx-upsync-module 是 v2.+
nginx_upstream_check_module是 nginx_upstream_check_module-master,并且使用的补丁是: check_1.16.1+.patch
同时编译nginx-upsync-module与nginx_upstream_check_module会出错:
-lm -lpcre -lssl -lcrypto -lz -lxml2 -lxslt -lexslt -lgd -lGeoIP
-Wl,-E
/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: objs/addon/src/ngx_http_upsync_module.o: in function ngx_http_upsync_add_peers': /nginx/nginx-upsync-module-2.1.0/src/ngx_http_upsync_module.c:893: undefined reference to ngx_http_upstream_check_add_dynamic_peer'
/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: objs/addon/src/ngx_http_upsync_module.o: in function ngx_http_upsync_del_peers': /nginx/nginx-upsync-module-2.1.0/src/ngx_http_upsync_module.c:1126: undefined reference to ngx_http_upstream_check_delete_dynamic_peer'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:330: objs/nginx] Error 1
make[1]: Leaving directory '/nginx/nginx-1.19.3'
make: *** [Makefile:8: build] Error 2

image

xiaokai-wang 分支兼容 nginx-upsync-module 模块【推荐】,1.12.1 的补丁可以用于 1.16.1

https://github.com/xiaokai-wang/nginx_upstream_check_module.git

yaoweibin 分支不兼容 nginx-upsync-module 模块,但补丁更新较快

https://github.com/yaoweibin/nginx_upstream_check_module.git