Build error on EOL Centos 7

Hi all. I posting here because this is not an issue with Janus. Instead it is an issue with the build I trying to make in an old Centos 7 OS. I was installed all the dependencies, also installed boringssl

Janus is 1.4.0. If you have some light on this I will be appreciated.

Output from configure:

Compiler: gcc
libsrtp version: 2.x
SSL/crypto library: BoringSSL
DTLS set-timeout: yes
Mutex implementation: GMutex (native futex on Linux)
DataChannels support: yes
Recordings post-processor: yes
TURN REST API client: yes
Doxygen documentation: no
Transports:
REST (HTTP/HTTPS): yes
WebSockets: no
RabbitMQ: no
MQTT: no
Unix Sockets: yes
Nanomsg: no
Plugins:
Echo Test: yes
Streaming: yes
Video Call: yes
SIP Gateway: yes
NoSIP (RTP Bridge): yes
Audio Bridge: yes
Video Room: yes
Record&Play: yes
Text Room: yes
Lua Interpreter: yes
Duktape Interpreter: yes
Event handlers:
Sample event handler: yes
WebSocket ev. handler: no
RabbitMQ event handler:no
MQTT event handler: no
Nanomsg event handler: no
GELF event handler: yes
External loggers:
JSON file logger: yes
JavaScript modules: yes
Using npm: /usr/bin/npm
ES syntax: yes
IIFE syntax: no
UMD syntax: no
CommonJS syntax: yes

Build error:

CCLD transports/libjanus_http.la
CC transports/transports_libjanus_pfunix_la-janus_pfunix.lo
CCLD transports/libjanus_pfunix.la
CC janus-apierror.o
CC janus-auth.o
CC janus-config.o
CC janus-dtls.o
CC janus-dtls-bio.o
CC janus-events.o
CC janus-ice.o
CC janus-janus.o
CC janus-log.o
CC janus-options.o
CC janus-record.o
CC janus-rtcp.o
CC janus-rtp.o
CC janus-rtpfwd.o
CC janus-sctp.o
CC janus-sdp.o
CC janus-sdp-utils.o
CC janus-ip-utils.o
CC janus-turnrest.o
CC janus-utils.o
which git rev-parse HEAD | awk ‘BEGIN {print “#include "version.h"”} {print “const char *janus_build_git_sha = "” $0"";"} END {}’ > version.c
echo “Mon Feb 2 03:52:14 -03 2026” | awk ‘BEGIN {} {print “const char *janus_build_git_time = "”$0"";“} END {} ’ >> version.c
echo “1400” | awk 'BEGIN {} {print “int janus_version = “$0”;”} END {} ’ >> version.c
echo “1.4.0” | awk 'BEGIN {} {print “const char *janus_version_string = "”$0"";”} END {} ’ >> version.c
PKG_CONFIG_PATH=“/opt/rh/devtoolset-11/root/usr/lib64/pkgconfig” “/usr/bin/pkg-config” --modversion nice | awk ‘BEGIN {} {print “const char *libnice_version_string = "”$0"";"} END {} ’ >> version.c
CC janus-version.o
CC janus-text2pcap.o
CC plugins/janus-plugin.o
CC transports/janus-transport.o
CCLD janus
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-janus.o: in function main': /opt/sources/janus/janus-gateway/src/janus.c:5434: undefined reference to OpenSSL_add_all_algorithms’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-dtls.o: in function janus_dtls_srtp_init': /opt/sources/janus/janus-gateway/src/dtls.c:473: undefined reference to SSL_CTX_set_options’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-dtls.o: in function janus_dtls_generate_keys': /opt/sources/janus/janus-gateway/src/dtls.c:267: undefined reference to EVP_PKEY_assign_EC_KEY’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls.c:297: undefined reference to X509_get_notBefore' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls.c:298: undefined reference to X509_get_notAfter’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls.c:231: undefined reference to EVP_PKEY_assign_RSA' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-dtls.o: in function janus_dtls_srtp_create’:
/opt/sources/janus/janus-gateway/src/dtls.c:602: undefined reference to BIO_set_mem_eof_return' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls.c:626: undefined reference to SSL_set_tmp_ecdh’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls.c:633: undefined reference to SSL_set_options' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls.c:636: undefined reference to DTLSv1_set_initial_timeout_duration’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-dtls.o: in function janus_dtls_srtp_incoming_msg': /opt/sources/janus/janus-gateway/src/dtls.c:744: undefined reference to SSL_is_init_finished’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-dtls.o: in function janus_dtls_retry': /opt/sources/janus/janus-gateway/src/dtls.c:1123: undefined reference to DTLSv1_get_timeout’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls.c:1135: undefined reference to DTLSv1_handle_timeout' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-dtls-bio.o: in function janus_dtls_bio_agent_free’:
/opt/sources/janus/janus-gateway/src/dtls-bio.c:112: undefined reference to BIO_set_data' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-dtls-bio.o: in function janus_dtls_bio_agent_new’:
/opt/sources/janus/janus-gateway/src/dtls-bio.c:98: undefined reference to BIO_set_init' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls-bio.c:99: undefined reference to BIO_set_data’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls-bio.c:100: undefined reference to BIO_set_shutdown' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-dtls-bio.o: in function janus_dtls_bio_agent_write’:
/opt/sources/janus/janus-gateway/src/dtls-bio.c:129: undefined reference to BIO_get_data' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-dtls-bio.o: in function janus_dtls_bio_agent_init’:
/opt/sources/janus/janus-gateway/src/dtls-bio.c:59: undefined reference to BIO_meth_new' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls-bio.c:63: undefined reference to BIO_meth_set_write’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls-bio.c:64: undefined reference to BIO_meth_set_ctrl' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls-bio.c:65: undefined reference to BIO_meth_set_create’
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /opt/sources/janus/janus-gateway/src/dtls-bio.c:66: undefined reference to BIO_meth_set_destroy' /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: janus-dtls-bio.o: in function BIO_janus_dtls_agent_new’:
/opt/sources/janus/janus-gateway/src/dtls-bio.c:87: undefined reference to `BIO_set_data’
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1787: janus] Error 1
make[2]: Leaving directory ‘/opt/sources/janus/janus-gateway/src’
make[1]: *** [Makefile:1379: all] Error 2
make[1]: Leaving directory ‘/opt/sources/janus/janus-gateway/src’
make: *** [Makefile:588: all-recursive] Error 1

Thank you!

Janus expects BoringSSL to be installed in /opt/boringssl, and the libraries to be in /opt/boringssl/lib, so if they are, e.g., in /opt/boringssl/lib64, it won’t find them. Make sure the folders are correct.

1 Like

Thank you so much Lorenzo!

Copying libcrypto.a libssl.a from /opt/boringssl/lib64 to /opt/boringssl/lib fix the issue

A little side topic, about libwesockets. I was build and installed libwesockets 4.3, but I get a build error when I make Janus:

Making all in src
make[1]: Entering directory ‘/opt/sources/janus/janus-gateway/src’
which git rev-parse HEAD | awk ‘BEGIN {print “#include "version.h"”} {print “const char *janus_build_git_sha = "” $0"";"} END {}’ > version.c
echo “Mon Feb 2 15:57:24 -03 2026” | awk 'BEGIN {} {print “const char *janus_build_git_time = "”$0"";“} END {} ’ >> version.c
echo “1400” | awk 'BEGIN {} {print “int janus_version = “$0”;”} END {} ’ >> version.c
echo “1.4.0” | awk 'BEGIN {} {print “const char *janus_version_string = "”$0"";”} END {} ’ >> version.c
PKG_CONFIG_PATH=“/opt/rh/devtoolset-11/root/usr/lib64/pkgconfig” “/usr/bin/pkg-config” --modversion nice | awk 'BEGIN {} {print “const char *libnice_version_string = "”$0"";"} END {} ’ >> version.c
make all-am
make[2]: Entering directory ‘/opt/sources/janus/janus-gateway/src’
CC events/events_libjanus_sampleevh_la-janus_sampleevh.lo
CCLD events/libjanus_sampleevh.la
CC events/events_libjanus_wsevh_la-janus_wsevh.lo
In file included from /usr/include/libwebsockets.h:664,
from events/janus_wsevh.c:15:
/usr/include/libwebsockets/lws-genhash.h:85:18: error: field ‘ctx’ has incomplete type
85 | HMAC_CTX ctx;
| ^~~
make[2]: *** [Makefile:2019: events/events_libjanus_wsevh_la-janus_wsevh.lo] Error 1
make[2]: Leaving directory ‘/opt/sources/janus/janus-gateway/src’
make[1]: *** [Makefile:1379: all] Error 2
make[1]: Leaving directory ‘/opt/sources/janus/janus-gateway/src’
make: *** [Makefile:588: all-recursive] Error 1

May be can I do something, o resign websockets from Janus?