Re: а проект nginx-ctpp похоже уже забросили ?

Валентин Бартенев ne на vbart.ru
Чт Май 17 08:15:19 UTC 2012


On Thursday 17 May 2012 11:44:15 Ivan wrote:
> тк багтрекер не работает поясню в чем заключ баг:
> 
> gcc 4.4.6,  ctpp2-2.7.5. nginx-1.2. Был наложен патч на nginx:
> 
> --- auto/cc/gcc 2012-02-23 20:06:39.000000000 -0600
> +++ auto/cc/gcc.fixed 2012-02-23 20:07:08.000000000 -0600
> @@ -170,7 +170,7 @@
> 
> 
> # stop on warning
> -CFLAGS="$CFLAGS -Werror"
> +# CFLAGS="$CFLAGS -Werror"
> 
> ошибка при сборке nginx с параметрами:
> ./configure --add-module=./../nginx-ctpp/
> In file included from src/core/ngx_core.h:64,
>                  from ./../nginx-ctpp//sources/ctpp2_process.h:12,
>                  from ./../nginx-ctpp//sources/ctpp2_process.cpp:7:
> src/core/ngx_regex.h:24: error: declaration of ‘pcre* <anonymous
> struct>::pcre’ /usr/include/pcre.h:200: error: changes meaning of ‘pcre’
> from ‘typedef struct real_pcre pcre’ make[1]: ***
> [objs/addon/sources/ctpp2_process.o] Error 1
> make[1]: Leaving directory `/home/isiyanko/rpmbuild/BUILDROOT/nginx-1.2.0'
> make: *** [build] Error 2
> 

Держите патч на nginx. С ним должно собираться без проблем. Патч нужен только 
для версий 1.1.12 и выше.

Index: src/core/ngx_regex.h
===================================================================
--- src/core/ngx_regex.h        (revision 4638)
+++ src/core/ngx_regex.h        (working copy)
@@ -21,7 +21,7 @@
 
 
 typedef struct {
-    pcre        *pcre;
+    pcre        *expression;
     pcre_extra  *extra;
 } ngx_regex_t;
 
@@ -50,8 +50,8 @@
 ngx_int_t ngx_regex_compile(ngx_regex_compile_t *rc);
 
 #define ngx_regex_exec(re, s, captures, size)                                \
-    pcre_exec(re->pcre, re->extra, (const char *) (s)->data, (s)->len, 0, 0, \
-              captures, size)
+    pcre_exec(re->expression, re->extra, (const char *) (s)->data, (s)->len, \
+              0, 0, captures, size)
 #define ngx_regex_exec_n      "pcre_exec()"
 
 ngx_int_t ngx_regex_exec_array(ngx_array_t *a, ngx_str_t *s, ngx_log_t *log);
Index: src/core/ngx_regex.c
===================================================================
--- src/core/ngx_regex.c        (revision 4638)
+++ src/core/ngx_regex.c        (working copy)
@@ -152,7 +152,7 @@
         return NGX_ERROR;
     }
 
-    rc->regex->pcre = re;
+    rc->regex->expression = re;
 
     /* do not study at runtime */
 
@@ -367,8 +367,8 @@
             i = 0;
         }
 
-        elts[i].regex->extra = pcre_study(elts[i].regex->pcre, opt, &errstr);
-
+        elts[i].regex->extra = pcre_study(elts[i].regex->expression, opt,
+                                          &errstr);
         if (errstr != NULL) {
             ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
                           "pcre_study() failed: %s in \"%s\"",
@@ -380,7 +380,7 @@
             int jit, n;
 
             jit = 0;
-            n = pcre_fullinfo(elts[i].regex->pcre, elts[i].regex->extra,
+            n = pcre_fullinfo(elts[i].regex->expression, elts[i].regex->extra,
                               PCRE_INFO_JIT, &jit);
 
             if (n != 0 || jit != 1) {



Подробная информация о списке рассылки nginx-ru