Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Feb 2026 00:55:07 +0000
From:      Vladimir Druzenko <vvd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Cc:        Evgenii Khramtsov <2khramtsov@gmail.com>
Subject:   git: 438a70797fc2 - main - graphics/khronos-texture: Fix build with libc++ 21
Message-ID:  <69926aeb.38faf.64a99307@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=438a70797fc27940aa3276972591444707792551

commit 438a70797fc27940aa3276972591444707792551
Author:     Evgenii Khramtsov <2khramtsov@gmail.com>
AuthorDate: 2026-02-16 00:49:49 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-02-16 00:49:49 +0000

    graphics/khronos-texture: Fix build with libc++ 21
    
    [...]
    In file included from /wrkdirs/usr/ports/graphics/khronos-texture/work/KTX-Software-4.4.2/external/fmt/src/os.cc:13:
    In file included from /wrkdirs/usr/ports/graphics/khronos-texture/work/KTX-Software-4.4.2/external/fmt/include/fmt/os.h:11:
    /wrkdirs/usr/ports/graphics/khronos-texture/work/KTX-Software-4.4.2/external/fmt/include/fmt/format.h:747:28: error: use of undeclared identifier 'malloc'
      747 |     T* p = static_cast<T*>(malloc(n * sizeof(T)));
          |                            ^~~~~~
    /wrkdirs/usr/ports/graphics/khronos-texture/work/KTX-Software-4.4.2/external/fmt/include/fmt/format.h:752:35: error: use of undeclared identifier 'free'
      752 |   void deallocate(T* p, size_t) { free(p); }
          |                                   ^~~~
    [...]
    
    While here udpate to USES+=compiler:c++14-lang - port uses -std=c++14.
    
    PR:     293197
    MFH:    2026Q1
---
 graphics/khronos-texture/Makefile                              |  2 +-
 .../files/patch-external_fmt_include_fmt_format.h              | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/graphics/khronos-texture/Makefile b/graphics/khronos-texture/Makefile
index d64027bf71e8..749c19354c79 100644
--- a/graphics/khronos-texture/Makefile
+++ b/graphics/khronos-texture/Makefile
@@ -11,7 +11,7 @@ LICENSE=	APACHE20
 
 BUILD_DEPENDS=	bash:shells/bash
 
-USES=		cmake compiler:c++11-lib python:build
+USES=		cmake compiler:c++14-lang python:build
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	KhronosGroup
diff --git a/graphics/khronos-texture/files/patch-external_fmt_include_fmt_format.h b/graphics/khronos-texture/files/patch-external_fmt_include_fmt_format.h
new file mode 100644
index 000000000000..1b362cc36d87
--- /dev/null
+++ b/graphics/khronos-texture/files/patch-external_fmt_include_fmt_format.h
@@ -0,0 +1,10 @@
+--- external/fmt/include/fmt/format.h.orig	2025-10-04 08:06:54 UTC
++++ external/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?69926aeb.38faf.64a99307>