Skip to content

libwebsockets fails to build with libuv + LLL_INFO + release optimizations #3568

@hbock

Description

@hbock

Example build:

cmake ../libwebsockets/ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLWS_LOGGING_BITFIELD_SET=LLL_INFO -DLWS_WITH_LIBUV=ON
make -j10

Build fails:

In file included from /home/swgroup/ES1/third-party/libwebsockets/include/libwebsockets.h:500,
                 from /home/swgroup/ES1/third-party/libwebsockets/lib/event-libs/libuv/../../core/private-lib-core.h:154,
                 from /home/swgroup/ES1/third-party/libwebsockets/lib/event-libs/libuv/libuv.c:25:
/home/swgroup/ES1/third-party/libwebsockets/lib/event-libs/libuv/libuv.c: In function ‘lws_uv_close_cb_sa’:
/home/swgroup/ES1/third-party/libwebsockets/lib/event-libs/libuv/libuv.c:269:31: error: ‘tsi’ undeclared (first use in this function)
  269 |                               tsi,
      |                               ^~~
/home/swgroup/ES1/third-party/libwebsockets/include/libwebsockets/lws-logs.h:186:61: note: in definition of macro ‘lwsl_cx’
  186 |                                         _c, _fil, __func__, __VA_ARGS__)
      |                                                             ^~~~~~~~~~~
/home/swgroup/ES1/third-party/libwebsockets/lib/event-libs/libuv/libuv.c:268:9: note: in expansion of macro ‘lwsl_cx_info’
  268 |         lwsl_cx_info(context, "thr %d: sa left %d: dyn left: %d (rk %d)",
      |         ^~~~~~~~~~~~
/home/swgroup/ES1/third-party/libwebsockets/lib/event-libs/libuv/libuv.c:269:31: note: each undeclared identifier is reported only once for each function it appears in
  269 |                               tsi,
      |                               ^~~
/home/swgroup/ES1/third-party/libwebsockets/include/libwebsockets/lws-logs.h:186:61: note: in definition of macro ‘lwsl_cx’
  186 |                                         _c, _fil, __func__, __VA_ARGS__)
      |                                                             ^~~~~~~~~~~
/home/swgroup/ES1/third-party/libwebsockets/lib/event-libs/libuv/libuv.c:268:9: note: in expansion of macro ‘lwsl_cx_info’
  268 |         lwsl_cx_info(context, "thr %d: sa left %d: dyn left: %d (rk %d)",
      |         ^~~~~~~~~~~~
lib/event-libs/libuv/CMakeFiles/websockets-evlib_uv.dir/build.make:75: recipe for target 'lib/event-libs/libuv/CMakeFiles/websockets-evlib_uv.dir/libuv.c.o' failed

Patch incoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions