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

tengine2.2.0 TFS CentOS7编译错误 #1093

Closed
bukebuhao opened this issue Aug 28, 2018 · 2 comments
Closed

tengine2.2.0 TFS CentOS7编译错误 #1093

bukebuhao opened this issue Aug 28, 2018 · 2 comments

Comments

@bukebuhao
Copy link

bukebuhao commented Aug 28, 2018

./configure --prefix=/usr/local/tengine2.2.0 --with-ld-opt="-Wl,-rpath,/usr/local/luajit/lib" --enable-mods-static=all --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_ssl_module --with-md5=/usr/lib --with-http_realip_module --with-pcre --with-http_sub_module --with-http_image_filter_module --with-http_upstream_check_module --with-http_tfs_module --with-http_concat_module --with-http_upstream_check_module --with-syslog --with-openssl=/usr/local/src/openssl-1.0.1t --add-module=/usr/local/src/lua-nginx-module-0.10.8 --add-module=/usr/local/src/ngx_devel_kit-0.3.0 --add-module=/usr/local/src/ngx_cache_purge-2.3

先前在centos6.9等编译都是可以的,现在在centos7上 make的时候出现

    -o objs/src/http/modules/tfs/ngx_http_tfs_rc_server_info.o \
    src/http/modules/tfs/ngx_http_tfs_rc_server_info.c

src/http/modules/tfs/ngx_http_tfs_rc_server_info.c: 在函数‘ngx_http_tfs_dump_rc_info’中:
src/http/modules/tfs/ngx_http_tfs_rc_server_info.c:330:41: 错误:变量‘physical_clusters’被设定但未被使用 [-Werror=unused-but-set-variable]
ngx_http_tfs_physical_cluster_t *physical_clusters;
^
src/http/modules/tfs/ngx_http_tfs_rc_server_info.c:328:41: 错误:变量‘group_info’被设定但未被使用 [-Werror=unused-but-set-variable]
ngx_http_tfs_group_info_t *group_info;
^
cc1: all warnings being treated as errors
make[1]: *** [objs/src/http/modules/tfs/ngx_http_tfs_rc_server_info.o] 错误 1
make[1]: 离开目录“/usr/local/src/zhu/tengine-2.2.2”
make: *** [build] 错误 2

按照网上的说法,修改了Makefile 去除**-Werror**

@chobits
Copy link
Member

chobits commented Oct 9, 2018

  • I added a patch to fix your problem, please check:
diff --git a/src/http/modules/tfs/ngx_http_tfs_rc_server_info.c b/src/http/modules/tfs/ngx_http_tfs_rc_server_info.c
index 6404ac7f..bf18d834 100644
--- a/src/http/modules/tfs/ngx_http_tfs_rc_server_info.c
+++ b/src/http/modules/tfs/ngx_http_tfs_rc_server_info.c
@@ -330,6 +330,11 @@ ngx_http_tfs_dump_rc_info(ngx_http_tfs_rcs_info_t *rc_info, ngx_log_t *log)
     ngx_http_tfs_physical_cluster_t    *physical_clusters;
     ngx_http_tfs_cluster_group_info_t  *unlink_cluster_groups;

+#if (NGX_SUPPRESS_WARN)
+    group_info = NULL;
+    physical_clusters = NULL;
+#endif
+
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "=========dump rc info for appkey: %V =========",
                    &rc_info->appkey);
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, log, 0, "appid: %uL, logical_cluster_count: %uD",

@chobits
Copy link
Member

chobits commented Mar 28, 2019

This bug has been fixed in Tengine 2.3.0.

Tengine-2.3.0 has been released, it has been been upgraded to nginx 1.15.9.

For more details of new version, see #1220.

@chobits chobits closed this as completed Mar 28, 2019
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

2 participants