libzmq
libzmq copied to clipboard
Build issue on macOS 14.0
Issue description
I can't build libzmq on macOS 14.0
Environment
- libzmq version (commit hash if unreleased): Ver.4.3.5
- OS: macOS 14.0
Minimal test code / Steps to reproduce the issue
-
I configure the latest stable release (Ver.4.3.5) of libzmq as follows: $ ./configure --prefix=${TARGET} --enable-static --disable-shared --without-documentation
-
Then type make
What's the actual result? (include assertion message & call stack if applicable)
I get the following error: src/proxy.cpp:502:26: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] stats_proxy stats = {0}; ^ {} src/proxy.cpp:502:26: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] stats_proxy stats = {0}; ^ {} 2 errors generated. make[1]: *** [src/libzmq_la-proxy.lo] Error 1 make: *** [all-recursive] Error 1
What's the expected result?
Build correctly.
I thought that the compiler claims to add braces. Which means:
stats_proxy stats = {0}; to stats_proxy stats = {{0}};
But failed with same error. Then I tried to add one more braces. ( Yes, I don't understand C++ at all):
stats_proxy stats = {{0}}; to stats_proxy stats = {{{0}}};
Then compiled zeromq successfully.
Is it OK to add two braces into stats_proxy stats?
Same issue here building 4.3.5 on Ubuntu 22.04LTS.
CXX src/libzmq_la-poller_base.lo CXX src/libzmq_la-polling_util.lo CXX src/libzmq_la-pollset.lo CXX src/libzmq_la-precompiled.lo CXX src/libzmq_la-proxy.lo src/proxy.cpp:502:26: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] stats_proxy stats = {0}; ^ {} src/proxy.cpp:502:26: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] stats_proxy stats = {0}; ^ {} 2 errors generated. make[1]: *** [Makefile:5869: src/libzmq_la-proxy.lo] Error 1
Tried 4.3.4 on Ubuntu 22.04 LTS and it builds fine. Seems like an issue with 4.3.5