From nobody Fri Mar 13 08:32:54 2026 X-Original-To: dev-commits-ports-all@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 4fXHmk5bq2z6VhsP for ; Fri, 13 Mar 2026 08:32:54 +0000 (UTC) (envelope-from git@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fXHmk543kz3xr3 for ; Fri, 13 Mar 2026 08:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773390774; 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=5cRjAGca7abzRuYXJpNya0Mc4qQtq38+8YlA8+OeCYo=; b=Hl4Rtr9rE+LkWMh8yJZ1XSpiKrPRFsLmJDFz6K1lkpmsonT+0bb8MDwPVgEhawg2SA7Ttm gMpockysHJYsWH4Kxxc+93LQ7/KCLZs5DwQufJNA6U1+hHf/k8HBjrW+NqhOCYCKpNp+hB etjoxRmu9Hw1zd9R5KlQKpuvZOetbBPg8M50ismU9s4mSLsEgd6qn3C/V7TZ1rUgl+1HkY 5AUV8aldcIWuv79SjSPbZCbTJWv7pSdT0F+VE8lEMOmQiUBbAzKZ4f8tnEReebrfAyQY3q 05ISs+FUIQNyaafwnb3aRiEnSJiyaa6b9k5k8d8Y1mV7g95Qe3Vw4D7XQMpKzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1773390774; a=rsa-sha256; cv=none; b=WqV0UBV/BMfYszA68m7YLnKuH5MMSFjak8di+dSn2ipgPoy9sBdFO5gMaszzJI8txPxovi EUjD5lcYsqltKcvrHHodubwdYagKddZgpdFQlIb6jbeQWAAcFwn8AL89y0gCh3B5eFq/9l +lmF0tEDNiyAkFYy4Z1+mbBgxOfuXCOFcTXsnx8K7Au2vVdjn3qXZc9jjbAuuUxmOUx/RL 2SS8dw062XWiGiFxFXaHDMejrt+USSJF4ZOWAvTL9JCl/el/Xo+hF4q8vW5lse5TV1m/+7 tz7n8/MFWNxskVn55u2GOi8E2zLnMerKVL3FtIu+dAv66TQ9EDS+UANxTpTTvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773390774; 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=5cRjAGca7abzRuYXJpNya0Mc4qQtq38+8YlA8+OeCYo=; b=gqHcGRIGA1oRHEKBGw00ectItrSUtS+tZg9kx29toXTow6uIVBnbvx6gnXJJ6pjsWxFlBV Z+h9TN1XMpCrM1su9wYmFSk45JJoZ5IH3HL7m+rG0jgKuYeHRCs66YAqolQ2PAINNDO45s KzXSHZ3MhqStPw2ioI0uINojoiAwVNp5+WPjEN3o5d61/zH9GYq8UN6JBhKgL1QYTJAGJe h9yij1PkV26LxozLG66DSb12Eky/e6KDBlSS+8ryIvKvUoSl6mNb026pcMRo1kr7Dn8XJ8 8KIifTsphFxleO+kMXYhPYdKeLnhN/HXbPUkbCQX6+xI0yWJ4tmJaPfdTo2HOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fXHmk4gYgz8cM for ; Fri, 13 Mar 2026 08:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39642 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Mar 2026 08:32:54 +0000 To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Dimitry Andric Subject: git: b002c40dc191 - 2026Q1 - science/py-tensorflow: fix build with libc++ 21 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/2026Q1 X-Git-Reftype: branch X-Git-Commit: b002c40dc191a929fc18fe6d7e44871a7d082400 Auto-Submitted: auto-generated Date: Fri, 13 Mar 2026 08:32:54 +0000 Message-Id: <69b3cbb6.39642.4a2403d4@gitrepo.freebsd.org> The branch 2026Q1 has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=b002c40dc191a929fc18fe6d7e44871a7d082400 commit b002c40dc191a929fc18fe6d7e44871a7d082400 Author: Dimitry Andric AuthorDate: 2026-02-23 13:18:05 +0000 Commit: Dimitry Andric CommitDate: 2026-03-13 08:32:47 +0000 science/py-tensorflow: fix build with libc++ 21 With libc++ 21 science/py-tensorflow fails to build, with errors similar to: In file included from tensorflow/tsl/framework/allocator_registry.cc:16: In file included from ./tensorflow/tsl/framework/allocator_registry.h:23: In file included from ./tensorflow/tsl/framework/allocator.h:28: ./tensorflow/tsl/framework/type_traits.h:96:8: error: 'is_signed' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization] 96 | struct is_signed : public is_signed {}; | ^ /usr/include/c++/v1/__type_traits/is_signed.h:25:8: note: marked '_Clang::no_specializations' here 25 | struct _LIBCPP_NO_SPECIALIZATIONS is_signed : _BoolConstant<__is_signed(_Tp)> {}; | ^ /usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS' 1167 | [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]] | ^ and later: tensorflow/lite/kernels/elementwise.cc:245:14: error: no matching function for call to 'EvalImpl' 245 | return EvalImpl(context, node, std::abs, type); | ^~~~~~~~~~~~~~~ tensorflow/lite/kernels/elementwise.cc:192:21: note: candidate function template not viable: no overload of 'abs' matching 'std::function' for 3rd argument 192 | inline TfLiteStatus EvalImpl(TfLiteContext* context, TfLiteNode* node, | ^ 193 | std::function func, | ~~~~~~~~~~~~~~~~~~~~~~~~ The former is fixed by https://github.com/openxla/xla/commit/0cead9f, which unfortunately happened after tsl got split off from tensorflow into a bunch of separate projects. The latter is fixed as part of https://github.com/tensorflow/tensorflow/commit/358119a, but that commit is quite large. Only the changes to elementwise.cc need to be applied. PR: 293384 Approved by: maintainer timeout (2 weeks) MFH: 2026Q1 (cherry picked from commit 814f8741c251862849f74431be09c0ab969e936a) --- .../patch-tensorflow_lite_kernels_elementwise.cc | 22 ++++++++++++++++++++++ .../patch-tensorflow_tsl_framework_type__traits.h | 21 +++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/science/py-tensorflow/files/patch-tensorflow_lite_kernels_elementwise.cc b/science/py-tensorflow/files/patch-tensorflow_lite_kernels_elementwise.cc new file mode 100644 index 000000000000..7fad158af10a --- /dev/null +++ b/science/py-tensorflow/files/patch-tensorflow_lite_kernels_elementwise.cc @@ -0,0 +1,22 @@ +--- tensorflow/lite/kernels/elementwise.cc.orig 2023-09-12 16:46:28 UTC ++++ tensorflow/lite/kernels/elementwise.cc +@@ -242,7 +242,8 @@ TfLiteStatus AbsEval(TfLiteContext* context, TfLiteNod + const TfLiteType type = input->type; + switch (type) { + case kTfLiteFloat32: +- return EvalImpl(context, node, std::abs, type); ++ return EvalImpl( ++ context, node, [](float f) { return std::abs(f); }, type); + case kTfLiteInt8: + return AbsEvalQuantized(context, node, type); + case kTfLiteInt16: +@@ -250,7 +251,8 @@ TfLiteStatus AbsEval(TfLiteContext* context, TfLiteNod + ? AbsInt16EvalImpl(context, node, type) + : AbsEvalQuantized(context, node, type); + case kTfLiteInt32: +- return EvalImpl(context, node, std::abs, type); ++ return EvalImpl( ++ context, node, [](int32_t i) { return std::abs(i); }, type); + default: + TF_LITE_KERNEL_LOG(context, "Current data type %s is not supported.", + TfLiteTypeGetName(type)); diff --git a/science/py-tensorflow/files/patch-tensorflow_tsl_framework_type__traits.h b/science/py-tensorflow/files/patch-tensorflow_tsl_framework_type__traits.h new file mode 100644 index 000000000000..8b2cfe43ee49 --- /dev/null +++ b/science/py-tensorflow/files/patch-tensorflow_tsl_framework_type__traits.h @@ -0,0 +1,21 @@ +--- tensorflow/tsl/framework/type_traits.h.orig 2023-09-12 16:46:28 UTC ++++ tensorflow/tsl/framework/type_traits.h +@@ -91,18 +91,6 @@ class numeric_limits : public numeric_lim + template <> + class numeric_limits : public numeric_limits {}; + +-// Specialize is_signed for quantized types. +-template <> +-struct is_signed : public is_signed {}; +-template <> +-struct is_signed : public is_signed {}; +-template <> +-struct is_signed : public is_signed {}; +-template <> +-struct is_signed : public is_signed {}; +-template <> +-struct is_signed : public is_signed {}; +- + } // namespace std + + #endif // TENSORFLOW_TSL_FRAMEWORK_TYPE_TRAITS_H_