From nobody Sat Aug 31 06:29:41 2024 X-Original-To: freebsd-arm@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 4WwlVs046vz5Thq3 for ; Sat, 31 Aug 2024 06:29:56 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-25.consmr.mail.gq1.yahoo.com (sonic312-25.consmr.mail.gq1.yahoo.com [98.137.69.206]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WwlVq5jlmz4cPm for ; Sat, 31 Aug 2024 06:29:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=fNyhEiKS; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.206 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1725085793; bh=yFhJM/49Ko0Yn9zKhh8Wg9Rs4NpkIRAFo7hNVnSVM/I=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=fNyhEiKSAovKkIfwn0nhNF/mQLiUcbHgeFE5aKxrERE0tgzJ+g6bGYo4sgItANVLsLsVc5qDOtyEVvJmUBOdIJCqZz457t2Mx9SYNl1A6vVco5Xq2LxNRKAMMwlL05t6Ij+KSFIViHB6S81ioTW739xccHntUeZcrCnsfZt3AV26FUN6MNOrO3U5Qeqa3GzS7mUMQPwAjX+N+TZrKMyMCMl8Exf5O33PTRFRDbtPMUJFCLt+ov7yPL6JLzwRhsjz800lQPs0xbxWuulUA0gzBUM5qis+Kwkdlllw3qF9ujpHcZat0iofQzQVWav87+YImx7y3lelFV000sm5KbW90A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1725085793; bh=fYRcPIJx2TudAaiPpwz0g9QhzNG7fWyVjo2mSJp+3Qa=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=UVMCsRFsPEXEH1m1cWIM0s2R1GkcMoGLe+llhNgJZ05MG24Z2Bu5S3meK3VV9m3fpldSB1oOE9QSLOy/+ewhvtsLj8UsIkZy4BayUwYkSFuxHnPOZNZ8Ghva7Whf/nRH7QESmxyeNpb1wuKluaPaIqNvp1QsjkLW8sjEocU1Rcw9AR5rnSHcAc+rEXJdP5CbgXdk7l8tV20vkr/FObG05t/NgW/wjMc8vZ3tA20XwZPhuBHzddybEUs8pHIKkdcn4JykRlnZarcf6Sdc/8rw54WZOvbn+/+4uAIjMbpd8HBxEcm7x0HmfJoSsFxZ1kCxgAXIq3OYerVg3E2Dg8L5xA== X-YMail-OSG: iIg5w_wVM1lmxfegFm3BrEWRbROG254H6gzjXunrTIfBMhG6xvPEUZ8P443.7zp UGn6uJq5nXr64S5cWZilAss05xM_tPHM_mLFtMPfEPnI3RBkTqnDNR.luFD_l3OC5B.2bzPclUkE Pq3RECaF5wA4iENLqBEMVXukxagPyij1NixP84nHlAnwbXsgCtzrVSp1YUE0B0A_WvKSofJXMWGp 3gyC0r8zoT3n1Xwatj9W_x5Gh_xAZxRqsDe3sp.sLSrL.nAQC_8udxjNHu5gXbNNfCrp4u4dB9w8 SdrzSxkzTzrZHrW.TGJUMV8ISmzxtVRnmTl5fNEdSV5eNGhRzv3DKCwsFKpjOtd.sazAkiiqYkcL pE32vIYQd4HMg9sC3YEL0BJHJTNza5NPkCqmD0aWoN5AdtbtugB5v43kb5KPxbsfZn1xoc1orPK3 G5pdmzQ.aCHzXN.8oD50YtFg56QKWIN4nqOzgPNLNrNw.Ie3Ex5.fX8olT7YE_hyTl4pJULeVABZ L4YKfZyR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6MZ6JcllFolMdxlr169GSUAHK44TT77XepoEDAWCZT7CRAh74DXNLL1hEgDZvigiHpa 1ZIPO6acWZZZmQiVG8ylfWbwGdYQhWh3P0Y32LgFW2HdJriqo1bJ2ci7Scx8pN.0U4AQNL5e9BDB _Zh4GGaJjdVOCXdXUC4yQIwnu6QR_yM2W4DRr961GHMbIlhoagQ4NpFihZnwVfMiLykbFVFUiTMu 73DEawkUxa6jABClDo8odsJcQOpUvLxgMF60Y33DDsEv6_xDtljJC0StlDLMtO0_VRwUiB8TW6Pz nynrmfhHaN8JgSMU5Q0lfz0qQwq28.s9eFLCet8CMPHxrp2JAe7Dr2VVyAd8PN3o4_YNYuM4xyNU E5RtQ.DtbfhpfnyEnPXJLY2R_VF0.1PzAkCnSYWqw8P2h1vlQULOe525APO9sCKEuxOrCYyuxbzJ qGcX.0xaDnK4HMxLX5_nBcSYqL9vrIVJ6luWHqeRqcBapg7VRyf_B_pCUKpLO2npOjmO76tfqrlk B8Rva_FCOn.2NgCJDgbEOUM89SziWZgH2Iceqk2z51mZmel4HUx.eHG3IUyt0jmD0hymTpumbwFy g5_AJX1e7SlFSLn..JOrc6uu0j2HTmTqpTTgJkd49JxXFwUp131g_Yd7F.h525qpcRioUZEBbbus EKbAzrBNoVUy8aooYFYxdi.QCtcSSI75sZDz0s9b1gkAUogTikaG.E0UUsEqx X-Sonic-MF: X-Sonic-ID: c0da4511-f563-4780-a578-314ccec1658a Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Sat, 31 Aug 2024 06:29:53 +0000 Received: by hermes--production-gq1-5d95dc458-6q8w6 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 8883d9e59274279e414ddca33421ea99; Sat, 31 Aug 2024 06:29:52 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: For an armv7 context, /usr/local/llvm1[789]/lib/clang/1[789]/include/arm_bf16.h does not exist: one thing blocking a firefox build via llvm1[78] From: Mark Millard In-Reply-To: Date: Fri, 30 Aug 2024 23:29:41 -0700 Cc: FreeBSD Toolchain , Brooks Davis , Tomoaki AOKI Content-Transfer-Encoding: quoted-printable Message-Id: <24D56998-0939-43D0-A98C-E398CCDA0AAA@yahoo.com> References: <75609A57-7B50-40F5-88A8-0278CCCC018B@yahoo.com> To: FreeBSD Mailing List , FreeBSD ARM List X-Mailer: Apple Mail (2.3776.700.51) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.89 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.89)[-0.889]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; DKIM_TRACE(0.00)[yahoo.com:+]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.206:from]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.206:from]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4WwlVq5jlmz4cPm On Aug 30, 2024, at 22:05, Mark Millard wrote: > On Aug 30, 2024, at 21:26, Mark Millard wrote: >=20 >> On Aug 30, 2024, at 20:33, Mark Millard wrote: >>=20 >>> [Subject was retitled.] >>>=20 >>> On Aug 30, 2024, at 16:24, Mark Millard wrote: >>>=20 >>>> What my test-of-building got was: No include file = found and >>>> no OFlags::TMPFILE found (OFlags:: was found, TMPFILE in OFlags:: = was not): >>>>=20 >>>> In file included from = /wrkdirs/usr/ports/www/firefox/work/firefox-129.0.2/mfbt/lz4/xxhash.c:43: >>>> In file included from = /wrkdirs/usr/ports/www/firefox/work/firefox-129.0.2/mfbt/lz4/xxhash.h:3434= : >>>> /usr/local/llvm17/lib/clang/17/include/arm_neon.h:37:10: fatal = error: 'arm_bf16.h' file not found >>>> 37 | #include >>>> | ^~~~~~~~~~~~ >>>> . . . >>>>=20 >>>> error[E0599]: no associated item named `TMPFILE` found for struct = `backend::fs::types::OFlags` in the current scope >>>> --> = /wrkdirs/usr/ports/www/firefox/work/firefox-129.0.2/third_party/rust/rusti= x/src/backend/libc/fs/syscalls.rs:144:32 >>>> | >>>> 144 | if oflags.contains(OFlags::TMPFILE) && = crate::backend::if_glibc_is_less_than_2_25() { >>>> | ^^^^^^^ associated item not = found in `OFlags` >>>> | >>>> ::: = /wrkdirs/usr/ports/www/firefox/work/firefox-129.0.2/third_party/rust/rusti= x/src/backend/libc/fs/types.rs:203:1 >>>> | >>>> 203 | / bitflags! { >>>> 204 | | /// `O_*` constants for use with [`openat`]. >>>> 205 | | /// >>>> 206 | | /// [`openat`]: crate::fs::openat >>>> ... | >>>> 333 | | } >>>> 334 | | } >>>> | |_- associated item `TMPFILE` not found for this struct >>>> | >>>> . . . >>>> =3D note: this error originates in the macro = `$crate::__impl_bitflags` which comes from the expansion of the macro = `bitflags` (in Nightly builds, run with -Z macro-backtrace for more = info) >>>>=20 >>>> . . . >>>>=20 >>>> error[E0599]: no associated item named `TMPFILE` found for struct = `backend::fs::types::OFlags` in the current scope >>>> --> = /wrkdirs/usr/ports/www/firefox/work/firefox-129.0.2/third_party/rust/rusti= x/src/backend/libc/fs/syscalls.rs:207:32 >>>> | >>>> 207 | if oflags.contains(OFlags::TMPFILE) && = crate::backend::if_glibc_is_less_than_2_25() { >>>> | ^^^^^^^ associated item not = found in `OFlags` >>>> | >>>> ::: = /wrkdirs/usr/ports/www/firefox/work/firefox-129.0.2/third_party/rust/rusti= x/src/backend/libc/fs/types.rs:203:1 >>>> | >>>> 203 | / bitflags! { >>>> 204 | | /// `O_*` constants for use with [`openat`]. >>>> 205 | | /// >>>> 206 | | /// [`openat`]: crate::fs::openat >>>> ... | >>>> 333 | | } >>>> 334 | | } >>>> | |_- associated item `TMPFILE` not found for this struct >>>> | >>>> . . . >>>> =3D note: this error originates in the macro = `$crate::__impl_bitflags` which comes from the expansion of the macro = `bitflags` (in Nightly builds, run with -Z macro-backtrace for more = info) >>>>=20 >>>> . . . >>>> =3D note: this error originates in the macro = `$crate::__impl_bitflags` which comes from the expansion of the macro = `bitflags` (in Nightly builds, run with -Z macro-backtrace for more = info) >>>>=20 >>>> For more information about this error, try `rustc --explain E0599`. >>>> error: could not compile `rustix` (lib) due to 2 previous errors >>>>=20 >>>>=20 >>>> For reference: >>>>=20 >>>> # uname -apKU >>>> FreeBSD aarch64-main-pbase 15.0-CURRENT FreeBSD 15.0-CURRENT #8 = main-n271819-5cbb98c8259c-dirty: Fri Aug 23 22:06:47 PDT 2024 = root@aarch64-main-pbase:/usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src= /arm64.aarch64/sys/GENERIC-NODBG-CA76 arm64 aarch64 1500023 1500023 >>>>=20 >>>> # ~/fbsd-based-on-what-commit.sh -C /usr/ports/ >>>> 87a38a839ab8 (HEAD -> main, freebsd/main, freebsd/HEAD) = net-im/dissent: update package description >>>> Author: Jan Beich >>>> Commit: Jan Beich >>>> CommitDate: 2024-08-24 18:30:01 +0000 >>>> branch: main >>>> merge-base: 87a38a839ab83c2def100a0975a7afb29e873cf2 >>>> merge-base: CommitDate: 2024-08-24 18:30:01 +0000 >>>> n674987 (--first-parent --count for merge-base) >>>>=20 >>>> But firefox was updated to use: nss>=3D3.103:security/nss to match = what was >>>> available. >>>=20 >>>=20 >>> Using devel/llvm18 instead got the same. >>>=20 >>> Looking inside even a /usr/local/llvm19/lib/clang/19/include/ >>> also shows the arm_bf16.h file is not present. By contrast, >>> for an aarch64 context: >>>=20 >>> # file /usr/local/llvm19/lib/clang/19/include/arm_bf16.h >>> /usr/local/llvm19/lib/clang/19/include/arm_bf16.h: C source, ASCII = text >>>=20 >>> Looking quickly at more llvm* shows: >>>=20 >>> # grep -r arm_bf16 /usr/ports/devel/llvm1*/ | more >>> = /usr/ports/devel/llvm11/pkg-plist:%%CLANG%%llvm%%LLVM_SUFFIX%%/lib/clang/%= %LLVM_RELEASE%%/include/arm_bf16.h >>> = /usr/ports/devel/llvm12/pkg-plist:%%CLANG%%llvm%%LLVM_SUFFIX%%/lib/clang/%= %LLVM_RELEASE%%/include/arm_bf16.h >>> = /usr/ports/devel/llvm13/pkg-plist:%%CLANG%%llvm%%LLVM_SUFFIX%%/lib/clang/%= %LLVM_RELEASE%%/include/arm_bf16.h >>> /usr/ports/devel/llvm14/Makefile:_BE_INCS_ARM=3D arm_bf16.h = arm_cde.h arm_fp16.h arm_mve.h arm_neon.h arm_sve.h >>> /usr/ports/devel/llvm15/Makefile:_BE_INCS_ARM=3D arm_bf16.h = arm_cde.h arm_fp16.h arm_mve.h arm_neon.h arm_sve.h >>> /usr/ports/devel/llvm16/files/patch-backport-llvm-db49231: = `arm_sve.h` and `arm_bf16.h`, and all those generated files will contain = a >>> /usr/ports/devel/llvm16/files/patch-backport-llvm-db49231: = `arm_bf16.h` immediately before their own typedef: >>> /usr/ports/devel/llvm16/files/patch-backport-llvm-db49231: = #include >>> /usr/ports/devel/llvm16/files/patch-backport-llvm-db49231: Since = `arm_bf16.h` is very likely supposed to be the one true place where >>> /usr/ports/devel/llvm16/files/patch-backport-llvm-db49231: OS << = "#include \n"; >>> /usr/ports/devel/llvm16/files/patch-backport-llvm-db49231: OS << = "#include \n"; >>> /usr/ports/devel/llvm16/Makefile:_BE_INCS_ARM=3D arm_bf16.h = arm_cde.h arm_fp16.h arm_mve.h arm_neon.h arm_sve.h >>> /usr/ports/devel/llvm17/Makefile:_BE_INCS_AArch64=3D arm_bf16.h = arm_sme_draft_spec_subject_to_change.h >>> /usr/ports/devel/llvm18/Makefile:_BE_INCS_AArch64=3D arm_bf16.h >>> /usr/ports/devel/llvm19/Makefile:_BE_INCS_AArch64=3D arm_bf16.h >>>=20 >>> llvm1[456] had _BE_INCS_ARM containing arm_bf16.h (and more). >>> llvm1[789] do not. >>>=20 >>> I wonder if: >>>=20 >>> = https://cgit.freebsd.org/ports/commit/devel/llvm17/Makefile?id=3D778e212f2= 34a825c5e19612df4be2e8f838cb024 >>>=20 >>> doing: >>>=20 >>> -_BE_INCS_ARM=3D arm_bf16.h arm_cde.h arm_fp16.h arm_mve.h = arm_neon.h arm_sve.h >>> +_BE_INCS_ARM=3D arm_cde.h arm_fp16.h arm_mve.h arm_neon.h arm_sve.h >>>=20 >>> was correct. I'll note that in an armv7 context: >>>=20 >>> # find /usr/local/*/gcc14/ -name arm_bf16.h -print >>> = /usr/local/lib/gcc14/gcc/armv7-portbld-freebsd15.0/14.2.0/include/arm_bf16= .h >>>=20 >>> suggesting that gcc14 considers the file as not aarch64 specific but >>> as armv7 compatibile. >>=20 >> I got that wrong! arm vs. aarch64 have different source files with = the >> same name (under different paths): >>=20 >> gcc/gcc/config/arm/arm_bf16.h has guard test: #ifndef = _GCC_ARM_BF16_H >> gcc/gcc/config/aarch64/arm_bf16.h has guard test: #ifndef = _AARCH64_BF16_H_ >>=20 >> (More content is different.) >=20 > As for llvm*: >=20 > clang/lib/Basic/Targets/ARM.cpp has: >=20 > if (HasBFloat16) { > Builder.defineMacro("__ARM_FEATURE_BF16", "1"); > Builder.defineMacro("__ARM_FEATURE_BF16_VECTOR_ARITHMETIC", "1"); > Builder.defineMacro("__ARM_BF16_FORMAT_ALTERNATIVE", "1"); > } >=20 > clang/lib/Basic/Targets/AArch64.cpp has: >=20 > if (HasBFloat16) { > Builder.defineMacro("__ARM_FEATURE_BF16", "1"); > Builder.defineMacro("__ARM_FEATURE_BF16_VECTOR_ARITHMETIC", "1"); > Builder.defineMacro("__ARM_BF16_FORMAT_ALTERNATIVE", "1"); > } >=20 > which suggests bf16 support has 32-bit support (even if it is armv8 > 32-bit). Looking for AArch32 state in: >=20 > DDI0487K_a_a-profile_architecture_reference_manual.pdf >=20 > it says (via the AArch32 column of a table): >=20 > BF16 Supported if FEAT_AA32BF16 is implemented. >=20 > Looks to me like the removal of arm_bf16.h for llvm target ARM > was incorrect. >=20 >>> So I've put arm_bf16.h back into the llvm18 test context and = sometime >>> after 3 hrs I should be able to report on a firefox build attempt = with >>> the change (I hope). >>=20 >=20 So, it no longer failed for amd_bf16.h being missing. But it still has the lack-of OFlags::TMPFILE problem that stops the = build. =3D=3D=3D Mark Millard marklmi at yahoo.com