jean-airoldie / zeromq-src-rs

Source code and logic to build ZeroMQ from source
MIT License
11 stars 15 forks source link

Bump to libzmq v4.3.5 #34

Closed jean-airoldie closed 1 year ago

jean-airoldie commented 1 year ago

Windows build now failing with Visual Studio 2022

error occurred: Command "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "D:\\a\\zeromq-src-rs\\zeromq-src-rs\\vendor\\include" "-I" "D:\\a\\zeromq-src-rs\\zeromq-src-rs\\vendor\\src" "-I" "D:\\a\\zeromq-src-rs\\zeromq-src-rs\\vendor\\src" "-I" "D:\\a\\zeromq-src-rs\\zeromq-src-rs\\vendor\\external/sha1" "-I" "D:\\a\\zeromq-src-rs\\zeromq-src-rs\\vendor\\external/wepoll" "-I" "D:\\a\\zeromq-src-rs\\zeromq-src-rs\\vendor\\builds/deprecated-msvc" "-W4" "/GL-" "/EHsc" "-DZMQ_BUILD_TESTS=OFF" "-DZMQ_USE_CV_IMPL_STL11=1" "-DZMQ_STATIC=1" "-DZMQ_USE_BUILTIN_SHA1=1" "-DZMQ_HAVE_WS=1" "-DZMQ_IOTHREAD_POLLER_USE_EPOLL=1" "-DZMQ_POLL_BASED_ON_POLL=1" "-D_WIN32_WINNT=0x0600" "-DZMQ_HAVE_IPC=1" "-FoD:\\a\\zeromq-src-rs\\zeromq-src-rs\\target\\debug\\build\\testcrate-79b0710a1b57a4a4\\out\\lib\\83aaef0c28505701-socket_base.o" "-c" "D:\\a\\zeromq-src-rs\\zeromq-src-rs\\vendor\\src\\socket_base.cpp" with args "cl.exe" did not execute successfully (status code exit code: 2).
jean-airoldie commented 1 year ago

I've updated the CI, in case this was the cause of error, but alas.

jean-airoldie commented 1 year ago

For some reason the CI does not show the cause of the error on windows. I tried setting VSLANG=1033, since cc is known to drop errors silently if there is a language conflict, but to no avail.

jean-airoldie commented 1 year ago

Nevermind, you just have to look at the raw logs. So here are the errors on windows, extracted from the raw logs.

C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared\afunix.h(23): error C2011: 'sockaddr_un': 'struct' type redefinition
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.hpp(38): error C2079: 'zmq::ipc_address_t::_address' uses undefined struct 'sockaddr_un'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared\afunix.h(23): error C2011: 'sockaddr_un': 'struct' type redefinition
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.hpp(38): error C2079: 'zmq::ipc_address_t::_address' uses undefined struct 'sockaddr_un'
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ip.cpp(551): error C2079: 'lcladdr' uses undefined struct 'sockaddr_un'
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.hpp(38): error C2079: 'zmq::ipc_address_t::_address' uses undefined struct 'sockaddr_un'
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.cpp(51): error C2079: '$S1' uses undefined struct 'sockaddr_un'
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.cpp(51): error C2618: illegal member designator in offsetof
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.cpp(76): error C2079: '$S2' uses undefined struct 'sockaddr_un'
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.cpp(76): error C2618: illegal member designator in offsetof
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.cpp(76): error C2660: 'strnlen': function does not take 1 arguments
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.cpp(79): error C2668: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::assign': ambiguous call to overloaded function
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared\afunix.h(23): error C2011: 'sockaddr_un': 'struct' type redefinition
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.hpp(38): error C2079: 'zmq::ipc_address_t::_address' uses undefined struct 'sockaddr_un'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared\afunix.h(23): error C2011: 'sockaddr_un': 'struct' type redefinition
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.hpp(38): error C2079: 'zmq::ipc_address_t::_address' uses undefined struct 'sockaddr_un'
 C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared\afunix.h(23): error C2011: 'sockaddr_un': 'struct' type redefinition
D:\a\zeromq-src-rs\zeromq-src-rs\vendor\src\ipc_address.hpp(38): error C2079: 'zmq::ipc_address_t::_address' uses undefined struct 'sockaddr_un'
jean-airoldie commented 1 year ago

A new compile time variable ZMQ_HAVE_STRUCT_SOCKADDR_UN was added for windows, which was causing the issue. For now it is always set to 1. It seems that this variable is designed for window 32bit cases, that I'm not sure we support in the first place.

jean-airoldie commented 1 year ago

Alright, all the tests are passing. However since the libzmq CMakeList was changed to much, its hard to know whether this will cause breakage or not in untested systems.

jean-airoldie commented 1 year ago

After some thoughts, I've decided to make this PR a breaking change, in case this breaks people's builds.