Discussion:
[ofw] librdmacm/rsocket compile failure for x86
Smith, Stan
2013-02-05 22:09:05 UTC
Permalink
x86 compile (free or checked) for librdmacm\ fails:



Compiling - src\cma_main.cpp

1>errors in directory f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src

1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src\cma_main.cpp(602) :

error C2664: 'int (SOCKET,PDWORD_PTR,LPINT)' : cannot convert parameter 2 from 'SOCKET *' to 'PDWORD_PTR'



1>warnings in directory f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src

1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src\cma_main.cpp(606) : warning C4018: '>' : signed/unsigned mismatch



1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src\cma_main.cpp(618) :

error C2664: 'int (SOCKET,PDWORD_PTR,LPINT)' : cannot convert parameter 2 from 'SOCKET *' to 'PDWORD_PTR'



1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src\cma_main.cpp(622) :warning C4018: '>' : signed/unsigned mismatch



1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src\cma_main.cpp(634) :

error C2664: 'int (SOCKET,PDWORD_PTR,LPINT)' : cannot convert parameter 2 from 'SOCKET *' to 'PDWORD_PTR'



1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src\cma_main.cpp(638) :warning C4018: '>' : signed/unsigned mismatch

Fixed by
casting to PDWORD_PTR
casting to (unsigned)

signed-off by stan smith (***@intel.com<mailto:***@intel.com>)


--- C:/Users/scsmith/AppData/Local/Temp/cma_main.cpp-revBASE.svn000.tmp.cpp Thu Jan 24 15:02:56 2013

+++ C:/Users/scsmith/Documents/openIB-windows/ofw/gen1/trunk/ulp/librdmacm/src/cma_main.cpp Tue Feb 05 13:56:08 2013

@@ -597,13 +597,13 @@

if (readfds->fd_array[i]) {

ret = gMainUpCallTable.lpWPUQuerySocketHandleContext(

readfds->fd_array[i],

- &rreadfds.fd_array[i],

+ (PDWORD_PTR)&rreadfds.fd_array[i],

lpErrno

);

if (SOCKET_ERROR == ret)

return ret;



- if (rreadfds.fd_array[i] > nfds)

+ if (rreadfds.fd_array[i] > (unsigned) nfds)

nfds = (int)rreadfds.fd_array[i];

rreadfds.fd_count++;

@@ -613,13 +613,13 @@

if (writefds->fd_array[i]) {

ret = gMainUpCallTable.lpWPUQuerySocketHandleContext(

writefds->fd_array[i],

- &rwritefds.fd_array[i],

+ (PDWORD_PTR)&rwritefds.fd_array[i],

lpErrno

);

if (SOCKET_ERROR == ret)

return ret;

- if (rwritefds.fd_array[i] > nfds)

+ if (rwritefds.fd_array[i] > (unsigned) nfds)

nfds = (int)rwritefds.fd_array[i];

rwritefds.fd_count++;

@@ -629,13 +629,13 @@

if (exceptfds->fd_array[i]) {

ret = gMainUpCallTable.lpWPUQuerySocketHandleContext(

exceptfds->fd_array[i],

- &rexceptfds.fd_array[i],

+ (PDWORD_PTR) &rexceptfds.fd_array[i],

lpErrno

);

if (SOCKET_ERROR == ret)

return ret;

- if (rexceptfds.fd_array[i] > nfds)

+ if (rexceptfds.fd_array[i] > (unsigned) nfds)

nfds = (int)rexceptfds.fd_array[i];

rexceptfds.fd_count++;
Hefty, Sean
2013-02-05 22:51:17 UTC
Permalink
Hmmm -- I don't recall seeing any compile errors. There must be some difference in our build environment.

I think I build win7 x86/x64 chk/fre and 2008.

changes look fine though
-----Original Message-----
Sent: Tuesday, February 05, 2013 2:09 PM
Subject: [ofw] librdmacm/rsocket compile failure for x86
Compiling - src\cma_main.cpp
1>errors in directory f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src
error C2664: 'int (SOCKET,PDWORD_PTR,LPINT)' : cannot convert parameter 2 from
'SOCKET *' to 'PDWORD_PTR'
1>warnings in directory f:\openib-windows-
svn\latest\gen1\trunk\ulp\librdmacm\src
warning C4018: '>' : signed/unsigned mismatch
error C2664: 'int (SOCKET,PDWORD_PTR,LPINT)' : cannot convert parameter 2 from
'SOCKET *' to 'PDWORD_PTR'
1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src\cma_main.cpp(622)
:warning C4018: '>' : signed/unsigned mismatch
error C2664: 'int (SOCKET,PDWORD_PTR,LPINT)' : cannot convert parameter 2 from
'SOCKET *' to 'PDWORD_PTR'
1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src\cma_main.cpp(638)
:warning C4018: '>' : signed/unsigned mismatch
Fixed by
casting to PDWORD_PTR
casting to (unsigned)
--- C:/Users/scsmith/AppData/Local/Temp/cma_main.cpp-revBASE.svn000.tmp.cpp
Thu Jan 24 15:02:56 2013
+++ C:/Users/scsmith/Documents/openIB-
windows/ofw/gen1/trunk/ulp/librdmacm/src/cma_main.cpp Tue Feb 05 13:56:08
2013
@@ -597,13 +597,13 @@
if (readfds->fd_array[i]) {
ret = gMainUpCallTable.lpWPUQuerySocketHandleContext(
readfds->fd_array[i],
- &rreadfds.fd_array[i],
+ (PDWORD_PTR)&rreadfds.fd_array[i],
lpErrno
);
if (SOCKET_ERROR == ret)
return ret;
- if (rreadfds.fd_array[i] > nfds)
+ if (rreadfds.fd_array[i] > (unsigned) nfds)
nfds = (int)rreadfds.fd_array[i];
rreadfds.fd_count++;
@@ -613,13 +613,13 @@
if (writefds->fd_array[i]) {
ret = gMainUpCallTable.lpWPUQuerySocketHandleContext(
writefds->fd_array[i],
- &rwritefds.fd_array[i],
+ (PDWORD_PTR)&rwritefds.fd_array[i],
lpErrno
);
if (SOCKET_ERROR == ret)
return ret;
- if (rwritefds.fd_array[i] > nfds)
+ if (rwritefds.fd_array[i] > (unsigned) nfds)
nfds = (int)rwritefds.fd_array[i];
rwritefds.fd_count++;
@@ -629,13 +629,13 @@
if (exceptfds->fd_array[i]) {
ret = gMainUpCallTable.lpWPUQuerySocketHandleContext(
exceptfds->fd_array[i],
- &rexceptfds.fd_array[i],
+ (PDWORD_PTR) &rexceptfds.fd_array[i],
lpErrno
);
if (SOCKET_ERROR == ret)
return ret;
- if (rexceptfds.fd_array[i] > nfds)
+ if (rexceptfds.fd_array[i] > (unsigned) nfds)
nfds = (int)rexceptfds.fd_array[i];
rexceptfds.fd_count++;
Smith, Stan
2013-02-05 23:12:57 UTC
Permalink
-----Original Message-----
From: Hefty, Sean
Sent: Tuesday, February 05, 2013 2:51 PM
Subject: RE: librdmacm/rsocket compile failure for x86
Hmmm -- I don't recall seeing any compile errors. There must be some difference in our build environment.
I think I build win7 x86/x64 chk/fre and 2008.
changes look fine though
Yes - I was surprised at the build errors also?
I use WinDDK\7600.16386.1\; what are you using?
-----Original Message-----
Sent: Tuesday, February 05, 2013 2:09 PM
Subject: [ofw] librdmacm/rsocket compile failure for x86
Compiling - src\cma_main.cpp
1>errors in directory
1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src
error C2664: 'int (SOCKET,PDWORD_PTR,LPINT)' : cannot convert
parameter 2 from 'SOCKET *' to 'PDWORD_PTR'
1>warnings in directory f:\openib-windows-
svn\latest\gen1\trunk\ulp\librdmacm\src
warning C4018: '>' : signed/unsigned mismatch
error C2664: 'int (SOCKET,PDWORD_PTR,LPINT)' : cannot convert
parameter 2 from 'SOCKET *' to 'PDWORD_PTR'
1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src\cma_main.c
1>pp(622)
:warning C4018: '>' : signed/unsigned mismatch
error C2664: 'int (SOCKET,PDWORD_PTR,LPINT)' : cannot convert
parameter 2 from 'SOCKET *' to 'PDWORD_PTR'
1>f:\openib-windows-svn\latest\gen1\trunk\ulp\librdmacm\src\cma_main.c
1>pp(638)
:warning C4018: '>' : signed/unsigned mismatch
Fixed by
casting to PDWORD_PTR
casting to (unsigned)
---
C:/Users/scsmith/AppData/Local/Temp/cma_main.cpp-revBASE.svn000.tmp.cp
p
Thu Jan 24 15:02:56 2013
+++ C:/Users/scsmith/Documents/openIB-
windows/ofw/gen1/trunk/ulp/librdmacm/src/cma_main.cpp Tue Feb 05 13:56:08
2013
@@ -597,13 +597,13 @@
if (readfds->fd_array[i]) {
ret = gMainUpCallTable.lpWPUQuerySocketHandleContext(
readfds->fd_array[i],
- &rreadfds.fd_array[i],
+ (PDWORD_PTR)&rreadfds.fd_array[i],
lpErrno
);
if (SOCKET_ERROR == ret)
return ret;
- if (rreadfds.fd_array[i] > nfds)
+ if (rreadfds.fd_array[i] > (unsigned) nfds)
nfds = (int)rreadfds.fd_array[i];
rreadfds.fd_count++;
@@ -613,13 +613,13 @@
if (writefds->fd_array[i]) {
ret = gMainUpCallTable.lpWPUQuerySocketHandleContext(
writefds->fd_array[i],
- &rwritefds.fd_array[i],
+
+ (PDWORD_PTR)&rwritefds.fd_array[i],
lpErrno
);
if (SOCKET_ERROR == ret)
return ret;
- if (rwritefds.fd_array[i] > nfds)
+ if (rwritefds.fd_array[i] > (unsigned) nfds)
nfds = (int)rwritefds.fd_array[i];
rwritefds.fd_count++;
@@ -629,13 +629,13 @@
if (exceptfds->fd_array[i]) {
ret = gMainUpCallTable.lpWPUQuerySocketHandleContext(
exceptfds->fd_array[i],
- &rexceptfds.fd_array[i],
+ (PDWORD_PTR)
+ &rexceptfds.fd_array[i],
lpErrno
);
if (SOCKET_ERROR == ret)
return ret;
- if (rexceptfds.fd_array[i] > nfds)
+ if (rexceptfds.fd_array[i] > (unsigned) nfds)
nfds = (int)rexceptfds.fd_array[i];
rexceptfds.fd_count++;
Hefty, Sean
2013-02-05 23:20:55 UTC
Permalink
Post by Smith, Stan
Yes - I was surprised at the build errors also?
I use WinDDK\7600.16386.1\; what are you using?
The win7 x86 log file from my build reports 7600.16385.1. Guess that 0000.00001 is enough to make a difference... *shrug*
Schmitt, Hubert
2013-02-06 09:33:17 UTC
Permalink
Hello,

I'd like to provide another patch for the librdmacm/rsocket component.
Because with current cma_exports.src the WSPStartup function is not
exported correctly,
causing installation of the socket provider (via rsinstall.exe) not
working properly.

Index: cma_exports.src
===================================================================
--- cma_exports.src (revision 3426)
+++ cma_exports.src (working copy)
@@ -1,7 +1,10 @@
LIBRARY librdmacm.dll

+EXPORTS
+
+WSPStartup
+
#ifndef _WIN64
-EXPORTS
rdma_create_event_channel
rdma_destroy_event_channel
rdma_create_id
@@ -29,6 +32,8 @@
rdma_getaddrinfo
rdma_freeaddrinfo
rdma_get_request
+rdma_create_ep
+rdma_destroy_ep
rdmaw_wsa_errno
rsocket
rbind
@@ -55,5 +60,4 @@
rioctlsocket
rselect
rpoll
-WSPStartup
#endif

This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law.

If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.

If you have received this communication in error, please notify the sender immediately by telephone and with a 'reply' message.

Thank you for your co-operation.

Loading...