janus gateway installation problem

937 views
Skip to first unread message

John Li

unread,
Dec 21, 2015, 6:25:07 PM12/21/15
to meetecho-janus
revisit Janus after initially checking it out two months ago. I have it installed successfully without enabling data channel and websockets before, but this time i tried to enable both, but unfortunately some errors happened during make process.

the first problem is

if i install websockets by following the steps on doc:
git clone git://git.libwebsockets.org/libwebsockets
cd libwebsockets
mkdir build
cd build
cmake -DLWS_WITH_OLD_API_WRAPPERS=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" ..
make && sudo make install
during configure process, libwebsockets is not detected by janus, so i ended up doing "sudo apt-get install libwebsockets-dev", and configure now can detect libwebsockets, below is what my configure looks like
DataChannels support:      yes
BoringSSL (no OpenSSL):    no
Recordings post-processor: yes
TURN REST API client:      no
Doxygen documentation:     no
Transports:
    REST (HTTP/HTTPS):     yes
    WebSockets:            yes
    RabbitMQ:              no
Plugins:
    Echo Test:             yes
    Streaming:             yes
    Video Call:            yes
    SIP Gateway:           yes
    Audio Bridge:          yes
    Video Room:            yes
    Voice Mail:            yes
    Record&Play:           yes
Then i run make, here comes the second problem. It looks like something wrong with the websockets
  CC       plugins/plugins_libjanus_audiobridge_la-janus_audiobridge.lo
  CCLD     plugins/libjanus_audiobridge.la
  CC       plugins/plugins_libjanus_echotest_la-janus_echotest.lo
  CCLD     plugins/libjanus_echotest.la
  CC       plugins/plugins_libjanus_recordplay_la-janus_recordplay.lo
  CCLD     plugins/libjanus_recordplay.la
  CC       plugins/plugins_libjanus_sip_la-janus_sip.lo
  CCLD     plugins/libjanus_sip.la
  CC       plugins/plugins_libjanus_streaming_la-janus_streaming.lo
  CCLD     plugins/libjanus_streaming.la
  CC       plugins/plugins_libjanus_videocall_la-janus_videocall.lo
  CCLD     plugins/libjanus_videocall.la
  CC       plugins/plugins_libjanus_videoroom_la-janus_videoroom.lo
  CCLD     plugins/libjanus_videoroom.la
  CC       plugins/plugins_libjanus_voicemail_la-janus_voicemail.lo
  CCLD     plugins/libjanus_voicemail.la
  CC       transports/transports_libjanus_http_la-janus_http.lo
  CCLD     transports/libjanus_http.la
  CC       transports/transports_libjanus_websockets_la-janus_websockets.lo
transports/janus_websockets.c: In function ‘janus_websockets_reason_string’:
transports/janus_websockets.c:184:12: error: ‘LWS_CALLBACK_CLOSED_HTTP’ undeclared (first use in this function)
   CASE_STR(LWS_CALLBACK_CLOSED_HTTP);
........
transports/janus_websockets.c:686:2: warning: implicit declaration of function ‘libwebsocket_cancel_service’ [-Wimplicit-function-declaration]
  libwebsocket_cancel_service(service);
  ^
transports/janus_websockets.c:686:2: warning: nested extern declaration of ‘libwebsocket_cancel_service’ [-Wnested-externs]
transports/janus_websockets.c: In function ‘janus_websockets_callback_http’:
transports/janus_websockets.c:703:4: warning: implicit declaration of function ‘libwebsockets_return_http_status’ [-Wimplicit-function-declaration]
    libwebsockets_return_http_status(this, wsi, 403, NULL);
    ^
transports/janus_websockets.c:703:4: warning: nested extern declaration of ‘libwebsockets_return_http_status’ [-Wnested-externs]
make[2]: *** [transports/transports_libjanus_websockets_la-janus_websockets.lo] Error 1
make[2]: Leaving directory `/home/ubuntu/workspace/janus-gateway'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ubuntu/workspace/janus-gateway'
make: *** [all] Error 2
Anyone could give me some pointers?? Much appreciated!!!
John

Lorenzo Miniero

unread,
Dec 22, 2015, 2:02:49 AM12/22/15
to meetecho-janus
libwebsockets-dev from the repos is outdated, you have to use the git version.

L.

John Li

unread,
Dec 22, 2015, 11:20:01 AM12/22/15
to meetecho-janus
Thanks Lorenzo. But if i install by following the way on the tutorial, configure step will throw libwebsockets not found error (see below)

checking for libwebsocket_get_internal_extensions in -lwebsockets_shared... no
checking for libwebsocket_get_internal_extensions in -lwebsockets... no
configure: error: libwebsockets not found. See README.md for installation instructions or use --disable-websockets

any idea??

Lorenzo Miniero

unread,
Dec 22, 2015, 11:23:26 AM12/22/15
to meetecho-janus
Check the instructions provided here, a similar issue was fixed some days ago

L.
Reply all
Reply to author
Forward
0 new messages