I can't build janus, does anyone can help, please

I follow README document to install all of libraries
https://janus.conf.meetecho.com/docs/README.html

then I go to the step:

to generate the configure file. After that, configure and compile as usual to start the whole compilation process:

./configure --prefix=/opt/janus
make
make install

I got an error on make command:

CC janus-version.o
CCLD janus
CC janus_cfgconv-version.o
CCLD janus-cfgconv
CC events/libjanus_wsevh_la-janus_wsevh.lo
events/janus_wsevh.c: In function ‘janus_wsevh_reason_string’:
events/janus_wsevh.c:238:12: error: ‘LWS_CALLBACK_OPENSSL_CONTEXT_REQUIRES_PRIVATE_KEY’ undeclared (first use in this function)
238 | CASE_STR(LWS_CALLBACK_OPENSSL_CONTEXT_REQUIRES_PRIVATE_KEY);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
events/janus_wsevh.c:196:29: note: in definition of macro ‘CASE_STR’
196 | #define CASE_STR(name) case name: return #name
| ^~~~
events/janus_wsevh.c:238:12: note: each undeclared identifier is reported only once for each function it appears in
238 | CASE_STR(LWS_CALLBACK_OPENSSL_CONTEXT_REQUIRES_PRIVATE_KEY);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
events/janus_wsevh.c:196:29: note: in definition of macro ‘CASE_STR’
196 | #define CASE_STR(name) case name: return #name
| ^~~~
make[2]: *** [Makefile:2192: events/libjanus_wsevh_la-janus_wsevh.lo] Error 1
make[2]: Leaving directory ‘/home/maycharm/janus-gateway’
make[1]: *** [Makefile:3401: all-recursive] Error 1
make[1]: Leaving directory ‘/home/maycharm/janus-gateway’
make: *** [Makefile:1554: all] Error 2

Is that means I missing install library or steps?


The following information are all about my machine and installed libraries


My OS is Ubuntu 20.04.6 LTS
The following list is all library installed on the machine.

[Jansson]
libjansson-dev:amd64 (2.12-1build1)
libjansson4:amd64 (2.12-1build1)

[libconfig]
libconfig-dev:amd64 (1.5-0.4build1)
libconfig-doc:amd64 (1.5-0.4build1)
libconfig9:amd64 (1.5-0.4build1)

[libnice]
libnice-dev (0.1.16-1)
libnice10:amd64 (0.1.16-1)

[OpenSSL]
libcurl4-openssl-dev:amd64 (7.68.0-1ubuntu2.18)
libevent-openssl-2.1-7:amd64 (2.1.11-stable-1)
libgnutls-openssl27:amd64 (3.6.13-2ubuntu1.8)
libxmlsec1-openssl:amd64 (1.2.28-2)
openssl (1.1.1f-1ubuntu2.19)
perl-openssl-defaults:amd64 (4)
python3-openssl (19.0.0-1build1)

[libsrtp]
libsrtp2-1:amd64 (2.3.0-2)
libsrtp2-dev (2.3.0-2)

[usrsctp]
libusrsctp-dev:amd64 (0.9.3.0+20190901-1)
libusrsctp1:amd64 (0.9.3.0+20190901-1)

[libmicrohttpd]
libmicrohttpd-dev (0.9.66-1)
libmicrohttpd12 (0.9.66-1)

[libwebsockets]
libwebsockets15:amd64 (3.2.1-3)

[cmake]
cmake (3.26.4-0kitware1ubuntu20.04.1)
cmake-data (3.26.4-0kitware1ubuntu20.04.1)

[rabbitmq-c]
librabbitmq4:amd64 (0.10.0-1)

[paho.mqtt.c]
not install

[nanomsg]
libnanomsg-dev (1.1.5+dfsg-1)
libnanomsg5 (1.1.5+dfsg-1)

[libcurl]
curl (7.68.0-1ubuntu2.18)
libcurl3-gnutls:amd64 (7.68.0-1ubuntu2.18)
libcurl4:amd64 (7.68.0-1ubuntu2.18)
libcurl4-openssl-dev:amd64 (7.68.0-1ubuntu2.18)

[Sofia-SIP]
libsofia-sip-ua-dev (1.12.11+20110422.1-2.1+deb10u3ubuntu0.20.04.1)
libsofia-sip-ua0 (1.12.11+20110422.1-2.1+deb10u3ubuntu0.20.04.1)

[libopus]
libopus-dev:amd64 (1.3.1-0ubuntu1)
libopus0:amd64 (1.3.1-0ubuntu1)

[libogg]
libogg-dev:amd64 (1.3.4-0ubuntu1)
libogg0:amd64 (1.3.4-0ubuntu1)

[Lua]
liblua5.2-0:amd64 (5.2.4-1.1build3)
liblua5.3-0:amd64 (5.3.3-1.1build2)
liblua5.3-dev:amd64 (5.3.3-1.1build2)

[Duktape]
not install

[GLib]
libglib2.0-0:amd64 (2.64.6-1~ubuntu20.04.6)
libglib2.0-bin (2.64.6-1~ubuntu20.04.6)
libglib2.0-data (2.64.6-1~ubuntu20.04.6)
libglib2.0-dev:amd64 (2.64.6-1~ubuntu20.04.6)
libglib2.0-dev-bin (2.64.6-1~ubuntu20.04.6)

[zlib]
zlib1g:amd64 (1:1.2.11.dfsg-2ubuntu1.5)
zlib1g-dev:amd64 (1:1.2.11.dfsg-2ubuntu1.5)

[pkg-config]
pkg-config (0.29.1-0ubuntu4)

[boringssl]
not install

libwebsockets is probably too old. Our README suggests 4.3 but you’re using 3.2

1 Like

Thank you soooooo much!! The problem is saved!