forked from mod-audio/mod-plugin-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Add Buildroot patches to fix CLAPACK 3.2.1 build failures with glibc 2.34 / newer GCC #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
5
commits into
moddwarf-new-glibc234
Choose a base branch
from
copilot/fix-clapack-compilation-issues
base: moddwarf-new-glibc234
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
80ccb73
Initial plan
Copilot f15f441
Add Buildroot patches to fix CLAPACK 3.2.1 compilation with newer GCC…
Copilot 23a6175
Fix clapack patches: add diff --git headers and add sgges/sggesx selc…
Copilot ff96608
buildroot/clapack: use typed selctg callbacks in sgges patches
Copilot 9e7d271
Add libglib2 Python 3.12 compatibility patch
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
...es/buildroot-2016.02/packages/libglib2/0004-gdbus-codegen-drop-distutils-dependency.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
| From: GitHub Copilot <copilot@github.com> | ||
| 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 <copilot@github.com> | ||
| --- | ||
| 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 <davidz@redhat.com> | ||
|
|
||
| -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 | ||
|
|
10 changes: 10 additions & 0 deletions
10
patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| 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 @@ | ||
| #include "f2c.h" | ||
| #include "blaswrap.h" | ||
| +#include <stdio.h> | ||
|
|
||
| /* Table of constant values */ | ||
|
|
||
29 changes: 29 additions & 0 deletions
29
patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| diff --git a/SRC/sgees.c b/SRC/sgees.c | ||
| --- a/SRC/sgees.c | ||
| +++ b/SRC/sgees.c | ||
|
Copilot marked this conversation as resolved.
|
||
| @@ -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, | ||
|
Comment on lines
+9
to
+11
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in ff96608. I changed only the two sgges/sggesx patch files so they now apply typed |
||
| 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); | ||
30 changes: 30 additions & 0 deletions
30
patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| diff --git a/SRC/sgeesx.c b/SRC/sgeesx.c | ||
| --- a/SRC/sgeesx.c | ||
| +++ b/SRC/sgeesx.c | ||
|
Copilot marked this conversation as resolved.
|
||
| @@ -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); | ||
15 changes: 15 additions & 0 deletions
15
patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| 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, 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) |
15 changes: 15 additions & 0 deletions
15
patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| 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, 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 * |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.