From 80ccb737b89e2e4557257881ce863a377227f38d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Aug 2026 19:41:49 +0000 Subject: [PATCH 1/5] Initial plan From f15f441e5f6ec30103b0b96c435de2d7caab7850 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Aug 2026 19:54:40 +0000 Subject: [PATCH 2/5] Add Buildroot patches to fix CLAPACK 3.2.1 compilation with newer GCC/glibc - 0001: Add #include to BLAS/SRC/xerbla.c to fix implicit printf error - 0002: Rename 'select' parameter to 'selectfn' in SRC/sgees.c to avoid conflict with POSIX select() symbol - 0003: Rename 'select' parameter to 'selectfn' in SRC/sgeesx.c for same reason Co-authored-by: fragfz <82901154+fragfz@users.noreply.github.com> --- .../0001-clapack-xerbla-include-stdio.patch | 9 ++++++ ...002-clapack-sgees-select-to-selectfn.patch | 28 ++++++++++++++++++ ...03-clapack-sgeesx-select-to-selectfn.patch | 29 +++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch create mode 100644 patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch create mode 100644 patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch diff --git a/patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch b/patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch new file mode 100644 index 00000000..dde8743d --- /dev/null +++ b/patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch @@ -0,0 +1,9 @@ +--- a/BLAS/SRC/xerbla.c ++++ b/BLAS/SRC/xerbla.c +@@ -13,6 +13,7 @@ + #include "f2c.h" + #include "blaswrap.h" ++#include + + /* Table of constant values */ + diff --git a/patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch new file mode 100644 index 00000000..34b19e8d --- /dev/null +++ b/patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch @@ -0,0 +1,28 @@ +--- a/SRC/sgees.c ++++ b/SRC/sgees.c +@@ -18,8 +18,8 @@ + static integer c__1 = 1; + static integer c__0 = 0; + static integer c_n1 = -1; + +-/* Subroutine */ int sgees_(char *jobvs, char *sort, L_fp select, integer *n, ++/* Subroutine */ int sgees_(char *jobvs, char *sort, L_fp selectfn, integer *n, + real *a, integer *lda, integer *sdim, real *wr, real *wi, real *vs, + integer *ldvs, real *work, integer *lwork, logical *bwork, integer * + info) +@@ -388,6 +388,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- bwork[i__] = (*select)(&wr[i__], &wi[i__]); ++ bwork[i__] = (*selectfn)(&wr[i__], &wi[i__]); + /* L10: */ + } + +@@ -504,6 +504,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- cursl = (*select)(&wr[i__], &wi[i__]); ++ cursl = (*selectfn)(&wr[i__], &wi[i__]); + if (wi[i__] == 0.f) { + if (cursl) { + ++(*sdim); diff --git a/patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch new file mode 100644 index 00000000..679fc054 --- /dev/null +++ b/patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch @@ -0,0 +1,29 @@ +--- a/SRC/sgeesx.c ++++ b/SRC/sgeesx.c +@@ -18,9 +18,9 @@ + static integer c__1 = 1; + static integer c__0 = 0; + static integer c_n1 = -1; + +-/* Subroutine */ int sgeesx_(char *jobvs, char *sort, L_fp select, char * ++/* Subroutine */ int sgeesx_(char *jobvs, char *sort, L_fp selectfn, char * + sense, integer *n, real *a, integer *lda, integer *sdim, real *wr, + real *wi, real *vs, integer *ldvs, real *rconde, real *rcondv, real * + work, integer *lwork, integer *iwork, integer *liwork, logical *bwork, + integer *info) +@@ -458,6 +458,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- bwork[i__] = (*select)(&wr[i__], &wi[i__]); ++ bwork[i__] = (*selectfn)(&wr[i__], &wi[i__]); + /* L10: */ + } + +@@ -594,6 +594,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- cursl = (*select)(&wr[i__], &wi[i__]); ++ cursl = (*selectfn)(&wr[i__], &wi[i__]); + if (wi[i__] == 0.f) { + if (cursl) { + ++(*sdim); From 23a61759ba386b5fd236ae68022fd3a1a182f363 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Aug 2026 21:23:23 +0000 Subject: [PATCH 3/5] Fix clapack patches: add diff --git headers and add sgges/sggesx selctg patches Co-authored-by: fragfz <82901154+fragfz@users.noreply.github.com> --- .../0001-clapack-xerbla-include-stdio.patch | 1 + ...002-clapack-sgees-select-to-selectfn.patch | 1 + ...03-clapack-sgeesx-select-to-selectfn.patch | 1 + ...004-clapack-sgges-selctg-to-selctgfn.patch | 31 +++++++++++++++++++ ...05-clapack-sggesx-selctg-to-selctgfn.patch | 31 +++++++++++++++++++ 5 files changed, 65 insertions(+) create mode 100644 patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch create mode 100644 patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch diff --git a/patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch b/patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch index dde8743d..102b19aa 100644 --- a/patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch +++ b/patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch @@ -1,3 +1,4 @@ +diff --git a/BLAS/SRC/xerbla.c b/BLAS/SRC/xerbla.c --- a/BLAS/SRC/xerbla.c +++ b/BLAS/SRC/xerbla.c @@ -13,6 +13,7 @@ diff --git a/patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch index 34b19e8d..507e6b3d 100644 --- a/patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch +++ b/patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch @@ -1,3 +1,4 @@ +diff --git a/SRC/sgees.c b/SRC/sgees.c --- a/SRC/sgees.c +++ b/SRC/sgees.c @@ -18,8 +18,8 @@ diff --git a/patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch index 679fc054..eebf6da3 100644 --- a/patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch +++ b/patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch @@ -1,3 +1,4 @@ +diff --git a/SRC/sgeesx.c b/SRC/sgeesx.c --- a/SRC/sgeesx.c +++ b/SRC/sgeesx.c @@ -18,9 +18,9 @@ diff --git a/patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch new file mode 100644 index 00000000..83ed1f7a --- /dev/null +++ b/patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch @@ -0,0 +1,31 @@ +diff --git a/SRC/sgges.c b/SRC/sgges.c +--- a/SRC/sgges.c ++++ b/SRC/sgges.c +@@ -18,8 +18,8 @@ + static integer c__1 = 1; + static integer c__0 = 0; + static integer c_n1 = -1; + +-/* Subroutine */ int sgges_(char *jobvsl, char *jobvsr, char *sort, L_fp +- selctg, integer *n, real *a, integer *lda, real *b, integer *ldb, ++/* Subroutine */ int sgges_(char *jobvsl, char *jobvsr, char *sort, L_fp ++ selctgfn, integer *n, real *a, integer *lda, real *b, integer *ldb, + integer *sdim, real *alphar, real *alphai, real *beta, real *vsl, + integer *ldvsl, real *vsr, integer *ldvsr, real *work, integer *lwork, + logical *bwork, integer *info) +@@ -539,6 +539,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- bwork[i__] = (*selctg)(&alphar[i__], &alphai[i__], &beta[i__]); ++ bwork[i__] = (*selctgfn)(&alphar[i__], &alphai[i__], &beta[i__]); + /* L10: */ + } + +@@ -640,6 +640,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- cursl = (*selctg)(&alphar[i__], &alphai[i__], &beta[i__]); ++ cursl = (*selctgfn)(&alphar[i__], &alphai[i__], &beta[i__]); + if (alphai[i__] == 0.f) { + if (cursl) { + ++(*sdim); diff --git a/patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch new file mode 100644 index 00000000..3923d2fd --- /dev/null +++ b/patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch @@ -0,0 +1,31 @@ +diff --git a/SRC/sggesx.c b/SRC/sggesx.c +--- a/SRC/sggesx.c ++++ b/SRC/sggesx.c +@@ -18,8 +18,8 @@ + static integer c__1 = 1; + static integer c__0 = 0; + static integer c_n1 = -1; + +-/* Subroutine */ int sggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp +- selctg, char *sense, integer *n, real *a, integer *lda, real *b, ++/* Subroutine */ int sggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp ++ selctgfn, char *sense, integer *n, real *a, integer *lda, real *b, + integer *ldb, integer *sdim, real *alphar, real *alphai, real *beta, + real *vsl, integer *ldvsl, real *vsr, integer *ldvsr, real *rconde, + real *rcondv, real *work, integer *lwork, integer *iwork, integer * +@@ -638,6 +638,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- bwork[i__] = (*selctg)(&alphar[i__], &alphai[i__], &beta[i__]); ++ bwork[i__] = (*selctgfn)(&alphar[i__], &alphai[i__], &beta[i__]); + /* L10: */ + } + +@@ -763,6 +763,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- cursl = (*selctg)(&alphar[i__], &alphai[i__], &beta[i__]); ++ cursl = (*selctgfn)(&alphar[i__], &alphai[i__], &beta[i__]); + if (alphai[i__] == 0.f) { + if (cursl) { + ++(*sdim); From ff966085f2345beb0daa4968007557fdb9d20a68 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Aug 2026 21:29:44 +0000 Subject: [PATCH 4/5] buildroot/clapack: use typed selctg callbacks in sgges patches Co-authored-by: fragfz <82901154+fragfz@users.noreply.github.com> --- ...004-clapack-sgges-selctg-to-selctgfn.patch | 20 ++----------------- ...05-clapack-sggesx-selctg-to-selctgfn.patch | 20 ++----------------- 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch index 83ed1f7a..ad0c1b0f 100644 --- a/patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch +++ b/patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch @@ -8,24 +8,8 @@ diff --git a/SRC/sgges.c b/SRC/sgges.c -/* Subroutine */ int sgges_(char *jobvsl, char *jobvsr, char *sort, L_fp - selctg, integer *n, real *a, integer *lda, real *b, integer *ldb, -+/* Subroutine */ int sgges_(char *jobvsl, char *jobvsr, char *sort, L_fp -+ selctgfn, integer *n, real *a, integer *lda, real *b, integer *ldb, ++/* Subroutine */ int sgges_(char *jobvsl, char *jobvsr, char *sort, logical ++ (*selctg)(real *, real *, real *), integer *n, real *a, integer *lda, real *b, integer *ldb, integer *sdim, real *alphar, real *alphai, real *beta, real *vsl, integer *ldvsl, real *vsr, integer *ldvsr, real *work, integer *lwork, logical *bwork, integer *info) -@@ -539,6 +539,6 @@ - i__1 = *n; - for (i__ = 1; i__ <= i__1; ++i__) { -- bwork[i__] = (*selctg)(&alphar[i__], &alphai[i__], &beta[i__]); -+ bwork[i__] = (*selctgfn)(&alphar[i__], &alphai[i__], &beta[i__]); - /* L10: */ - } - -@@ -640,6 +640,6 @@ - i__1 = *n; - for (i__ = 1; i__ <= i__1; ++i__) { -- cursl = (*selctg)(&alphar[i__], &alphai[i__], &beta[i__]); -+ cursl = (*selctgfn)(&alphar[i__], &alphai[i__], &beta[i__]); - if (alphai[i__] == 0.f) { - if (cursl) { - ++(*sdim); diff --git a/patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch index 3923d2fd..1c625b40 100644 --- a/patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch +++ b/patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch @@ -8,24 +8,8 @@ diff --git a/SRC/sggesx.c b/SRC/sggesx.c -/* Subroutine */ int sggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp - selctg, char *sense, integer *n, real *a, integer *lda, real *b, -+/* Subroutine */ int sggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp -+ selctgfn, char *sense, integer *n, real *a, integer *lda, real *b, ++/* Subroutine */ int sggesx_(char *jobvsl, char *jobvsr, char *sort, logical ++ (*selctg)(real *, real *, real *), char *sense, integer *n, real *a, integer *lda, real *b, integer *ldb, integer *sdim, real *alphar, real *alphai, real *beta, real *vsl, integer *ldvsl, real *vsr, integer *ldvsr, real *rconde, real *rcondv, real *work, integer *lwork, integer *iwork, integer * -@@ -638,6 +638,6 @@ - i__1 = *n; - for (i__ = 1; i__ <= i__1; ++i__) { -- bwork[i__] = (*selctg)(&alphar[i__], &alphai[i__], &beta[i__]); -+ bwork[i__] = (*selctgfn)(&alphar[i__], &alphai[i__], &beta[i__]); - /* L10: */ - } - -@@ -763,6 +763,6 @@ - i__1 = *n; - for (i__ = 1; i__ <= i__1; ++i__) { -- cursl = (*selctg)(&alphar[i__], &alphai[i__], &beta[i__]); -+ cursl = (*selctgfn)(&alphar[i__], &alphai[i__], &beta[i__]); - if (alphai[i__] == 0.f) { - if (cursl) { - ++(*sdim); From 9e7d2712ea72e5a72d8124ce53fa7895963b18fd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Aug 2026 09:54:03 +0000 Subject: [PATCH 5/5] Add libglib2 Python 3.12 compatibility patch Co-authored-by: fragfz <82901154+fragfz@users.noreply.github.com> --- ...us-codegen-drop-distutils-dependency.patch | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 patches/buildroot-2016.02/packages/libglib2/0004-gdbus-codegen-drop-distutils-dependency.patch diff --git a/patches/buildroot-2016.02/packages/libglib2/0004-gdbus-codegen-drop-distutils-dependency.patch b/patches/buildroot-2016.02/packages/libglib2/0004-gdbus-codegen-drop-distutils-dependency.patch new file mode 100644 index 00000000..9eda6621 --- /dev/null +++ b/patches/buildroot-2016.02/packages/libglib2/0004-gdbus-codegen-drop-distutils-dependency.patch @@ -0,0 +1,61 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: GitHub Copilot +Date: Sun, 23 Aug 2026 10:05:00 +0000 +Subject: [PATCH] gdbus-codegen: drop distutils dependency + +Python 3.12 removed distutils from the standard library. GLib 2.46 still +imports distutils.version in gdbus-codegen, which breaks host-libglib2 on +modern Linux distributions before the rest of the toolchain can build. + +Replace the LooseVersion-based sort key with a small local parser so the +code generator keeps the same version ordering without relying on any +non-standard Python module. + +Signed-off-by: GitHub Copilot +--- + gio/gdbus-2.0/codegen/utils.py | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 9eaa7f8..f16e92c 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -17,7 +17,7 @@ + # + # Author: David Zeuthen + +-import distutils.version ++import re + + def strip_dots(s): + ret = '' +@@ -81,8 +81,27 @@ def lookup_brief_docs(annotations): + return s + + def version_cmp_key(key): ++ def version_part(part): ++ if part.isdigit(): ++ return (0, int(part)) ++ return (1, part) ++ ++ def version_key(version): ++ parts = [] ++ for part in re.split(r'([0-9]+|[._+-])', version): ++ if not part or part in '._+-': ++ continue ++ parts.append(version_part(part)) ++ return tuple(parts) ++ + # If the 'since' version is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # compare lower than any real version. ++ # ++ # Keep the comparison loose so versions like "2.74.0" and "2.74.0-1" ++ # continue to sort naturally without depending on distutils, which was ++ # removed from Python 3.12. + v = key[0] if key[0] else '0' +- return (distutils.version.LooseVersion(v), key[1]) ++ return (version_key(v), key[1]) +-- +2.43.0 +