< 返回版块

featherfly 发表于 2021-06-29 16:53

cargo build编译时依赖项(wepoll-sys)报错,能够添加gcc参数吗

running: "gcc.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build" "-Wall" "-Wextra" "-o" "D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.o" "-c" "D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c" cargo:warning=In file included from /usr/include/w32api/winsock2.h:55, cargo:warning= from D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:131: cargo:warning=/usr/include/w32api/psdk_inc/_socket_types.h:11:18: error: conflicting types for ‘SOCKET’ cargo:warning= 11 | typedef UINT_PTR SOCKET; cargo:warning= | ^~~~~~ cargo:warning=D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:71:19: note: previous declaration of ‘SOCKET’ was h ere cargo:warning= 71 | typedef uintptr_t SOCKET; cargo:warning= | ^~~~~~ cargo:warning=D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:616:5: error: conflicting types for ‘epoll_ctl’ cargo:warning= 616 | int epoll_ctl(HANDLE ephnd, int op, SOCKET sock, struct epoll_event* ev) { cargo:warning= | ^~~~~~~~~ cargo:warning=D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:96:19: note: previous declaration of ‘epoll_ctl’ wa s here cargo:warning= 96 | WEPOLL_EXPORT int epoll_ctl(HANDLE ephnd, cargo:warning= | ^~~~~~~~~ cargo:warning=D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c: In function ‘reflock_ref’: cargo:warning=D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:1569:31: warning: passing argument 1 of ‘_Interlocke dAdd’ from incompatible pointer type [-Wincompatible-pointer-types] cargo:warning= 1569 | long state = InterlockedAdd(&reflock->state, REFLOCK__REF); cargo:warning= | ^~~~~~~~~~~~~~~ cargo:warning= | | cargo:warning= | volatile long int * cargo:warning=In file included from /usr/include/w32api/winnt.h:27, cargo:warning= from /usr/include/w32api/minwindef.h:163, cargo:warning= from /usr/include/w32api/windef.h:8, cargo:warning= from /usr/include/w32api/windows.h:69, cargo:warning= from /usr/include/w32api/winsock2.h:23, cargo:warning= from D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:131: cargo:warning=/usr/include/w32api/psdk_inc/intrin-impl.h:1527:45: note: expected ‘volatile int *’ but argument is of type ‘volatile long int *’ cargo:warning= 1527 | __LONG32 _InterlockedAdd(__LONG32 volatile *Addend, __LONG32 Value) { cargo:warning= | ^ cargo:warning=D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c: In function ‘reflock_unref’: cargo:warning=D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:1577:31: warning: passing argument 1 of ‘_Interlocke dAdd’ from incompatible pointer type [-Wincompatible-pointer-types] cargo:warning= 1577 | long state = InterlockedAdd(&reflock->state, -REFLOCK__REF); cargo:warning= | ^~~~~~~~~~~~~~~ cargo:warning= | | cargo:warning= | volatile long int * cargo:warning=In file included from /usr/include/w32api/winnt.h:27, cargo:warning= from /usr/include/w32api/minwindef.h:163, cargo:warning= from /usr/include/w32api/windef.h:8, cargo:warning= from /usr/include/w32api/windows.h:69, cargo:warning= from /usr/include/w32api/winsock2.h:23, cargo:warning= from D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:131: cargo:warning=/usr/include/w32api/psdk_inc/intrin-impl.h:1527:45: note: expected ‘volatile int *’ but argument is of type ‘volatile long int *’ cargo:warning= 1527 | __LONG32 _InterlockedAdd(__LONG32 volatile *Addend, __LONG32 Value) { cargo:warning= | ^ cargo:warning=D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c: In function ‘reflock_unref_and_destroy’: cargo:warning=D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:1588:22: warning: passing argument 1 of ‘_Interlocke dAdd’ from incompatible pointer type [-Wincompatible-pointer-types] cargo:warning= 1588 | InterlockedAdd(&reflock->state, REFLOCK__DESTROY - REFLOCK__REF); cargo:warning= | ^~~~~~~~~~~~~~~ cargo:warning= | | cargo:warning= | volatile long int * cargo:warning=In file included from /usr/include/w32api/winnt.h:27, cargo:warning= from /usr/include/w32api/minwindef.h:163, cargo:warning= from /usr/include/w32api/windef.h:8, cargo:warning= from /usr/include/w32api/windows.h:69, cargo:warning= from /usr/include/w32api/winsock2.h:23, cargo:warning= from D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:131: cargo:warning=/usr/include/w32api/psdk_inc/intrin-impl.h:1527:45: note: expected ‘volatile int *’ but argument is of type ‘volatile long int *’ cargo:warning= 1527 | __LONG32 _InterlockedAdd(__LONG32 volatile *Addend, __LONG32 Value) { cargo:warning= | ^ cargo:warning=D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:1597:31: warning: passing argument 1 of ‘_Interlocke dExchange’ from incompatible pointer type [-Wincompatible-pointer-types] cargo:warning= 1597 | state = InterlockedExchange(&reflock->state, REFLOCK__POISON); cargo:warning= | ^~~~~~~~~~~~~~~ cargo:warning= | | cargo:warning= | volatile long int * cargo:warning=In file included from /usr/include/w32api/winnt.h:27, cargo:warning= from /usr/include/w32api/minwindef.h:163, cargo:warning= from /usr/include/w32api/windef.h:8, cargo:warning= from /usr/include/w32api/windows.h:69, cargo:warning= from /usr/include/w32api/winsock2.h:23, cargo:warning= from D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c:131: cargo:warning=/usr/include/w32api/psdk_inc/intrin-impl.h:1549:50: note: expected ‘volatile int *’ but argument is of type ‘volatile long int *’ cargo:warning= 1549 | __LONG32 _InterlockedExchange(__LONG32 volatile *Target, __LONG32 Value) { cargo:warning= | ^ exit code: 1

--- stderr

error occurred: Command "gcc.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build" "-Wall" "-Wextra" "-o" "D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.o" "-c" "D:\workspace\vscode_workspace\rust_projects\rust-study\rust-practice\25.sync-std\target\debug\build\wepoll-sys-fd88110eb4960f7e\out\wepoll-build\wepoll.c" with args "gcc.exe" did not execute successfully (status code exit code: 1).

评论区

写评论

还没有评论

1 共 0 条评论, 1 页