Cannot compile textproc/iksemel

Cannot update asterisk port, - error while chompiling textproc/iksemel ver 1.5 (meduketto-iksemel-1.5-978b733_GH0):

Code:
--- libiksemel_la-md5.lo ---
mv -f .deps/libiksemel_la-md5.Tpo .deps/libiksemel_la-md5.Plo
--- libiksemel_la-tls-openssl.lo ---
tls-openssl.c:27:3: error: incomplete definition of type 'struct bio_st'
        b->init = 1;
        ~^
/usr/local/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
               ^
tls-openssl.c:28:3: error: incomplete definition of type 'struct bio_st'
        b->num = 0;
        ~^
/usr/local/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
               ^
tls-openssl.c:29:3: error: incomplete definition of type 'struct bio_st'
        b->ptr = NULL;
        ~^
/usr/local/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
               ^
tls-openssl.c:30:3: error: incomplete definition of type 'struct bio_st'
        b->flags = 0 ;
        ~^
/usr/local/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
               ^
tls-openssl.c:39:3: error: incomplete definition of type 'struct bio_st'
        b->ptr = NULL;
        ~^
/usr/local/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
               ^
tls-openssl.c:40:3: error: incomplete definition of type 'struct bio_st'
        b->init = 0;
        ~^
/usr/local/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
               ^
tls-openssl.c:41:3: error: incomplete definition of type 'struct bio_st'
        b->flags = 0;
        ~^
/usr/local/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
               ^
tls-openssl.c:48:53: error: incomplete definition of type 'struct bio_st'
        struct ikstls_data *data = (struct ikstls_data *) b->ptr;
                                                          ~^
/usr/local/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
               ^
tls-openssl.c:61:53: error: incomplete definition of type 'struct bio_st'
        struct ikstls_data *data = (struct ikstls_data *) b->ptr;
                                                          ~^
/usr/local/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
               ^
tls-openssl.c:92:19: error: variable has incomplete type 'BIO_METHOD' (aka 'struct bio_method_st')
static BIO_METHOD my_bio_method = {
                  ^
/usr/local/include/openssl/bio.h:250:16: note: forward declaration of 'struct bio_method_st'
typedef struct bio_method_st BIO_METHOD;
               ^
tls-openssl.c:138:5: error: incomplete definition of type 'struct bio_st'
        bio->ptr = (void *) data;
        ~~~^
/usr/local/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
               ^
11 errors generated.
*** [libiksemel_la-tls-openssl.lo] Error code 1

make[2]: stopped in /usr/ports/textproc/iksemel/work/iksemel-978b733/src
--- libiksemel_la-base64.lo ---
mv -f .deps/libiksemel_la-base64.Tpo .deps/libiksemel_la-base64.Plo
1 error

make[2]: stopped in /usr/ports/textproc/iksemel/work/iksemel-978b733/src
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/textproc/iksemel
 
So, you have OpenSSL from ports and it's picking that up, while being incompatible with it; from the error messages, it seems to still expect the public data structures that were recently hidden by OpenSSL.

Solution is probably to update your ports tree.

This port should be built with GnuTLS instead, and a recent commit made sure it always picks GnuTLS:
 
Great thanks !
btw, the port tree is updated, but it doesn't effect that the port has no config options. Even on fresh ports site there is no config options. looks like I need to wait a bit :)
 
How do you update the ports tree? This commit doesn't introduce an option, it just tells the port to always use GnuTLS, even if OpenSSL is found in $prefix (which is the case when you have OpenSSL from ports installed). The commit is over 2 weeks old, so you should have it.

You can also check your build log whether ./configure is indeed called with --with-gnutls=yes.
 
hm.

i'm updating ports by using : portsnap auto

indeed, config logs shows that the option was passed:
Code:
~~~ cat ./work/iksemel-978b733/config.log ~~~
----- 8< -----
  $ ./configure --with-gnutls=yes --disable-python --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --disable-silent-rules --infodir=/usr/local/share/info/ --build=amd64-portbld-freebsd12.2
----- 8< -----
~~~ end cat ~~~
but still, can't compile port...

i do have gnutls installed
 
Ok, I had a look. Turns out it still has an "automagic" dependency on OpenSSL which even overrides GnuTLS (these are the kind of things you will never find testing with poudriere).

Please try this patch:
Code:
--- a/textproc/iksemel/Makefile
+++ b/textproc/iksemel/Makefile
@@ -20,6 +20,7 @@ GH_TAGNAME=   978b733
 USES=          autoreconf libtool makeinfo pathfix pkgconfig
 GNU_CONFIGURE= yes
 CONFIGURE_ARGS+=--with-gnutls=yes \
+               --without-openssl \
                --disable-python
 CPPFLAGS+=     ${CXXFLAGS} -I${LOCALBASE}/include
 LDFLAGS+=      -L${LOCALBASE}/lib
 
to trigger the bug, OpenSSL headers (could probably be from LibreSSL as well) must be found in /usr/local/include

Tested setup (notice Test 6):

Test 1
security/openssl not installed, port builds fine

Test 2
security/openssl installed, headers in /usr/local/include/openssl
port build fails

Test 3
security/openssl installed, headers in /usr/local/include/openssl
/etc/make.conf DEFAULT_VERSIONS+=ssl=openssl set,
port build fails

Test 4
Test 2 with patch applied, port builds fine

Test 5
Test 3 with patch applied, port builds fine

Test 6
Port builds fine without patch, with security/libressl installed,
headers in /usr/local/include/openssl
 
I just updated my poudriere ports trees and I am still running into this issue. When will this get integrated into the ports tree so that I can choose or disable SSL for textproc/iksemel? I use openssl for everything, rather than gnutls, whenever possible, and right now this bug is preventing me from building net/asterisk18.
 
Top