From nobody Sun Aug 1 05:08:37 2021 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BEA4812B4BDB for ; Sun, 1 Aug 2021 05:08:40 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gcq0m4Q15z4h4X; Sun, 1 Aug 2021 05:08:40 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1627794520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Fx2waT/muEOoVsFBPyd+5fNaJG2lEYCBGDtOMwPl49c=; b=YQ4zcmnoepStslAoTu06X9Dck91z+J2dAVDcnyAVc/aQUlELZcyav9sY2A1BXpveQQtOn8 4fcc11nOzQwL6yerBpNvl3i5ZVTrrZ+BIW1VJ9DZphcmTwx9g/9xkHhDFWyrOz0zqod0EN HK7Wo+Gnyve3BPNO5ADCYGSaljh6Rr+gnTvrrld04qxAX+22SlE0px/SSp+1dWPoulOaTL r25C1+pioZa3sQAGKmSs3ATpQ/mMCaU1HGqlpPw4kr2oxC4iuigsCv4XmcBPefVycB/TJR T400jeDnWeOkF0u82SzOeV2y9jjnNCNsihLZrkjyVRhwiQ7+t31ZLGARRCTcGg== Received: by freefall.freebsd.org (Postfix, from userid 1354) id 779234B3A; Sun, 1 Aug 2021 05:08:40 +0000 (UTC) From: Jan Beich To: Bernard Spil Cc: freebsd-ports@freebsd.org Subject: Re: OpenSSL 3.0.0 on i386 failing to build References: Date: Sun, 01 Aug 2021 07:08:37 +0200 In-Reply-To: (Bernard Spil's message of "Thu, 29 Jul 2021 23:05:03 +0200") Message-ID: List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1627794520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Fx2waT/muEOoVsFBPyd+5fNaJG2lEYCBGDtOMwPl49c=; b=uMGGMbwy+z3Aal61P+vbmEzxFTgagTOoSWLZqJZo64hUd3POTwWcLfXOmb1KRcCIS4XdlQ RSVb9gSKijfXvnVw/vrFVjPtjygoCBlKqVYYgGz4/mhTreUN0ZmhQsElRnGoAlwa3Hu7+z NNASzjtIEjasMJAEJkvUOmKjnFmxnPpxcN3zoHYQrxTn6JA1tRe2Bxtz1p1ZaObcmkPrln 10F1Bdd2EV3qp37Fa9C1qkWkP58nRMfVWhcLEGiEh3I4loISZ/vC8bxsdgWDO+LaOyqYFS LwdYP6IlS4Tw1wrjwcsEo2Lt2qnSYlbapS3mxw6lP3X9DzOL4IxErL+XDdondg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1627794520; a=rsa-sha256; cv=none; b=hNyx9K9WLCsqVfxQ0rDXlI14B6SiTVdc96BjgDTZFF/GGrcL5ld610Ow6xncJ6RIvRf6OK IVmwv5hRPiZXCjfVjIrIhdqPR5WGshC7AfzmoS3/gyoiCHDajSBaWluqLdrPlzCNhf0/mV u+K+xFVCHJPrCnIqsqw0k8SPNVYPEHBuBPkbeV+KAYQNYW61TL1eQ6dZT7iH88kEoMk3Mt je2PXYbEs8VaPP08g/Q0Kg3S96tB0bGOWr3jCqbO0SB4hxRwnoSNPDFV9wQu+9YOCQoTVZ MRHxU8cSnaB3JHdzo5V24l5z1mIZV7QW3rLTcwl+ia3tqy0O7VjbrGlhDz8/Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --=-=-= Content-Type: text/plain Bernard Spil writes: > Hi all, > > The OpenSSL 3.0.0 port (currently beta2) is failing on i386 due to > missing atomic on i386 > >> ld: error: undefined symbol: __atomic_is_lock_free > > Poudriere logs on vanilla FreeBSD > https://brnrd.eu/poudriere/data/114i386-git/2021-07-29_17h04m18s/logs/errors/openssl-devel-3.0.0.b2.log > https://brnrd.eu/poudriere/data/122i386-git/2021-07-29_17h04m18s/logs/errors/openssl-devel-3.0.0.b2.log Did you try on 14.0-CURRENT? It should build fine without patches. > This is apparently the last Release Candidate for OpenSSL 3.0.0. Would > appreciate anyone to help fix this, preferably without requiring GCC. Try the fallback a la (example attached) or exclude atomic calls on i386. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=naive.diff Content-Description: patch against the port (apply via "git am") >From 232d20bde7bb902d60869fb732fec7ad1f211579 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sun, 1 Aug 2021 04:22:08 +0000 Subject: [PATCH] security/openssl-devel: unbreak on i386 via atomic stub Approved by: ? --- security/openssl-devel/Makefile | 2 -- .../files/patch-crypto_threads__pthread.c | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 security/openssl-devel/files/patch-crypto_threads__pthread.c diff --git a/security/openssl-devel/Makefile b/security/openssl-devel/Makefile index 9f18800fa823..5f18559936af 100644 --- a/security/openssl-devel/Makefile +++ b/security/openssl-devel/Makefile @@ -17,8 +17,6 @@ CONFLICTS_INSTALL= libressl-[0-9]* \ libressl-devel-[0-9]* \ openssl-[0-9]* -BROKEN_i386= ld: error: undefined symbol: __atomic_is_lock_free - HAS_CONFIGURE= yes CONFIGURE_SCRIPT= config CONFIGURE_ENV= PERL="${PERL}" diff --git a/security/openssl-devel/files/patch-crypto_threads__pthread.c b/security/openssl-devel/files/patch-crypto_threads__pthread.c new file mode 100644 index 000000000000..fbc67e3e8393 --- /dev/null +++ b/security/openssl-devel/files/patch-crypto_threads__pthread.c @@ -0,0 +1,20 @@ +Drop after FreeBSD 13.0/12.2 EOL around 2022-05-30 + +ld: error: undefined symbol: __atomic_is_lock_free +>>> referenced by threads_pthread.c +>>> libfips-lib-threads_pthread.o:(CRYPTO_atomic_or) in archive providers/libfips.a +>>> referenced by threads_pthread.c +>>> libfips-lib-threads_pthread.o:(CRYPTO_atomic_load) in archive providers/libfips.a + +--- crypto/threads_pthread.c.orig 2021-07-29 14:50:29 UTC ++++ crypto/threads_pthread.c +@@ -15,6 +15,9 @@ + + #if defined(__sun) + # include ++#elif defined(__clang__) && defined(__i386__) && __clang_major__ < 12 ++/* Until https://github.com/llvm/llvm-project/commit/00530dee5d12 */ ++#define __atomic_is_lock_free(size, ptr) ((void)(ptr), size <= sizeof(void *)) + #endif + + #if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG) && !defined(OPENSSL_SYS_WINDOWS) --=-=-=--