[Libwebsockets] Upgrade from 2.2 to 2.4

Andy Green andy at warmcat.com
Thu Dec 7 23:36:52 CET 2017



On 12/08/2017 02:08 AM, Brice Hamon wrote:
> Hi guys.

Thanks Silas for the replies.

I think you're probably using master... the patch on there that adds 
coverage support, it changes the cmake defaults for things that should 
have been default-off in the first place

  - LWS_WITH_ZIP_FOPS: OFF
  - LWS_WITH_RANGES: OFF
  - LWS_WITHOUT_EXTENSIONS: ON
  - LWS_WITH_ZLIB: OFF

> Quick update.
> 
> Great news, the library is working in my environment. I am using an 
> external epoll mecanism which also is working fine.
> 
> The only new thing is a error log at startup from libwebsocket:  
> libwebsocket: lws_tls_server_certs_load: x is NULL
> 
> Any ideas where this is coming from?

It's just a debug message, it's gone in current master.

> I am not using vhost, and use the default behavior which, I believe, 
> creates a default vhost for me.

Yes, for backwards compatibility if you don't set the context creation 
info option LWS_SERVER_OPTION_EXPLICIT_VHOSTS, creating the context will 
also create a vhost called "default" and configure it with whatever you 
set in the context creation info struct.  Stuff will "just work" like 
before.

-Andy

> Thanks
> Brice.
> 
> 
> 
> On Thu, Dec 7, 2017 at 12:45 PM, Brice Hamon <brice at ydotm.com 
> <mailto:brice at ydotm.com>> wrote:
> 
>     Hi Silas,
> 
>     Thank you, you are correct. I had to explicitly
>     add -DLWS_WITHOUT_EXTENSIONS=OFF to get the deflate symbol included
>     in the library.
> 
>     The link is now successful.
> 
>     Thank you for your help, greatly appreciated.
> 
>     Brice.
> 
> 
> 
>     On Thu, Dec 7, 2017 at 12:06 PM, Silas Parker
>     <skyhisi+libwebsockets at gmail.com
>     <mailto:skyhisi+libwebsockets at gmail.com>> wrote:
> 
>         On 7 December 2017 at 16:50, Brice Hamon <brice at ydotm.com
>         <mailto:brice at ydotm.com>> wrote:
>          > Hi Silas,
>          >
>          > No the Cmake was plain vanilla. Here is the build script I
>         used up to 2.2
>          >
>          > git clone git://git.warmcat.com/libwebsockets
>         <http://git.warmcat.com/libwebsockets>
>          > cd libwebsockets
>          > mkdir build
>          > cd build
>          > cmake ..
>         -DCMAKE_INSTALL_PREFIX:PATH=/export/home/development/3rdparty -G
>          > "Unix Makefiles"
>          > make
>          > make install
>          >
>          > Thank you,
>          > Brice.
>          >
>          >
>          > On Thu, Dec 7, 2017 at 11:39 AM, Silas Parker
>          > <skyhisi+libwebsockets at gmail.com
>         <mailto:skyhisi%2Blibwebsockets at gmail.com>> wrote:
>          >>
>          >> On 7 December 2017 at 16:29, Brice Hamon
>         <normandviking at gmail.com <mailto:normandviking at gmail.com>> wrote:
>          >> > Hi guys,
>          >> >
>          >> > I upgraded from 2.2 to 2.4 and I am facing a link issue with
>          >> > libwebsockets
>          >> > when I tried to compile a simple client test program:
>          >> >
>          >> > g++ -W -Wall -Wpointer-arith -Werror=uninitialized  -g -pipe
>          >> > -D_REENTRANT
>          >> > -D_GNU_SOURCE  -I../ -I/export/home/bhamon/work/bs/include
>          >> > -I/usr/local/include
>         -I/export/home/development/3rdparty/include
>          >> > -I/export/home/development/tools 
>         -L/export/home/bhamon/work/bs/lib
>          >> > -L/export/home/bhamon/work/bs/lib -L./ -L/usr/local/lib
>          >> > -L/export/home/development/3rdparty/lib
>          >> > -L/export/home/development/3rdparty/lib64 -Wl,-E -o wsclient
>          >> > ./wsclient.o
>          >> > -lwebsockets -ldl -lpthread
>          >> > ./wsclient.o:(.rodata+0xe08): undefined reference to
>          >> > `lws_extension_callback_pm_deflate'
>          >> > ./wsclient.o:(.rodata+0xe20): undefined reference to
>          >> > `lws_extension_callback_pm_deflate'
>          >> > collect2: error: ld returned 1 exit status
>          >> >
>          >> > I checked your test-client program and we have the same code.
>          >> > I noticed that you link your program in static. I do use
>         the shared
>          >> > library.
>          >> >
>          >> > Is there anything special I need to add when I compile
>         that .4 version?
>          >> >
>          >> > Thank you,
>          >> > Brice.
>          >> >
>          >> > _______________________________________________
>          >> > Libwebsockets mailing list
>          >> > Libwebsockets at ml.libwebsockets.org
>         <mailto:Libwebsockets at ml.libwebsockets.org>
>          >> > https://libwebsockets.org/mailman/listinfo/libwebsockets
>         <https://libwebsockets.org/mailman/listinfo/libwebsockets>
>          >> >
>          >>
>          >>
>          >> Hi Brice,
>          >>
>          >> Have you set LWS_WITHOUT_EXTENSIONS to Off in CMake?
>          >>
>          >> Thanks,
>          >> Silas
>          >> _______________________________________________
>          >> Libwebsockets mailing list
>          >> Libwebsockets at ml.libwebsockets.org
>         <mailto:Libwebsockets at ml.libwebsockets.org>
>          >> https://libwebsockets.org/mailman/listinfo/libwebsockets
>         <https://libwebsockets.org/mailman/listinfo/libwebsockets>
>          >
>          >
> 
>         Hi Brice,
> 
>         The default is On, so I think you need to set LWS_WITHOUT_EXTENSIONS
>         to Off explicitly to built the deflate into libwebsockets.so.
> 
>         You can check if your library has it with a command like:
> 
>         nm -Dg lib/libwebsockets.so | grep deflate
>                           U deflate
>                           U deflateEnd
>                           U deflateInit2_
>         000000000001bee0 T lws_extension_callback_pm_deflate
> 
>         You should see the symbol listed.
> 
>         Thanks,
>         Silas
>         _______________________________________________
>         Libwebsockets mailing list
>         Libwebsockets at ml.libwebsockets.org
>         <mailto:Libwebsockets at ml.libwebsockets.org>
>         https://libwebsockets.org/mailman/listinfo/libwebsockets
>         <https://libwebsockets.org/mailman/listinfo/libwebsockets>
> 
> 
> 
> 
> 
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets
> 



More information about the Libwebsockets mailing list