Hi all,

I don't think the Dispatch Router's code or documentation makes it
clear if libwebsockets optional or mandatory at the moment.  I believe
from DISPATCH-893 it is the latter.  Furthermore, Cmake is not
programmatically enforcing the libwebsockets >= 2.1.0 restriction.

Here are the details.

1) README does not mention libwebsockets as a dependency so I'd
believe it optional.
2) In CMakeLists.txt, the include(FindLibWebSockets) appears beneath a
comment "Optional dependencies"

However, it you build on a system without libwebsockets-devel
installed, cmake reports the absence as a message and then contiunues:

-- Could NOT find LIBWEBSOCKETS (missing:
LIBWEBSOCKETS_VERSION_STRING LIBWEBSOCKETS_LIBRARIES
LIBWEBSOCKETS_INCLUDE_DIRS)

only for make to fail:

[ 96%] Building C object src/CMakeFiles/qpid-dispatch.dir/http-libwebsockets.c.o
/build/qpid-dispatch-src/src/http-libwebsockets.c:27:27: fatal error:
libwebsockets.h: No such file or directory
 #include <libwebsockets.h>
                           ^
compilation terminated.

I see from DISPATCH-893 that libwebsockets 2.1.0 is required, but
cmake is not actually enforcing that restriction.  If you build on a
system with an older libwebsockets, you see a non-fatal message from
cmake:

-- Found libwebsockets version 1.7.5 but need at least 2.1.0

and then later your build fails at the make stage.

[  1%] Building C object src/CMakeFiles/qpid-dispatch.dir/http-libwebsockets.c.o
/build/qpid-dispatch-src/src/http-libwebsockets.c: In function
'unexpected_close':
/build/qpid-dispatch-src/src/http-libwebsockets.c:139:5: error:
implicit declaration of function 'lws_get_peer_simple'
[-Werror=implicit-function-declaration]
     lws_get_peer_simple(wsi, peer, sizeof(peer));
     ^
/build/qpid-dispatch-src/src/http-libwebsockets.c: At top level:
/build/qpid-dispatch-src/src/http-libwebsockets.c:232:27: error: field
'mount' has incomplete type
     struct lws_http_mount mount;

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to