Igor,

thanks for checking as well. The Op also posted to the Tomcat dev list and I applied a change to mod_jk a few minutes ago which at least lets it compile for 2.0/2.2/2.3.

The culprit was the usual, we do use APLOG_MARK in other places than just ap_log* and since the macro changed its meaning the code broke. That's expected and well-documented after adding the per-module log config to 2.3.

The change is

http://svn.apache.org/viewvc?view=revision&revision=1022975

and I already answered the other post on the Tomcat dev list.

I didn't yet actually test the resulting code.

Regards,

Rainer

On 15.10.2010 17:50, Igor Galić wrote:
I'll report back in a bit

compiling mod_jk trunk against httpd trunk (with clang from trunk):

It all looks like good clean fun, until it hits the new logging API:

opt/bw/build/libtool --silent --mode=compile /opt/bw/bin/clang 
-I/opt/bw/include -fPIC -msse4.1 -D_FORTIFY_SOURCE=2 -DUSE_APACHE_MD5 -I 
../common -I /include -I /include/unix -
DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_DEBUG -fPIC -march=core2 -msse4.1 
-D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-prototypes -Wstrict-prototypes 
-Wmissing-declarations -pthread
-DHAVE_APR  -I/opt/bw/include -fPIC -msse4.1 -D_FORTIFY_SOURCE=2 -g -Wall 
-Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread 
-DLINUX=2 -D_REENTRANT -D_GNU_
SOURCE -DAP_DEBUG -c mod_jk.c -o mod_jk.lo
mod_jk.c:639:5: warning: incompatible pointer types initializing 'server_rec *' 
(aka 'struct server_rec *') with an expression of type 'char *'
     ap_log_error(file, line, level, 0, s, res);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from mod_jk.c:40:
/opt/bw/include/http_log.h:337:27: note: instantiated from:
#define ap_log_error(...) ap_log_error__(__VA_ARGS__)
                           ^
/opt/bw/include/http_log.h:340:22: note: instantiated from:
     do { server_rec *sr = s; if (APLOG_MODULE_IS_LEVEL(sr, mi, level))      \
                      ^
mod_jk.c:639:5: error: expected expression
     ap_log_error(file, line, level, 0, s, res);
     ^
In file included from mod_jk.c:40:
/opt/bw/include/http_log.h:337:27: note: instantiated from:
#define ap_log_error(...) ap_log_error__(__VA_ARGS__)
                           ^
/opt/bw/include/http_log.h:341:74: note: instantiated from:
              ap_log_error_(file, line, mi, level, status, sr, __VA_ARGS__); \
                                                                          ^
mod_jk.c:641:9: warning: incompatible pointer types initializing 'server_rec *' 
(aka 'struct server_rec *') with an expression of type 'char *'
         ap_log_error(file, line, level, 0, NULL, res);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from mod_jk.c:40:
/opt/bw/include/http_log.h:337:27: note: instantiated from:
#define ap_log_error(...) ap_log_error__(__VA_ARGS__)
                           ^
/opt/bw/include/http_log.h:340:22: note: instantiated from:
     do { server_rec *sr = s; if (APLOG_MODULE_IS_LEVEL(sr, mi, level))      \
                      ^
mod_jk.c:641:9: error: expected expression
         ap_log_error(file, line, level, 0, NULL, res);
         ^
In file included from mod_jk.c:40:
/opt/bw/include/http_log.h:337:27: note: instantiated from:
#define ap_log_error(...) ap_log_error__(__VA_ARGS__)
                           ^
/opt/bw/include/http_log.h:341:74: note: instantiated from:
              ap_log_error_(file, line, mi, level, status, sr, __VA_ARGS__); \
                                                                          ^
mod_jk.c:2829:56: warning: incompatible pointer types passing 'server_rec *' 
(aka 'struct server_rec *') to parameter of type 'apr_pool_t *' (aka 'struct 
apr_pool_t *')
                 jk_error_exit(APLOG_MARK, APLOG_EMERG, overrides->s, p, "Memory 
error");
                                                        ^~~~~~~~~~~~
mod_jk.c:620:40: note: passing argument to parameter 'p' here
                           apr_pool_t * p, const char *fmt, ...)
                                        ^
mod_jk.c:2829:70: warning: incompatible pointer types passing 'apr_pool_t *' 
(aka 'struct apr_pool_t *') to parameter of type 'const char *'
                 jk_error_exit(APLOG_MARK, APLOG_EMERG, overrides->s, p, "Memory 
error");
                                                                      ^
mod_jk.c:620:55: note: passing argument to parameter 'fmt' here
                           apr_pool_t * p, const char *fmt, ...)
                                                       ^
mod_jk.c:3272:68: warning: incompatible pointer types passing 'server_rec *' 
(aka 'struct server_rec *') to parameter of type 'apr_pool_t *' (aka 'struct 
apr_pool_t *')
                             jk_error_exit(APLOG_MARK, APLOG_EMERG, srv,
                                                                    ^~~
mod_jk.c:620:40: note: passing argument to parameter 'p' here
                           apr_pool_t * p, const char *fmt, ...)
                                        ^
mod_jk.c:3273:43: warning: incompatible pointer types passing 'apr_pool_t *' 
(aka 'struct apr_pool_t *') to parameter of type 'const char *'
                                           srv->process->pool, "Memory error");
                                           ^~~~~~~~~~~~~~~~~~
mod_jk.c:620:55: note: passing argument to parameter 'fmt' here
                           apr_pool_t * p, const char *fmt, ...)
                                                       ^
6 warnings and 2 errors generated.
make[1]: *** [mod_jk.lo] Error 1
make[1]: Leaving directory `/home/i.galic/Projects/asf/mod_jk/native/apache-2.0'
make: *** [all-recursive] Error 1


I managed to get it to compile... But I won't share the diff here,
so as not to cause sudden shortage of breath, severe head-aches
and other kinds of unforeseen accidents.

i

Reply via email to