Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot build 5.1 branch on Alpine #1509

Closed
sergey-safarov opened this issue Apr 24, 2018 · 7 comments
Closed

cannot build 5.1 branch on Alpine #1509

sergey-safarov opened this issue Apr 24, 2018 · 7 comments

Comments

@sergey-safarov
Copy link
Member

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 25c4b9e
Look as this commit not related to tls and think issue may be on alpine dist change.

@sergey-safarov
Copy link
Member Author

This is because Apr 06 2018 LibreSSL is upgraded from 2.6.4 to 2.7.2

@sergey-safarov
Copy link
Member Author

Look as ticket 1156 is similar and this PR is related

@miconda
Copy link
Member

miconda commented Apr 24, 2018

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

@kamailio-sync
Copy link

kamailio-sync commented Apr 24, 2018 via email

@sergey-safarov
Copy link
Member Author

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-src_core_tcp_read_c.patch from openbsd
After this patch is applied TLS module can be compiled and accept connection.

P.S. Daniel i will try your suggestion

sergey-safarov pushed a commit to sergey-safarov/kamailio that referenced this issue Apr 24, 2018
@sergey-safarov
Copy link
Member Author

@kamailio-sync after PR #1511 is merged, then i create ticked to fix remaining TLS module issue.

@miconda
Copy link
Member

miconda commented Apr 25, 2018

Related patch was pushed to master and 5.1 branches.

@miconda miconda closed this as completed Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants