[Libwebsockets] First timer build errors

David Witten wittend at wwrinc.com
Mon Jun 15 18:52:21 CEST 2020

I am new to libwebsockets.  I am having difficulties getting libwebsockets
to build on an Ubuntu 18.04 bionic (x86-64) machine.

I first worked on getting libwebsockets to build on a Raspberry Pi 3.
Similar (the same?) errors occurred there at first, but by installing
libssl-dev  I got everything to build to my satisfaction, including all of
the code in the 'minimal-examples' subtree.
I have tried to follow the same steps on the Ubuntu machine, but I
consistently get errors building the examples.

My initial build of the library is done using:

cd build

The library seems to build fine this way, but when make gets to the
minimal-examples, the first few build OK, but then most of the rest fail
with errors.  The errors all seem to be the same.  for simplicity I include
what I get building 'minimal-http-server':

dave at dillo:$ cd
dave at dillo:~/Projects/libwebsockets/minimal-examples/http-server/minimal-http-server$
$ cmake .

-- Configuring done
-- Generating done
-- Build files have been written to:

dave at dillo:~/Projects/libwebsockets/minimal-examples/http-server/minimal-http-server$

[ 50%] Linking C executable lws-minimal-http-server
/usr/local/lib/libwebsockets.a(unix-caps.c.o): In function
/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: undefined
reference to `cap_set_flag'
/home/dave/Projects/libwebsockets/lib/plat/unix/unix-caps.c:45: undefined
reference to `cap_set_proc'
/home/dave/Projects/libwebsockets/lib/plat/unix/unix-caps.c:47: undefined
reference to `cap_free'
collect2: error: ld returned 1 exit status
CMakeFiles/lws-minimal-http-server.dir/build.make:97: recipe for target
'lws-minimal-http-server' failed
make[2]: *** [lws-minimal-http-server] Error 1
CMakeFiles/Makefile2:67: recipe for target
'CMakeFiles/lws-minimal-http-server.dir/all' failed
make[1]: *** [CMakeFiles/lws-minimal-http-server.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200615/85735411/attachment.htm>

More information about the Libwebsockets mailing list