From nobody Tue Oct 25 11:31:52 2022 X-Original-To: ports-bugs@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 4MxVCD3b1Lz4gBSn for ; Tue, 25 Oct 2022 11:31:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MxVCD2PYSz3c0f for ; Tue, 25 Oct 2022 11:31:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MxVCD1N5Czc9R for ; Tue, 25 Oct 2022 11:31:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 29PBVqAl084600 for ; Tue, 25 Oct 2022 11:31:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 29PBVq87084599 for ports-bugs@FreeBSD.org; Tue, 25 Oct 2022 11:31:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 267333] security/s2n-tls: Fails to build when some variants of CPUTYPE is defined Date: Tue, 25 Oct 2022 11:31:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: diizzy@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: eduardo@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666697512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5EeGILS8i6l7AB/Ke50nbVmJkPSYyMBSx5utbrrpIs=; b=XRlkd1iYAjhKbdWOK/Nt5YZ83eDPC/a49hHOTp7OAn+UMl3l7geDcbW1tqiONEcFsdclm3 KmbH9Fz68NzVecICbfRN8KmVyQYi8NscKq1L3PG8BLqGbf4tI/FzWLw0SsJwksihChVP1u lqsc+xZzjnoH9TkJnQa01dCW9UezoAEJiEr4Ch3rOhVVZ1BifZfgvCVWalK1V45n80hRxC AGYWXjE/z/vYulgxsrO4a0shpuqONpge4JklEW+Te9luMF+l5kUuCU7Rrem3skJW1bSrmF xT9Y/GwK9+XbgIZC6jI/XmLznSbfZi13N+Zt+7tITUaBBCucMHJPKMOZO3XHIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666697512; a=rsa-sha256; cv=none; b=ecxC2lmfBYiv37K5cMxrcW+8BehLiJYgxq4W1TE+jlPp7Ggrcmc7+WMYVXkou15T33pLgo LVCQiiFdxUlBmwO3Fq30R29et4ZOjkwXtmt1pze6lsns25sRrHNrT77suiiXb4ceRvwffK u0XImHJSm9xE07M9/r1JmhoGjeqOL8Or+eXYBTm2as+Xrws3GNSiEfn5SZ8C37cijnhQhr GCfcHZtK8Ue7Y5CYOcvoU9yr84iDlpUlnOHimq9Du16FgWt4EeLevIhAw1k6PQfbafb4fb alL+DwYpa49PAycrzZLjqwiFRDjCv4gEH6i71CtDr6M8XY/acKe1qI/xfK02bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267333 Bug ID: 267333 Summary: security/s2n-tls: Fails to build when some variants of CPUTYPE is defined Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: eduardo@FreeBSD.org Reporter: diizzy@FreeBSD.org Assignee: eduardo@FreeBSD.org Flags: maintainer-feedback?(eduardo@FreeBSD.org) FAILED: CMakeFiles/s2n.dir/pq-crypto/kyber_r3/kyber512r3_cbd.c.o /usr/bin/cc -D_FORTIFY_SOURCE=3D2 -D_POSIX_C_SOURCE=3D200809L -Ds2n_EXPORTS -I/usr/ports/security/s2n-tls/work/s2n-tls-1.3.25 -I/usr/ports/security/s2n-tls/work/s2n-tls-1.3.25/api -O2 -pipe -march=3Dtigerlake -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -march=3Dtigerlake -fstack-protector-strong -fno-strict-aliasing -fPIC -pe= dantic -std=3Dgnu99 -Wall -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-align -Wwrite-strings -Wno-deprecated-declarations -Wno-unknown-pragmas -Wformat-security -Wno-missing-braces -Wa,--noexecstack -Werror -fvisibility=3Dhidden -DS2N_E= XPORTS -flto -DS2N_STACKTRACE -DS2N_CPUID_AVAILABLE -fPIC -DS2N_FALL_THROUGH_SUPPO= RTED -DS2N___RESTRICT__SUPPORTED -DS2N_MADVISE_SUPPORTED -DS2N_MINHERIT_SUPPORTED -DS2N_LIBCRYPTO_SUPPORTS_EVP_MD5_SHA1_HASH -DS2N_LIBCRYPTO_SUPPORTS_EVP_RC4 -DS2N_LIBCRYPTO_SUPPORTS_EVP_MD_CTX_SET_PKEY_CTX -MD -MT CMakeFiles/s2n.dir/pq-crypto/kyber_r3/kyber512r3_cbd.c.o -MF CMakeFiles/s2n.dir/pq-crypto/kyber_r3/kyber512r3_cbd.c.o.d -o CMakeFiles/s2n.dir/pq-crypto/kyber_r3/kyber512r3_cbd.c.o -c /usr/ports/security/s2n-tls/work/s2n-tls-1.3.25/pq-crypto/kyber_r3/kyber512= r3_cbd.c /usr/ports/security/s2n-tls/work/s2n-tls-1.3.25/pq-crypto/kyber_r3/kyber512= r3_cbd.c:5:1: error: expected identifier or '(' S2N_ENSURE_PORTABLE_OPTIMIZATIONS ^ /usr/ports/security/s2n-tls/work/s2n-tls-1.3.25/pq-crypto/s2n_pq_asm.h:26:5: note: expanded from macro 'S2N_ENSURE_PORTABLE_OPTIMIZATIONS' #error "Compiling portable code with non-portable assembly optimization= s. This can result in runtime crashes if artifacts are deployed to older CPU's without these CPU instructions" ^ /usr/ports/security/s2n-tls/work/s2n-tls-1.3.25/pq-crypto/kyber_r3/kyber512= r3_cbd.c:60:23: error: implicit declaration of function 'load32_littleendian' is invalid in= C99 [-Werror,-Wimplicit-function-declaration] uint32_t t =3D load32_littleendian(buf + 4 * i); ^ /usr/ports/security/s2n-tls/work/s2n-tls-1.3.25/pq-crypto/kyber_r3/kyber512= r3_cbd.c:60:23: note: did you mean 'load24_littleendian'? /usr/ports/security/s2n-tls/work/s2n-tls-1.3.25/pq-crypto/kyber_r3/kyber512= r3_cbd.c:37:17: note: 'load24_littleendian' declared here static uint32_t load24_littleendian(const uint8_t x[3]) { ^ 2 errors generated. Ugly hack is to define _CPUCFLAGS=3D in s2n's Makefile https://github.com/aws/s2n-tls/blob/main/CMakeLists.txt#L298 Having a quick look it seems (I may be reading it wrong) that anything that defines __AVX__ || __AVX2__ || __BMI2__ will fail. Reference: https://cgit.freebsd.org/src/tree/share/examples/etc/make.conf?h=3Dstable/13 Tested on FreeBSD 13.1-STABLE ( CPUTYPE?=3Dtigerlake in /etc/make.conf) --=20 You are receiving this mail because: You are the assignee for the bug.=