[Libwebsockets] First timer build errors

Andy Green andy at warmcat.com
Mon Jun 15 19:09:59 CEST 2020



On 6/15/20 5:52 PM, David Witten wrote:
> I am new to libwebsockets.  I am having difficulties getting 
> libwebsockets to build on an Ubuntu 18.04 bionic (x86-64) machine.

> [ 50%] Linking C executable lws-minimal-http-server
> /usr/local/lib/libwebsockets.a(unix-caps.c.o): In function 
> `_lws_plat_apply_caps':
> /home/dave/Projects/libwebsockets/lib/plat/unix/unix-caps.c:42: 
> undefined reference to `cap_get_proc'
> /home/dave/Projects/libwebsockets/lib/plat/unix/unix-caps.c:44: 

> I hope that this is some simple configuration issue that I missed, but I 
> am at a loss.  Any suggestions?

It's a bug on master caused by the recent big refactor of 
CMakeLists.txt... if you remove libcap-dev, and remove CMakeCache.txt in 
your build dir and build again, it should work around it for now.

With some other cmake build options included as well, libcap gets linked 
in OK.  And if you don't have libcap-dev (the 18.04 CI did not have it 
installed), there's no issue either, so it escaped notice until you 
pointed it out.

-Andy


More information about the Libwebsockets mailing list