Failed to build using websockets

334 views
Skip to first unread message

Mikael Boman

unread,
Apr 26, 2015, 5:47:41 AM4/26/15
to meetech...@googlegroups.com
When running configure (after building libwebsockets), 
./configure --disable-rabbitmq --disable-data-channels

I get the following:
   configure: error: libwebsockets not found. See README.md for installation instructions or use --disable-websockets

/usr/lib contains libwebsockets.a, libwebsockets_shared.so, libwebsockets_shared.so.5.

configure.log contains however a lot of errors related to libwebsockets:
configure:12972: checking for libwebsocket_get_internal_extensions in -lwebsockets
configure:12997: gcc -o conftest -g -O2   conftest.c -lwebsockets   >&5
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libwebsockets.a(extension-deflate-frame.c.o): In function `lws_exte
nsion_callback_deflate_frame':
extension-deflate-frame.c:(.text+0x10f): undefined reference to `inflate'
...
ssl.c:(.text+0xa16): undefined reference to `SSL_shutdown'
...
client.c:(.text+0x12b2): undefined reference to `SSL_get_error'
collect2: error: ld returned 1 exit status
---

Any idea what I am doing wrong? Do I have a bad Open_SSL version? 
Building libwebsockets itself seem to work OK.

I am running on Linux Mint 17.1 (Ubuntu 14.04)


Michael x

unread,
Apr 27, 2015, 3:59:22 AM4/27/15
to meetech...@googlegroups.com
Have you tried running 'ldconfig' after installing libwebsockets?

That will update the links and cache to the shared libraries;
http://linux.die.net/man/8/ldconfig

Mikael Boman

unread,
Apr 27, 2015, 4:41:05 AM4/27/15
to meetech...@googlegroups.com
I tried sudo ldconfig but still see the same problem running configure.


Michael

unread,
Apr 27, 2015, 4:47:38 AM4/27/15
to meetech...@googlegroups.com
Just had a look to confirm and it seems like a few changes in the build process for libwebsockets (f1b125442be619c43bff45791a3f6fd5726099b5) is causing the janus configure to to fail

If you checkout the last commit before this (644fea11c553811e8231b429b8c820a18b5c4094) it seems to work fine.


Lorenzo Miniero

unread,
Apr 27, 2015, 4:53:06 AM4/27/15
to meetech...@googlegroups.com
Not sure why they're calling the shared object like that. My guess is this is causing the static version to be used instead, which fails. I'm not familiar with CMake enough to know which changes to the CMake file should be applied to the new version for it to work as expected.

L.

Lorenzo Miniero

unread,
Apr 27, 2015, 5:14:40 AM4/27/15
to meetech...@googlegroups.com
I just pushed a change to configure.ac that should account for that: it first looks for libwebsockets_shared, and then libwebsockets. The correct approach would have been to rely on pkg-config for the purpose, as it seems it is one of the recognized libraries, but apparently a call to "pkg-config --libs libwebsockets" still returns "-lwebsockets" in my environment, which results in undefined references at the end.

L.

Lets_Vape

unread,
Apr 27, 2015, 7:29:24 AM4/27/15
to meetech...@googlegroups.com
Thanks for your quick reply and fix Lorenzo!
Just tested and it compiles fine again with the latest libwebsockets commit for me

Regards

Mikael Boman

unread,
Apr 27, 2015, 12:20:11 PM4/27/15
to meetech...@googlegroups.com

Works perfect. Only needed to touch the source files to force recompilation.
Great support!
Reply all
Reply to author
Forward
0 new messages