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

编译模块失败 #122

Open
helinb opened this issue Sep 25, 2015 · 3 comments
Open

编译模块失败 #122

helinb opened this issue Sep 25, 2015 · 3 comments

Comments

@helinb
Copy link

helinb commented Sep 25, 2015

编译模块失败在nginx1.8
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c: 在函数‘ngx_tcp_upstream_init_round_robin’中:
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c:68:54: 错误:‘NGX_INVALID_CHECK_INDEX’未声明(在此函数内第一次使用)
== (ngx_uint_t) NGX_INVALID_CHECK_INDEX) {
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c:68:54: 附注:每个未声明的标识符在其出现的函数内只报告一次
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c: 在函数‘ngx_tcp_upstream_init_round_robin_peer’中:
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c:272:22: 错误:‘ngx_peer_connection_t {aka struct ngx_peer_connection_s}’没有名为‘check_index’的成员
s->upstream->peer.check_index = NGX_INVALID_CHECK_INDEX;
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c:272:37: 错误:‘NGX_INVALID_CHECK_INDEX’未声明(在此函数内第一次使用)
s->upstream->peer.check_index = NGX_INVALID_CHECK_INDEX;
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c: 在函数‘ngx_tcp_upstream_create_round_robin_peer’中:
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c:330:51: 错误:‘NGX_INVALID_CHECK_INDEX’未声明(在此函数内第一次使用)
peers->peer[0].check_index = (ngx_uint_t) NGX_INVALID_CHECK_INDEX;
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c: 在函数‘ngx_tcp_upstream_get_round_robin_peer’中:
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.c:608:7: 错误:‘ngx_peer_connection_t {aka struct ngx_peer_connection_s}’没有名为‘check_index’的成员
pc->check_index = peer->check_index;
^
objs/Makefile:1920: recipe for target 'objs/addon/nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.o' failed
make[1]: *** [objs/addon/nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream_round_robin.o] Error 1
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c: 在函数‘ngx_tcp_upstream_connect’中:
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:374:16: 错误:‘ngx_peer_connection_t {aka struct ngx_peer_connection_s}’没有名为‘check_index’的成员
if (u->peer.check_index != NGX_INVALID_CHECK_INDEX) {
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:374:32: 错误:‘NGX_INVALID_CHECK_INDEX’未声明(在此函数内第一次使用)
if (u->peer.check_index != NGX_INVALID_CHECK_INDEX) {
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:374:32: 附注:每个未声明的标识符在其出现的函数内只报告一次
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:375:39: 错误:‘ngx_peer_connection_t {aka struct ngx_peer_connection_s}’没有名为‘check_index’的成员
ngx_tcp_check_get_peer(u->peer.check_index);
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c: 在函数‘ngx_tcp_upstream_next’中:
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:520:20: 错误:‘ngx_peer_connection_t {aka struct ngx_peer_connection_s}’没有名为‘check_index’的成员
if (u->peer.check_index != NGX_INVALID_CHECK_INDEX) {
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:520:36: 错误:‘NGX_INVALID_CHECK_INDEX’未声明(在此函数内第一次使用)
if (u->peer.check_index != NGX_INVALID_CHECK_INDEX) {
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:521:44: 错误:‘ngx_peer_connection_t {aka struct ngx_peer_connection_s}’没有名为‘check_index’的成员
ngx_tcp_check_free_peer(u->peer.check_index);
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:522:20: 错误:‘ngx_peer_connection_t {aka struct ngx_peer_connection_s}’没有名为‘check_index’的成员
u->peer.check_index = NGX_INVALID_CHECK_INDEX;
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c: 在函数‘ngx_tcp_upstream_finalize_session’中:
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:576:16: 错误:‘ngx_peer_connection_t {aka struct ngx_peer_connection_s}’没有名为‘check_index’的成员
if (u->peer.check_index != NGX_INVALID_CHECK_INDEX) {
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:576:32: 错误:‘NGX_INVALID_CHECK_INDEX’未声明(在此函数内第一次使用)
if (u->peer.check_index != NGX_INVALID_CHECK_INDEX) {
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:577:40: 错误:‘ngx_peer_connection_t {aka struct ngx_peer_connection_s}’没有名为‘check_index’的成员
ngx_tcp_check_free_peer(u->peer.check_index);
^
../nginx_tcp_proxy_module-0.4.5/ngx_tcp_upstream.c:578:16: 错误:‘ngx_peer_connection_t {aka struct ngx_peer_connection_s}’没有名为‘check_index’的成员
u->peer.check_index = NGX_INVALID_CHECK_INDEX;
^
make[1]: *** 正在等待未完成的任务....

@helinb
Copy link
Author

helinb commented Sep 26, 2015

打了patch还是不行
../nginx_tcp_proxy_module-0.4.5/modules/ngx_tcp_ssl_module.c
../nginx_tcp_proxy_module-0.4.5/modules/ngx_tcp_ssl_module.c: 在函数‘ngx_tcp_ssl_merge_srv_conf’中:
../nginx_tcp_proxy_module-0.4.5/modules/ngx_tcp_ssl_module.c:327:9: 错误:提供给函数‘ngx_ssl_certificate’的实参太少
if (ngx_ssl_certificate(cf, &conf->ssl, &conf->certificate,
^
In file included from src/core/ngx_core.h:80:0,
from ../nginx_tcp_proxy_module-0.4.5/modules/ngx_tcp_ssl_module.c:3:
src/event/ngx_event_openssl.h:125:11: 附注:在此声明
ngx_int_t ngx_ssl_certificate(ngx_conf_t cf, ngx_ssl_t *ssl,
^
objs/Makefile:2712: recipe for target 'objs/addon/modules/ngx_tcp_ssl_module.o' failed
make[1]: *
* [objs/addon/modules/ngx_tcp_ssl_module.o] Error 1
make[1]: *** 正在等待未完成的任务....

@dna2github
Copy link

if you compile with the latest Nginx 1.9.5 (the same for 1.8):

// add NULL for ngx_tcp_ssl_module.c
ngx_ssl_certificate(cf, &conf->ssl, &conf->certificate, &conf->certificate_key, NULL)
// add pwd=NULL at Line 467 for src/event/ngx_event_openssl.c
tries = 1;
pwd = NULL;

@time-river
Copy link

我编译通过了

$ sudo nginx -V
nginx version: nginx/1.8.0
built by gcc 4.9.2 (Debian 4.9.2-10) 
built with OpenSSL 1.0.2d 9 Jul 2015
TLS SNI support enabled
configure arguments:
...
--add-module=../nginx_tcp_proxy_module

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

3 participants