From: Theo Buehler Subject: Re: Enable threads support in openssl/3.3 To: Volker Schlecht Cc: ports , Fabien Romano Date: Tue, 17 Jun 2025 17:46:44 +0200 On Mon, Jun 16, 2025 at 09:45:00PM +0200, Theo Buehler wrote: > On Mon, Jun 16, 2025 at 09:36:57PM +0200, Volker Schlecht wrote: > > Hi, > > > > Fabien Romano found out that lang/node is assuming that threads support > > is enabled in OpenSSL. In our port, it isn't - which means that some > > (all?) async crypto functions of the NodeJS API are mostly broken. > > > > With the attached patch, lang/node seems happier. > > > > opinions? oks? > > I'm fine with this, but it needs to be done for all three openssl copies > we have. Since everybody else will have this option enabled, it feels > like a bad idea to deviate. Unless there are objections I will take care > of this in a few days along with the required bumping of the dependent > statically linked ports. > > It looks like something that was copied over from the initial port > for 1.0.1h and never revisited. So here is the diff I plan to commit. Tested on aarch64, amd64, i386 and sparc64. I also ran node regress on aarch64 and i386, where the former was happy and the latter complained about an atexit thing. Shrug. I switched sparc64 to ports-gcc since the old gcc 4.2.1 is too old for C11 atomics, and the fallback code was just as poorly tested as it was written - and it would require a horrid patch fest. If you must know: https://github.com/openssl/openssl/issues/26740 I don't trust that fallback code (patched or not) one millimeter. Any concerns? Index: 3.3/Makefile =================================================================== RCS file: /cvs/ports/security/openssl/3.3/Makefile,v diff -u -p -r1.14 Makefile --- 3.3/Makefile 16 Jun 2025 13:56:20 -0000 1.14 +++ 3.3/Makefile 16 Jun 2025 20:24:19 -0000 @@ -12,13 +12,16 @@ PKGNAME= openssl-${V} PKGSPEC= openssl->=3.3v0,<3.4v0 EPOCH= 0 -REVISION= 0 +REVISION= 1 SHLIBVER= 27.0 SHARED_LIBS= crypto ${SHLIBVER} \ ssl ${SHLIBVER} -WANTLIB= c +COMPILER= base-clang ports-gcc +COMPILER_LANGS= c + +WANTLIB= c pthread DEBUG_PACKAGES = ${BUILD_PACKAGES} @@ -26,7 +29,7 @@ CONFIGURE_STYLE= simple CONFIGURE_SCRIPT= config CONFIGURE_ARGS+= --prefix=${PREFIX} \ --openssldir=/etc/ssl \ - no-threads no-rc5 no-ssl3 \ + no-rc5 no-ssl3 \ no-devcryptoeng \ shared Index: 3.4/Makefile =================================================================== RCS file: /cvs/ports/security/openssl/3.4/Makefile,v diff -u -p -r1.5 Makefile --- 3.4/Makefile 10 Mar 2025 13:52:44 -0000 1.5 +++ 3.4/Makefile 16 Jun 2025 21:34:04 -0000 @@ -9,13 +9,16 @@ PKGNAME= openssl-${V} PKGSPEC= openssl->=3.4v0,<3.5v0 EPOCH= 0 -REVISION= 0 +REVISION= 1 SHLIBVER= 32.0 SHARED_LIBS= crypto ${SHLIBVER} \ ssl ${SHLIBVER} -WANTLIB= c +COMPILER= base-clang ports-gcc +COMPILER_LANGS= c + +WANTLIB= c pthread DEBUG_PACKAGES = ${BUILD_PACKAGES} @@ -23,7 +26,7 @@ CONFIGURE_STYLE= simple CONFIGURE_SCRIPT= config CONFIGURE_ARGS+= --prefix=${PREFIX} \ --openssldir=/etc/ssl \ - no-threads no-rc5 no-ssl3 \ + no-rc5 no-ssl3 \ no-devcryptoeng \ shared Index: 3.5/Makefile =================================================================== RCS file: /cvs/ports/security/openssl/3.5/Makefile,v diff -u -p -r1.2 Makefile --- 3.5/Makefile 16 Jun 2025 13:56:20 -0000 1.2 +++ 3.5/Makefile 17 Jun 2025 15:39:12 -0000 @@ -12,11 +12,16 @@ PKGNAME= openssl-${V} PKGSPEC= openssl->=3.5v0,<3.6v0 EPOCH= 0 +REVISION= 0 + SHLIBVER= 37.0 SHARED_LIBS= crypto ${SHLIBVER} \ ssl ${SHLIBVER} -WANTLIB= c +COMPILER= base-clang ports-gcc +COMPILER_LANGS= c + +WANTLIB= c pthread DEBUG_PACKAGES = ${BUILD_PACKAGES} @@ -24,7 +29,7 @@ CONFIGURE_STYLE= simple CONFIGURE_SCRIPT= config CONFIGURE_ARGS+= --prefix=${PREFIX} \ --openssldir=/etc/ssl \ - no-threads no-rc5 no-ssl3 \ + no-rc5 no-ssl3 \ no-devcryptoeng \ shared