Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jan 2026 18:19:59 +0000
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3bd3c194d694 - main - misc/py-pytorch: fix build with clang >= 19 and libc++ 21
Message-ID:  <697e47cf.22ad4.4bc6eb42@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3bd3c194d694c34c2b6a8e0ee93b78e2f1a65a9f

commit 3bd3c194d694c34c2b6a8e0ee93b78e2f1a65a9f
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-01-22 19:22:17 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-01-31 18:18:19 +0000

    misc/py-pytorch: fix build with clang >= 19 and libc++ 21
    
    In ports f07b5ade5369 misc/py-pytorch was forced onto llvm:max=15, with
    the reason "fix build on 14". Remove this, and add a patch to make it
    build with clang >= 19 and libc++ 21.
    
    PR:             292664
    Approved by:    yuri (maintainer)
    MFH:            2026Q1
---
 misc/py-pytorch/Makefile                                       |  4 ----
 .../files/patch-third__party_fmt_include_fmt_format.h          | 10 ++++++++++
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/misc/py-pytorch/Makefile b/misc/py-pytorch/Makefile
index 67bdf831cb8e..1449d5f9bd8c 100644
--- a/misc/py-pytorch/Makefile
+++ b/misc/py-pytorch/Makefile
@@ -95,10 +95,6 @@ VULKAN_LIB_DEPENDS=	libvulkan.so:graphics/vulkan-loader
 
 .include <bsd.port.options.mk>
 
-.if ${OPSYS} == FreeBSD
-USES+=	llvm:max=15
-.endif
-
 post-patch:
 	@cd ${WRKSRC} && \
 		${RM} -r third_party/cpuinfo third_party/fbgemm/external/cpuinfo && \
diff --git a/misc/py-pytorch/files/patch-third__party_fmt_include_fmt_format.h b/misc/py-pytorch/files/patch-third__party_fmt_include_fmt_format.h
new file mode 100644
index 000000000000..05f39aeb7558
--- /dev/null
+++ b/misc/py-pytorch/files/patch-third__party_fmt_include_fmt_format.h
@@ -0,0 +1,10 @@
+--- third_party/fmt/include/fmt/format.h.orig	2025-08-06 17:08:03 UTC
++++ third_party/fmt/include/fmt/format.h
+@@ -44,6 +44,7 @@
+ #  include <cmath>    // std::signbit
+ #  include <cstddef>  // std::byte
+ #  include <cstdint>  // uint32_t
++#  include <cstdlib>  // malloc/free
+ #  include <cstring>  // std::memcpy
+ #  include <limits>   // std::numeric_limits
+ #  include <new>      // std::bad_alloc


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?697e47cf.22ad4.4bc6eb42>