meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.15k stars 2.47k forks source link

Error while compiling janus in docker #1958

Closed shehinfn closed 4 years ago

shehinfn commented 4 years ago

dtls.c: In function 'janus_dtls_srtp_init': dtls.c:364:2: warning: implicit declaration of function 'DTLSv1_2_method' [-Wimplicit-function-declaration] ssl_ctx = SSL_CTX_new(DTLSv1_2_method()); ^ dtls.c:364:24: warning: passing argument 1 of 'SSL_CTX_new' makes pointer from integer without a cast ssl_ctx = SSL_CTX_new(DTLSv1_2_method()); ^ In file included from rtpsrtp.h:20:0, from dtls.h:22, from ice.h:24, from janus.h:32, from dtls.c:15: /usr/include/openssl/ssl.h:1820:10: note: expected 'const struct SSL_METHOD ' but argument is of type 'int' SSL_CTX SSL_CTX_new(const SSL_METHOD meth); ^ CC janus-dtls-bio.o CC janus-events.o CC janus-ice.o CC janus-janus.o CC janus-log.o CC janus-record.o CC janus-rtcp.o CC janus-rtp.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 "Fri Feb 21 10:40:28 UTC 2020" | awk 'BEGIN {} {print "const char janus_build_git_time = \""$0"\";"} END {} ' >> version.c echo "91" | awk 'BEGIN {} {print "int janus_version = "$0";"} END {} ' >> version.c echo "0.9.1" | awk 'BEGIN {} {print "const char janus_version_string = \""$0"\";"} END {} ' >> version.c 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 janus-dtls.o: In function janus_dtls_srtp_init': dtls.c:(.text+0x1acd): undefined reference toDTLSv1_2_method' collect2: error: ld returned 1 exit status Makefile:1765: recipe for target 'janus' failed make[2]: [janus] Error 1 make[2]: Leaving directory '/root/janus-gateway' Makefile:3052: recipe for target 'all-recursive' failed make[1]: Leaving directory '/root/janus-gateway' make[1]: [all-recursive] Error 1 Makefile:1363: recipe for target 'all' failed make: *** [all] Error 2

lminiero commented 4 years ago

As clearly explained in the guidelines, please DO NOT paste huge bunches of text inline. That said, not a code issue, so belongs to the group, where I've seen this mentioned already. Very likely you're using an older version of OpenSSL.