wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

Supported releases - latest release and main broken #199

Closed eaoliver closed 9 years ago

eaoliver commented 9 years ago

Which releases of nginx-push-stream-module are supported against which releases of nginx?

I've tried to compile the latest release and main against the latest stable version of nginx (1.8.0) and keep getting:

cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I /nginx-push-stream-module/src -I /nginx-push-stream-module/include -I objs -I src/http -I src/http/modules -I src/http/modules/perl -I src/mail \ -o objs/addon/src/ngx_http_push_stream_module.o \ /nginx-push-stream-module/src/ngx_http_push_stream_module.c In file included from /nginx-push-stream-module/src/ngx_http_push_stream_module.c:26:0: /nginx-push-stream-module/include/ngx_http_push_stream_module.h:36:5: error: unknown type name 'ngx_regex_t' ngx_regex_t _agent; ^ /nginx-push-stream-module/include/ngx_http_push_stream_module.h:100:5: error: unknown type name 'ngx_regex_t' ngx_regex_t backtrack_parser_regex; ^ In file included from /nginx-push-stream-module/src/ngx_http_push_stream_module.c:27:0: /nginx-push-stream-module/src/ngx_http_push_stream_module_setup.c: In function 'ngx_http_push_stream_init_main_conf': /nginx-push-stream-module/src/ngx_http_push_stream_module_setup.c:536:5: error: unknown type name 'ngx_regex_compile_t' ngx_regex_compile_t backtrack_parser = NULL; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_setup.c:539:58: error: 'ngx_regex_compile_t' undeclared (first use in this function) if ((backtrack_parser = ngx_pcalloc(cf->pool, sizeof(ngx_regex_compile_t))) == NULL) { ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_setup.c:539:58: note: each undeclared identifier is reported only once for each function it appears in /nginx-push-stream-module/src/ngx_http_push_stream_module_setup.c:544:21: error: request for member 'pattern' in something not a structure or union backtrack_parser->pattern = NGX_HTTP_PUSH_STREAM_BACKTRACK_PATTERN; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_setup.c:545:21: error: request for member 'pool' in something not a structure or union backtrack_parser->pool = cf->pool; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_setup.c:546:21: error: request for member 'err' in something not a structure or union backtrack_parser->err.len = NGX_MAX_CONF_ERRSTR; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_setup.c:547:21: error: request for member 'err' in something not a structure or union backtrack_parser->err.data = errstr; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_setup.c:549:5: error: implicit declaration of function 'ngx_regex_compile' [-Werror=implicit-function-declaration] if (ngx_regex_compile(backtrack_parser) != NGX_OK) { ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_setup.c:554:52: error: request for member 'regex' in something not a structure or union conf->backtrack_parser_regex = backtrack_parser->regex; ^ In file included from /nginx-push-stream-module/src/ngx_http_push_stream_module.c:29:0: /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c: In function 'ngx_http_push_stream_parse_paddings': /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2001:5: error: unknown type name 'ngx_regex_compile_t' ngx_regex_compile_t padding_rc, *agent_rc; ^ In file included from src/core/ngx_core.h:51:0, from /nginx-push-stream-module/include/ngx_http_push_stream_module.h:30, from /nginx-push-stream-module/src/ngx_http_push_stream_module.c:26: /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2014:37: error: 'ngx_regex_compile_t' undeclared (first use in this function) ngx_memzero(&padding_rc, sizeof(ngx_regex_compile_t)); ^ src/core/ngx_string.h:86:57: note: in definition of macro 'ngx_memzero'

define ngx_memzero(buf, n) (void) memset(buf, 0, n)

                                                     ^

In file included from /nginx-push-stream-module/src/ngx_http_push_stream_module.c:29:0: /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2016:15: error: request for member 'pattern' in something not a structure or union padding_rc.pattern = NGX_HTTP_PUSH_STREAM_PADDING_BY_USER_AGENT_PATTERN; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2017:15: error: request for member 'pool' in something not a structure or union padding_rc.pool = cf->pool; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2018:15: error: request for member 'err' in something not a structure or union padding_rc.err.len = NGX_MAX_CONF_ERRSTR; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2019:15: error: request for member 'err' in something not a structure or union padding_rc.err.data = errstr; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2030:9: error: implicit declaration of function 'ngx_regex_exec' [-Werror=implicit-function-declaration] rc = ngx_regex_exec(padding_rc.regex, &aux, captures, 12); ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2030:39: error: request for member 'regex' in something not a structure or union rc = ngx_regex_exec(padding_rc.regex, &aux, captures, 12); ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2031:19: error: 'NGX_REGEX_NO_MATCHED' undeclared (first use in this function) if (rc == NGX_REGEX_NO_MATCHED) { ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2057:17: error: request for member 'pattern' in something not a structure or union agent_rc->pattern = agent; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2058:17: error: request for member 'pool' in something not a structure or union agent_rc->pool = cf->pool; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2059:17: error: request for member 'err' in something not a structure or union agent_rc->err.len = NGX_MAX_CONF_ERRSTR; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2060:17: error: request for member 'err' in something not a structure or union agent_rc->err.data = errstr; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2072:34: error: request for member 'regex' in something not a structure or union padding->agent = agent_rc->regex; ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2078:140: error: request for member 'pattern' in something not a structure or union ngx_conf_log_error(NGX_LOG_INFO, cf, 0, "push stream module: padding detected %V, header_min_len %d, message_min_len %d", &agent_rc->pattern, padding->header_min_len, padding->message_min_len); ^ /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c: In function 'ngx_http_push_stream_parse_channels_ids_from_path': /nginx-push-stream-module/src/ngx_http_push_stream_module_utils.c:2276:20: error: 'NGX_REGEX_NO_MATCHED' undeclared (first use in this function) } while ((n != NGX_REGEX_NO_MATCHED) && (aux.data < (vv_channels_path.data + vv_channels_path.len))); ^ cc1: all warnings being treated as errors objs/Makefile:1095: recipe for target 'objs/addon/src/ngx_http_push_stream_module.o' failed make[1]: _* [objs/addon/src/ngx_http_push_stream_module.o] Error 1 make[1]: Leaving directory '/nginx-1.8.0' Makefile:8: recipe for target 'build' failed make: *\ [build] Error 2

eaoliver commented 9 years ago

I've tested all the way back to nginx version: nginx-1.0.15 . Same issue. ngx_regex_t is an uknown type.

eaoliver commented 9 years ago

Removed --without-http_rewrite_module from nginx configure parameters and it compiled.

Might want to include that nginx compilation requirement in the documentation.

wandenberg commented 9 years ago

On installation section is written works with 1.2.0+ and the normal nginx setup is enough to compile the module. Once you choose to compile nginx disabling some core module you should check if something will break by yourself.

fasiha commented 9 years ago

@wandenberg can I understand your comment to mean that I don't have to build nginx from source to get nginx-push-stream? Homebrew installed nginx 1.8.0 on Mac, and I'm about to build the latest sources per the installation instructions but saw your comment and thought to ask. Thanks!

wandenberg commented 9 years ago

@fasiha you misunderstood my comment. What I mean is like said on installation section to compile the module just executing the ./configure --add-module=PATH_TO_MODULE is enough. So you have to build from source since it isn't part of the nginx. But when you want to switch off some core module is your responsibility check what can be done or not.

fasiha commented 9 years ago

Thanks! I got it to work no problem, didn't have to do anything with --without-http_rewrite_module like op. The fun is already starting 😄!