[
https://issues.jboss.org/browse/MODCLUSTER-521?page=com.atlassian.jira.pl...
]
Michal Karm Babacek commented on MODCLUSTER-521:
------------------------------------------------
[~jfclere] My shiny MSVC 19 compiles the 1.2.13.Final codebase without problems, so
that's why the code style bug got into the PR :(
{code}
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\build (1.2.x-CMAKE)
λ cmake ../ -G "NMake Makefiles"
-DAPR_LIBRARY=C:\Users\karm\WORKSPACE\MOD_CLUSTER\httpd\devel\lib64\libapr-1.lib
-DAPR_INCLUDE_DIR=C:\Users\karm\WORKSPACE\MOD_CLUSTER\httpd\devel\include\httpd\
-DAPACHE_INCLUDE_DIR=C:\Users\karm\WORKSPA
CE\MOD_CLUSTER\httpd\devel\include\httpd\
-DAPRUTIL_LIBRARY=C:\Users\karm\WORKSPACE\MOD_CLUSTER\httpd\devel\lib64\libaprutil-1.lib
-DAPRUTIL_INCLUDE_DIR=C:\Users\karm\WORKSPACE\MOD_CLUSTER\httpd\devel\include\httpd\
-DAPACHE_LIBRARY=C:\Us
ers\karm\WORKSPACE\MOD_CLUSTER\httpd\devel\lib64\libhttpd.lib
-DPROXY_LIBRARY=C:\Users\karm\WORKSPACE\MOD_CLUSTER\httpd\devel\lib64\mod_proxy.lib
-- The C compiler identification is MSVC 19.0.23918.0
-- The CXX compiler identification is MSVC 19.0.23918.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found APR: C:/Users/karm/WORKSPACE/MOD_CLUSTER/httpd/devel/lib64/libapr-1.lib
-- Found APRUTIL: C:/Users/karm/WORKSPACE/MOD_CLUSTER/httpd/devel/lib64/libaprutil-1.lib
-- Found APACHE: C:/Users/karm/WORKSPACE/MOD_CLUSTER/httpd/devel/include/httpd
-- Configuring done
-- Generating done
-- Build files have been written to:
C:/Users/karm/WORKSPACE/MOD_CLUSTER/mod_cluster/native/build
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\build (1.2.x-CMAKE)
λ nmake
Microsoft (R) Program Maintenance Utility Version 14.00.23918.0
Copyright (C) Microsoft Corporation. All rights reserved.
Scanning dependencies of target mod_proxy_cluster
[ 6%] Building C object
mod_proxy_cluster/CMakeFiles/mod_proxy_cluster.dir/mod_proxy_cluster.c.obj
mod_proxy_cluster.c
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\mod_proxy_cluster\mod_proxy_cluster.c(1515):
warning C4267: '=': conversion from 'size_t' to 'int', possible
loss of data
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\mod_proxy_cluster\mod_proxy_cluster.c(2062):
warning C4267: '=': conversion from 'size_t' to 'int', possible
loss of data
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\mod_proxy_cluster\mod_proxy_cluster.c(2336):
warning C4267: '=': conversion from 'size_t' to 'int', possible
loss of data
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\mod_proxy_cluster\mod_proxy_cluster.c(2337):
warning C4267: '=': conversion from 'size_t' to 'int', possible
loss of data
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\mod_proxy_cluster\mod_proxy_cluster.c(3035):
warning C4244: 'return': conversion from '__int64' to 'int',
possible loss of data
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\mod_proxy_cluster\mod_proxy_cluster.c(3174):
warning C4267: 'function': conversion from 'size_t' to 'int',
possible loss of data
[ 12%] Linking C shared module ..\modules\mod_proxy_cluster.so
Creating library ..\modules\mod_proxy_cluster.lib and object
..\modules\mod_proxy_cluster.exp
Creating library ..\modules\mod_proxy_cluster.lib and object
..\modules\mod_proxy_cluster.exp
[ 12%] Built target mod_proxy_cluster
Scanning dependencies of target mod_advertise
[ 18%] Building C object advertise/CMakeFiles/mod_advertise.dir/mod_advertise.c.obj
mod_advertise.c
[ 25%] Linking C shared module ..\modules\mod_advertise.so
Creating library ..\modules\mod_advertise.lib and object ..\modules\mod_advertise.exp
Creating library ..\modules\mod_advertise.lib and object ..\modules\mod_advertise.exp
[ 25%] Built target mod_advertise
Scanning dependencies of target mod_slotmem
[ 31%] Building C object mod_slotmem/CMakeFiles/mod_slotmem.dir/mod_sharedmem.c.obj
mod_sharedmem.c
[ 37%] Building C object mod_slotmem/CMakeFiles/mod_slotmem.dir/sharedmem_util.c.obj
sharedmem_util.c
[ 43%] Linking C shared module ..\modules\mod_slotmem.so
Creating library ..\modules\mod_slotmem.lib and object ..\modules\mod_slotmem.exp
Creating library ..\modules\mod_slotmem.lib and object ..\modules\mod_slotmem.exp
[ 43%] Built target mod_slotmem
Scanning dependencies of target mod_manager
[ 50%] Building C object mod_manager/CMakeFiles/mod_manager.dir/mod_manager.c.obj
mod_manager.c
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\mod_manager\mod_manager.c(1964):
warning C4267: '=': conversion from 'size_t' to 'int', possible
loss of data
[ 56%] Building C object mod_manager/CMakeFiles/mod_manager.dir/balancer.c.obj
balancer.c
[ 62%] Building C object mod_manager/CMakeFiles/mod_manager.dir/context.c.obj
context.c
[ 68%] Building C object mod_manager/CMakeFiles/mod_manager.dir/domain.c.obj
domain.c
[ 75%] Building C object mod_manager/CMakeFiles/mod_manager.dir/host.c.obj
host.c
[ 81%] Building C object mod_manager/CMakeFiles/mod_manager.dir/jgroupsid.c.obj
jgroupsid.c
[ 87%] Building C object mod_manager/CMakeFiles/mod_manager.dir/node.c.obj
node.c
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\mod_manager\node.c(109): warning
C4267: '=': conversion from 'size_t' to 'int', possible loss of
data
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\mod_manager\node.c(145): warning
C4267: '=': conversion from 'size_t' to 'int', possible loss of
data
[ 93%] Building C object mod_manager/CMakeFiles/mod_manager.dir/sessionid.c.obj
sessionid.c
[100%] Linking C shared module ..\modules\mod_manager.so
Creating library ..\modules\mod_manager.lib and object ..\modules\mod_manager.exp
Creating library ..\modules\mod_manager.lib and object ..\modules\mod_manager.exp
[100%] Built target mod_manager
C:\Users\karm\WORKSPACE\MOD_CLUSTER\mod_cluster\native\build (1.2.x-CMAKE)
λ ls modules
mod_advertise.exp mod_advertise.lib mod_advertise.so* mod_manager.ilk mod_manager.pdb
mod_proxy_cluster.exp mod_proxy_cluster.lib mod_proxy_cluster.so* mod_slotmem.ilk
mod_slotmem.pdb
mod_advertise.ilk mod_advertise.pdb mod_manager.exp mod_manager.lib mod_manager.so*
mod_proxy_cluster.ilk mod_proxy_cluster.pdb mod_slotmem.exp mod_slotmem.lib
mod_slotmem.so*
{code}
Even with {{ SET(CMAKE_CX_FLAGS "-g -O2 -Wall -std=C89 -fPIC
-Wdeclaration-after-statement")}} it passes...hmmm.
Your [1.2.x
branch|https://github.com/jfclere/mod_cluster/tree/1.2.x] with the PR also
compiles without problems, so let's merge it...but we don't know for sure it's
fixed unless we try with an ancient MSVC.
Old MSVC doesn't compile current 1.2.x codebase:
mod_proxy_cluster
------------------------------------------------------------------
Key: MODCLUSTER-521
URL:
https://issues.jboss.org/browse/MODCLUSTER-521
Project: mod_cluster
Issue Type: Bug
Components: Native (httpd modules)
Affects Versions: 1.2.13.Final
Environment: Windows
Reporter: Michal Karm Babacek
Assignee: Jean-Frederic Clere
Priority: Critical
{code}
mod_proxy_cluster.c
.\mod_proxy_cluster.c(1515) : warning C4267: '=' : conversion from
'size_t' to 'int', possible loss of data
.\mod_proxy_cluster.c(2062) : warning C4267: '=' : conversion from
'size_t' to 'int', possible loss of data
.\mod_proxy_cluster.c(2336) : warning C4267: '=' : conversion from
'size_t' to 'int', possible loss of data
.\mod_proxy_cluster.c(2337) : warning C4267: '=' : conversion from
'size_t' to 'int', possible loss of data
.\mod_proxy_cluster.c(3035) : warning C4244: 'return' : conversion from
'__int64' to 'int', possible loss of data
.\mod_proxy_cluster.c(3174) : warning C4267: 'function' : conversion from
'size_t' to 'int', possible loss of data
.\mod_proxy_cluster.c(3196) : error C2275: 'proxy_context_table' : illegal use of
this type as an expression
.\mod_proxy_cluster.c(108) : see declaration of 'proxy_context_table'
.\mod_proxy_cluster.c(3196) : error C2065: 'context_table' : undeclared
identifier
.\mod_proxy_cluster.c(3197) : error C2065: 'context_table' : undeclared
identifier
.\mod_proxy_cluster.c(3198) : error C2065: 'context_table' : undeclared
identifier
.\mod_proxy_cluster.c(3198) : warning C4047: '=' : 'int' differs in
levels of indirection from 'proxy_context_table *'
.\mod_proxy_cluster.c(3200) : error C2275: 'proxy_balancer_table' : illegal use
of this type as an expression
.\mod_proxy_cluster.c(127) : see declaration of 'proxy_balancer_table'
.\mod_proxy_cluster.c(3200) : error C2065: 'balancer_table' : undeclared
identifier
.\mod_proxy_cluster.c(3201) : error C2065: 'balancer_table' : undeclared
identifier
.\mod_proxy_cluster.c(3202) : error C2065: 'balancer_table' : undeclared
identifier
.\mod_proxy_cluster.c(3202) : warning C4047: '=' : 'int' differs in
levels of indirection from 'proxy_balancer_table *'
.\mod_proxy_cluster.c(3204) : error C2275: 'proxy_node_table' : illegal use of
this type as an expression
.\mod_proxy_cluster.c(136) : see declaration of 'proxy_node_table'
.\mod_proxy_cluster.c(3204) : error C2065: 'node_table' : undeclared identifier
.\mod_proxy_cluster.c(3205) : error C2065: 'node_table' : undeclared identifier
.\mod_proxy_cluster.c(3206) : error C2065: 'node_table' : undeclared identifier
.\mod_proxy_cluster.c(3206) : warning C4047: '=' : 'int' differs in
levels of indirection from 'proxy_node_table *'
.\mod_proxy_cluster.c(3208) : error C2065: 'context_table' : undeclared
identifier
.\mod_proxy_cluster.c(3208) : warning C4047: 'function' :
'proxy_context_table *' differs in levels of indirection from 'int'
.\mod_proxy_cluster.c(3208) : warning C4024: 'get_route_balancer' : different
types for formal and actual parameter 4
.\mod_proxy_cluster.c(3208) : error C2065: 'balancer_table' : undeclared
identifier
.\mod_proxy_cluster.c(3208) : warning C4047: 'function' :
'proxy_balancer_table *' differs in levels of indirection from 'int'
.\mod_proxy_cluster.c(3208) : warning C4024: 'get_route_balancer' : different
types for formal and actual parameter 5
.\mod_proxy_cluster.c(3208) : error C2065: 'node_table' : undeclared identifier
.\mod_proxy_cluster.c(3208) : warning C4047: 'function' : 'proxy_node_table
*' differs in levels of indirection from 'int'
.\mod_proxy_cluster.c(3208) : warning C4024: 'get_route_balancer' : different
types for formal and actual parameter 6
NMAKE : fatal error U1077: 'C:\cmsc\msvc\bin\amd64\cl.EXE' : return code
'0x2'
Stop.
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)