你好,我使用master代码用如下的配置进行编译,tfs模块编译出错 gcc 是4.4.7版本 64位系统 编译参数 ./configure --prefix=/opt/websuite/tengine \ --conf-path=/opt/config/tengine/nginx.conf \ --error-log-path=/opt/logs/tengine/error.log \ --http-log-path=/opt/logs/tengine/access.log \ --pid-path=/opt/run/tengine \ --user=websuite \ --group=websuite \ --dso-path=/opt/websuite/tengine/modules \ --without-select_module \ --without-poll_module \ --with-file-aio \ --with-http_v2_module \ --with-http_realip_module \ --with-http_gzip_static_module \ --with-http_auth_request_module \ --with-http_addition_module=shared \ --with-http_image_filter_module=shared \ --with-http_geoip_module=shared \ --with-http_concat_module=shared \ --with-http_random_index_module=shared \ --with-http_secure_link_module=shared \ --with-http_sysguard_module=shared \ --with-http_charset_filter_module=shared \ --with-http_userid_filter_module=shared \ --with-http_footer_filter_module=shared \ --with-http_trim_filter_module=shared \ --with-http_access_module=shared \ --with-http_autoindex_module=shared \ --with-http_map_module=shared \ --with-http_referer_module=shared \ --with-http_fastcgi_module=shared \ --with-http_uwsgi_module=shared \ --with-http_scgi_module=shared \ --with-http_empty_gif_module=shared \ --with-http_limit_conn_module=shared \ --with-http_limit_req_module=shared \ --with-http_browser_module=shared \ --with-http_user_agent_module=shared \ --with-http_upstream_session_sticky_module=shared \ --with-http_upstream_ip_hash_module=shared \ --with-http_upstream_least_conn_module=shared \ --without-http_ssi_module \ --without-http_split_clients_module \ --without-http_memcached_module \ --without-http_empty_gif_module \ --with-luajit-inc=/opt/websuite/tengine/include/luajit-2.1 \ --with-luajit-lib=/opt/websuite/tengine/lib \ --http-client-body-temp-path=/opt/websuite/tengine/cache/client_temp \ --http-proxy-temp-path=/opt/websuite/tengine/cache/proxy_temp \ --http-fastcgi-temp-path=/opt/websuite/tengine/cache/fastcgi_temp \ --http-uwsgi-temp-path=/opt/websuite/tengine/cache/uwsgi_temp \ --http-scgi-temp-path=/opt/websuite/tengine/cache/scgi_temp \ --without-mail_pop3_module \ --without-mail_imap_module \ --without-mail_smtp_module \ --with-pcre=../pcre-8.36 \ --with-pcre-opt=-fPIC \ --with-pcre-jit \ --with-jemalloc \ --with-cc-opt='-w -pipe -march=native -mtune=native -m128bit-long-double -m64 -fno-builtin-malloc' \ --add-module=/root/source/tengine/echo-nginx-module \ --add-module=/root/source/tengine/headers-more-nginx-module \ --add-module=/root/source/tengine/memc-nginx-module \ --add-module=/root/source/tengine/nginx-module-vts \ --add-module=/root/source/tengine/ngx_cache_purge \ --add-module=/root/source/tengine/ngx_devel_kit \ --add-module=/root/source/tengine/redis2-nginx-module \ --add-module=/root/source/tengine/set-misc-nginx-module \ --add-module=/root/source/tengine/srcache-nginx-module \ --add-module=/root/source/tengine/nginx-hmux-module \ --add-module=/root/source/tengine/lua-nginx-module \ --add-module=/root/source/tengine/lua-upstream-nginx-module \ --add-module=/root/source/tengine/testcookie-nginx-module \ --with-http_tfs_module=shared \ --with-libyajl-inc=/opt/websuite/tengine/include \ --with-libyajl-lib=/opt/websuite/tengine/lib 报错信息如下 src/http/modules/tfs/ngx_http_tfs.c: 在函数‘ngx_http_tfs_process_upstream_request’中: src/http/modules/tfs/ngx_http_tfs.c:995: 错误:提供给函数‘c->recv_chain’的实参太少 make[1]: * [objs/src/http/modules/tfs/ngx_http_tfs.o] 错误 1 make[1]: Leaving directory `/root/source/tengine/src/tengine' make: * [build] 错误 2
Q
[alibaba/tengine]tengine master版本编译tfs模块报错
6
A
回答
8
this pr will fix the error. #714
5
tfs模块编译的问题已经OK了,但是又出现另一个问题,是跟SinaMSRE的lua-upstream-nginx-module发生了冲突,报错如下 /root/source/tengine/lua-upstream-nginx-module/src/ngx_http_lua_upstream_module.c:56: 错误:与‘ngx_prealloc’类型冲突 src/core/ngx_palloc.h:85: 附注:‘ngx_prealloc’的上一个声明在此 make[1]: * [objs/addon/src/ngx_http_lua_upstream_module.o] 错误 1 make[1]: Leaving directory `/root/source/tengine/src/tengine' make: * [build] 错误 2 后来我把src/core/ngx_palloc.h中的ngx_prealloc改了个名字后,编译就都通过了,不知道这样是不是有问题,请大拿协助
3
可以,tengine主流程上并没有用到这个函数。
1
我建议将tengine中ngx_prealloc逻辑移入tfs模块。目前tengine主流程并没有依赖这个函数。 这样也防止其他3rd模块实现了ngx_prealloc同名函数导致编译冲突