Set of errors during kamailio build on alpine. ``` CC (gcc) [M tls.so] tls_verify.o
CC (gcc) [M tls.so] tls_ct_wrq.o
CC (gcc) [M tls.so] tls_rpc.o
CC (gcc) [M tls.so] tls_bio.o
tls_bio.c:88:14: error: static declaration of 'BIO_get_data' follows non-static declaration
static void *BIO_get_data(BIO *b)
^~~~~~~~~~~~
In file included from tls_bio.h:27:0,
from tls_bio.c:25:
/usr/include/openssl/bio.h:608:8: note: previous declaration of 'BIO_get_data' was here
void *BIO_get_data(BIO *a);
^~~~~~~~~~~~
tls_bio.c:92:13: error: static declaration of 'BIO_set_data' follows non-static declaration
static void BIO_set_data(BIO *b, void *ptr)
^~~~~~~~~~~~
In file included from tls_bio.h:27:0,
from tls_bio.c:25:
/usr/include/openssl/bio.h:609:7: note: previous declaration of 'BIO_set_data' was here
void BIO_set_data(BIO *a, void *ptr);
^~~~~~~~~~~~
tls_bio.c:96:13: error: static declaration of 'BIO_set_init' follows non-static declaration
static void BIO_set_init(BIO *b, int init)
^~~~~~~~~~~~
In file included from tls_bio.h:27:0,
from tls_bio.c:25:
/usr/include/openssl/bio.h:610:7: note: previous declaration of 'BIO_set_init' was here
void BIO_set_init(BIO *a, int init);
^~~~~~~~~~~~
make[2]: *** [../../Makefile.rules:100: tls_bio.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:511: modules] Error 1
make: *** [Makefile:27: all] Error 2
make[1]: Leaving directory '/usr/src/kamailio/pkg/kamailio/alpine/src/kamailio-25c4b9eb56e0c75daaa98256c590947daa2b9906/src'
ERROR: kamailio: all failed
kamailio: Uninstalling dependencies...
(1/1) Purging .makedepends-kamailio (0)
OK: 448 MiB in 141 packages
pre_build hook failed! (1) ```
First failed build on commit 25c4b9eb56e0c75daaa98256c590947daa2b9906 Look as this commit not related to `tls` and think issue may be on alpine dist change.
This is because Apr 06 2018 LibreSSL is [upgraded from 2.6.4 to 2.7.2](https://git.alpinelinux.org/cgit/aports/commit/main/libressl?id=befdc36ca8cb...)
Sergey,
I'm the maintainer of the Alpine Linux Kamailio package. The TLS module has never worked with Kamailio because of the use of LibreSSL.
Even after we got the patches to compile, the TLS module didn't actually work. So we pulled the patches and disabled the module entirely.
We are waiting for Alpine Linux to switch back to OpenSSL, and then will renable the module. Last I was informed, that will be the 3.8 or 3.9 release.
HTH
Look as ticket [1156](https://github.com/nghttp2/nghttp2/issues/1156) is similar and this [PR](https://github.com/nghttp2/nghttp2/pull/1162/files) is related
Maybe worth trying to enclose those functions like in the ticket you referenced above, respectively the lines with `+`:
``` +#ifndef HAVE_BIO_GET_DATA void *BIO_get_data(BIO *bio) { return bio->ptr; } +#endif +#ifndef HAVE_BIO_SET_DATA void BIO_set_data(BIO *bio, void *ptr) { bio->ptr = ptr; } +#endif +#ifndef HAVE_BIO_SET_INIT void BIO_set_init(BIO *bio, int init) { bio->init = init; } +#endif ```
Hello @kamailio-sync I have tested TLS on libreSSL some issues is exist but may be fixed. Please look patch https://github.com/kamailio/kamailio/blob/master/pkg/kamailio/alpine/0004-sr... from openbsd After this patch is applied TLS module can be compiled and accept connection.
P.S. Daniel i will try your suggestion
@kamailio-sync after PR https://github.com/kamailio/kamailio/pull/1511 is merged, then i create ticked to fix remaining TLS module issue.
Related patch was pushed to master and 5.1 branches.
Closed #1509.