[Libwebsockets] Fwd: Re: v3.1 very shortly

Andy Green andy at warmcat.com
Fri Nov 23 02:13:56 CET 2018



On 23/11/2018 02:45, Per Bothner wrote:
> I noticed a likely documentation bug:
> 
> READMEs/README.coding.md says:
> 
>     @section gzip Serving from inside a zip file
> 
>      To use this feature, ensure LWS_WITH_ZIP_FOPS is enabled at CMake 
> (it is by
>     default).

Right... I removed the (it is by default).

> I wanted to check if LWS_WITH_DISTRO_RECOMMENDED implies LWS_WITH_ZIP_FOPS,
> but ran into a problem:
> 
> cd build
> cmake -DCMAKE_INSTALL_PREFIX:PATH=/tmp/lws 
> -DLWS_WITH_DISTRO_RECOMMENDED=1 ..
> ....
> CMake Error: The following variables are used in this project, but they 
> are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the 
> CMake files:
> LIBEV_LIBRARIES
>      linked by target "cmTC_3ca50" in directory 
> /home/bothner/Software/libwebsockets/build/CMakeFiles/CMakeTmp
> LIBUV_LIBRARIES
>      linked by target "cmTC_3ca50" in directory 
> /home/bothner/Software/libwebsockets/build/CMakeFiles/CMakeTmp
> 
> CMake Error at /usr/share/cmake/Modules/CheckFunctionExists.cmake:72 
> (try_compile):
>    Failed to configure test project build system.
> Call Stack (most recent call first):
>    CMakeLists.txt:1582 (CHECK_FUNCTION_EXISTS)
> 
> 
> CMake Error: The following variables are used in this project, but they 
> are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the 
> CMake files:
> LIBEV_INCLUDE_DIRS
>     used as include directory in directory 
> /home/bothner/Software/libwebsockets
>     used as include directory in directory 
> /home/bothner/Software/libwebsockets
>     used as include directory in directory 
> /home/bothner/Software/libwebsockets
>     used as include directory in directory 
> /home/bothner/Software/libwebsockets
> LIBEV_LIBRARIES
>      linked by target "websockets" in directory 
> /home/bothner/Software/libwebsockets
>      linked by target "websockets_shared" in directory 
> /home/bothner/Software/libwebsockets
> LIBUV_INCLUDE_DIRS
>     used as include directory in directory 
> /home/bothner/Software/libwebsockets
>     used as include directory in directory 
> /home/bothner/Software/libwebsockets
>     used as include directory in directory 
> /home/bothner/Software/libwebsockets
>     used as include directory in directory 
> /home/bothner/Software/libwebsockets
> LIBUV_LIBRARIES
>      linked by target "websockets" in directory 
> /home/bothner/Software/libwebsockets
>      linked by target "websockets_shared" in directory 
> /home/bothner/Software/libwebsockets
> 
> -- Configuring incomplete, errors occurred!
> See also 
> "/home/bothner/Software/libwebsockets/build/CMakeFiles/CMakeOutput.log".
> See also 
> "/home/bothner/Software/libwebsockets/build/CMakeFiles/CMakeError.log".
> 
> This is on Fedora 29.

Also on Fedora 29, it builds no problem.  I think this is just telling 
you that you will need libev-devel and libuv-devel, since the 
DISTRO_RECOMMENDED also builds with those.  Building lws to support the 
extra event loops doesn't disable the default poll() backend; selecting 
one of the event loops instead is optionally done at the application 
runtime with a flag on the context creation options.

For inclusion in a distro, it makes sense for the same library to be 
able to support these event loops.

BTW it does support ZIP_FOPS as well then

if(LWS_WITH_DISTRO_RECOMMENDED)
...
	set(LWS_WITH_ZIP_FOPS 1)

-Andy


More information about the Libwebsockets mailing list