]
Michal Babacek edited comment on MODCLUSTER-428 at 9/12/14 7:46 AM:
--------------------------------------------------------------------
Relevant commit:
[
]
(that's perhaps breaking the C89 nmakeish style?)
was (Author: mbabacek):
Relevant commit:
[
proxy_cluster_child_init in mod_proxy_cluster.c after commit 603d2dac
is broken on Windows
------------------------------------------------------------------------------------------
Key: MODCLUSTER-428
URL:
https://issues.jboss.org/browse/MODCLUSTER-428
Project: mod_cluster
Issue Type: Bug
Environment: Windows,
httpd:2.4.7|apr:v:1.5.0|apu:v:1.5.3|api:v:1.2.1|ssl:v:0.9.8r|zlib:v:1.2.3|iconv:v:1.14|expat:v:1.95.8|pcre:v:8.34
Reporter: Michal Babacek
Assignee: Michal Babacek
Priority: Blocker
It seems that 603d2dac version of mod_proxy_cluster.c is the last one that operates on
Windows. More recent versions of the module fail on compilation:
{code}
Building slotmem module ...
2 File(s) copied
cl -c -nologo -DWIN32 -D_WIN32 -D_WINDOWS -D_WINNT -D_WIN32_WINNT=0x0501
-DWINVER=0x0501 -D_WIN32_IE=0x0600 -W3 -D_X86_=1 -O2 -Ob2 -Oy- -Zi -DNDEBUG -D_MT -MD -c
-nologo -DWIN32 -D_WIN32 -D_WINDOWS -D_WINNT -D_WIN32_WINNT=0x0501 -DWINVER=0x0501
-D_WIN32_IE=0x0600 -W3 -D_X86_=1 -O2 -Ob2 -Oy- -Zi -DNDEBUG -D_MT -MD -c -nologo -DWIN32
-D_WIN32 -D_WINDOWS -D_WINNT -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -D_WIN32_IE=0x0600 -W3
-D_CONSOLE -D_X86_=1 -O2 -Ob2 -Oy- -Zi -DNDEBUG -D_MT -MD -c -nologo -DWIN32 -D_WIN32
-D_WINDOWS -D_WINNT -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -D_WIN32_IE=0x0600 -W3
-D_CONSOLE -D_X86_=1 -O2 -Ob2 -Oy- -Zi -DNDEBUG -D_MT -MD -O2 -DPROXY_DECLARE_IMPORT -I.
-IC:\tmp\jbossnative\build\unix\work\mod_cluster-1.3.1.Alpha2-SNAPSHOT-src-ssl\output\windows-x86\httpd-2.4\include
-I../generators -I../ssl -FoWINXP_X86_DLL_RELEASE\
-FdWINXP_X86_DLL_RELEASE\mod_proxy_cluster-src .\mod_proxy_cluster.c
mod_proxy_cluster.c
.\mod_proxy_cluster.c(2679) : error C2275: 'server_rec' : illegal use of this
type as an expression
c:\tmp\jbossnative\build\unix\work\mod_cluster-1.3.1.alpha2-snapshot-src-ssl\output\windows-x86\httpd-2.4\include\httpd.h(750)
: see declaration of 'server_rec'
.\mod_proxy_cluster.c(2679) : error C2065: 's2' : undeclared identifier
.\mod_proxy_cluster.c(2680) : error C2143: syntax error : missing ';' before
'type'
.\mod_proxy_cluster.c(2681) : error C2275: 'proxy_server_conf' : illegal use of
this type as an expression
c:\tmp\jbossnative\build\unix\work\mod_cluster-1.3.1.alpha2-snapshot-src-ssl\srclib\httpd-2.4.7\modules\proxy\mod_proxy.h(186)
: see declaration of 'proxy_server_conf'
.\mod_proxy_cluster.c(2681) : error C2065: 'conf' : undeclared identifier
.\mod_proxy_cluster.c(2682) : error C2065: 'sconf' : undeclared identifier
.\mod_proxy_cluster.c(2683) : error C2065: 'conf' : undeclared identifier
.\mod_proxy_cluster.c(2685) : error C2065: 'conf' : undeclared identifier
.\mod_proxy_cluster.c(2685) : error C2223: left of '->pool' must point to
struct/union
.\mod_proxy_cluster.c(2685) : error C2198: 'apr_pool_create_ex' : too few
arguments for call
.\mod_proxy_cluster.c(2686) : error C2065: 's2' : undeclared identifier
.\mod_proxy_cluster.c(2687) : error C2065: 'sconf' : undeclared identifier
.\mod_proxy_cluster.c(2687) : error C2065: 's2' : undeclared identifier
.\mod_proxy_cluster.c(2687) : error C2223: left of '->module_config' must
point to struct/union
.\mod_proxy_cluster.c(2688) : error C2065: 'conf' : undeclared identifier
.\mod_proxy_cluster.c(2689) : error C2065: 'sconf' : undeclared identifier
.\mod_proxy_cluster.c(2689) : warning C4047: '=' : 'int' differs in
levels of indirection from 'proxy_server_conf *'
.\mod_proxy_cluster.c(2691) : error C2065: 'conf' : undeclared identifier
.\mod_proxy_cluster.c(2691) : warning C4047: 'function' : 'proxy_server_conf
*' differs in levels of indirection from 'int'
.\mod_proxy_cluster.c(2691) : warning C4024: 'update_workers_node' : different
types for formal and actual parameter 1
.\mod_proxy_cluster.c(2691) : error C2065: 's2' : undeclared identifier
.\mod_proxy_cluster.c(2691) : warning C4047: 'function' : 'server_rec *'
differs in levels of indirection from 'int'
.\mod_proxy_cluster.c(2691) : warning C4024: 'update_workers_node' : different
types for formal and actual parameter 3
.\mod_proxy_cluster.c(2693) : error C2065: 's2' : undeclared identifier
.\mod_proxy_cluster.c(2693) : error C2065: 's2' : undeclared identifier
.\mod_proxy_cluster.c(2693) : error C2223: left of '->next' must point to
struct/union
NMAKE : fatal error U1077: 'C:\cmsc\msvc\bin\i386\cl.EXE' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: 'C:\cmsc\msvc\bin\nmake.exe' : return code
'0x2'
Stop.
Building aaa modules ...
{code}
One may safely guess that the error lies along these lines:
{code}
/native/mod_proxy_cluster/mod_proxy_cluster.c
server_rec *s2 = main_server;
void *sconf = s2->module_config;
proxy_server_conf *conf = (proxy_server_conf *)
ap_get_module_config(sconf, &proxy_module);
if (conf) {
apr_pool_t *pool;
apr_pool_create(&pool, conf->pool);
while (s2) {
sconf = s2->module_config;
conf = (proxy_server_conf *)
ap_get_module_config(sconf, &proxy_module);
update_workers_node(conf, pool, s2, 0);
s2 = s2->next;
}
apr_pool_destroy(pool);
}
{code}