This is failing from a Q42022 build: `cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c In file included from osdep.c:46: In file included from ./env_unix.c:259: ./pmatch.c:41:43: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign] if (!pat[1]) return (delim && strchr (s,delim)) ? NIL : T; ^ /usr/include/string.h:78:26: note: passing argument to parameter here char *strchr(const char *, int) __pure; ^ There's many more. See https://www.jetcafe.org/dave/pico.log for the entire thing.
osdep.c:766:11: error: incomplete definition of type 'struct x509_st' if (cert->name == NIL) ~~~~^ /usr/local/include/openssl/ossl_typ.h:147:16: note: forward declaration of 'struct x509_st' typedef struct x509_st X509; ^ osdep.c:768:29: error: incomplete definition of type 'struct x509_st' else if ((s = strstr (cert->name,"/CN=")) != NIL) { Those are the first errors. Any word on this?
I encountered this issue recently after updating LibreSSL. When using LibreSSL, the compile appears to be using blocks of code intended for versions of OpenSSL lower than 1.1.0, where some structs appear to be accessed directly. This probably isn't the proper solution, but my workaround was to make the configure script treat LibreSSL the same as OpenSSL >= 1.1.0 as follows: 1) From the port directory, `make patch` 2) Make the following change to work/alpine-9726c09/configure: --- configure.orig +++ configure @@ -19566,6 +19566,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } alpine_SSLPROVIDER="libressl" + CFLAGS="$CFLAGS -DOPENSSL_1_1_0 -DOPENSSL_API_COMPAT=0x10100000L" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3) Continue the build/install with `make`/`make install`/etc. Hopefully this points someone towards a more proper solution. While it appears to work as it should (for the mail/alpine port as well), it would be good if verified as flaw-free by others more familiar.
Is it still relevant?
As far as 2024Q2 goes, yes. I am about to dive into Q3, but I'd imagine since nothing appears to have changed that the issue is still there.
Created attachment 251991 [details] libressl fix for mail/alpine Add CFLAGS, based on Scuff's comment (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269064#c2).
Could you please test this patch? For me it's work.
This builds as of 2023Q4. We will be testing execution within a couple weeks.
Dave, works well?
Yeah we are blocked from upgrading due to another port. I'll keep you posted. It builds! :D
Committed, thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0f11f7ee593b45cf420f0d48246e14d979cb8452 commit 0f11f7ee593b45cf420f0d48246e14d979cb8452 Author: Zsolt Udvari <uzsolt@FreeBSD.org> AuthorDate: 2024-10-28 06:31:09 +0000 Commit: Zsolt Udvari <uzsolt@FreeBSD.org> CommitDate: 2024-10-28 06:31:09 +0000 mail/alpine: fix build with libressl PR: 269064 Reported by: Dave Hayes <dave@jetcafe.org> Approved by: maintainer timeout (3+ months) mail/alpine/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)