Skip to content

gateway-dk-ask: pin ASK with libxml2 2.12+ compat fix for fmc#9677

Open
tomazzaman wants to merge 2 commits intoarmbian:mainfrom
we-are-mono:fix/ask-libxml2-compat
Open

gateway-dk-ask: pin ASK with libxml2 2.12+ compat fix for fmc#9677
tomazzaman wants to merge 2 commits intoarmbian:mainfrom
we-are-mono:fix/ask-libxml2-compat

Conversation

@tomazzaman
Copy link
Copy Markdown

@tomazzaman tomazzaman commented Apr 15, 2026

Description

Update the ASK repo pin to a commit that adds a libxml2 compatibility patch for fmc.

Newer libxml2 (2.12.0+, released Oct 2023) changed the xmlStructuredErrorFunc callback signature to take a const xmlError * instead of xmlError *. Without the patch, fmc fails to compile against libxml2 2.12+ headers, breaking builds against newer distributions.

The patch in the ASK repo uses a LIBXML_VERSION preprocessor check to select the correct callback signature for both old and new libxml2.

Distribution coverage

Distribution libxml2 Status
Debian Trixie 2.9.14 (despite version string) OK
Ubuntu Noble (24.04 LTS) 2.9.14 OK
Ubuntu Resolute (26.04 dev) 2.12+ Was broken, now fixed

How Has This Been Tested?

  • Built locally with `RELEASE=trixie` (passes)
  • Built locally with `RELEASE=noble` (passes)
  • Built locally with `RELEASE= resolute` (passes)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings

Summary by CodeRabbit

  • Chores
    • Updated pinned source revision for a build dependency.

Update ASK to a commit that adds a libxml2 compatibility patch for
fmc. Newer libxml2 (2.12+) changed the xmlStructuredErrorFunc
callback signature to take a const error pointer. Without the patch,
fmc fails to compile against libxml2 2.12+ headers (Ubuntu Resolute
and other distros with newer libxml2).
@github-actions github-actions bot added size/small PR with less then 50 lines 05 Milestone: Second quarter release Needs review Seeking for review Framework Framework components labels Apr 15, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

📝 Walkthrough

Walkthrough

Updated a pinned ASK source commit in extensions/gateway-dk-ask.sh and applied const-correctness changes to local pointer variables in tools/lib/bpf/libbpf.c within a kernel archive patch; no control-flow or public API changes were introduced.

Changes

Cohort / File(s) Summary
ASK Source Revision Update
extensions/gateway-dk-ask.sh
Changed ASK_BRANCH pinned commit from commit:252b6db5a274383917c7a7688c931d61409978c2 to commit:9ea9bda759de70f75fc994fdc8bfa83a54f66f67.
libbpf const-correctness
patch/kernel/archive/ls1046a-6.12/004-libbpf-const-correctness-for-newer-glibc.patch, tools/lib/bpf/libbpf.c
Changed local variables receiving strstr()/strchr() results from char * to const char * in kallsyms_cb() and resolve_full_path(); no logic or API changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A hop, a skip, a commit so bright,
I swapped a hash beneath moonlight,
Const whispers tucked in code with care,
A rabbit's nibble, small and fair. 🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: pinning ASK to a commit with a libxml2 2.12+ compatibility fix, which matches the core objective of fixing fmc compilation against newer libxml2.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

glibc 2.42+ (Ubuntu Resolute and later) ships const-aware strstr/strchr
declarations in <string.h>. Assigning their results to non-const char*
triggers -Werror=discarded-qualifiers in tools/bpf/resolve_btfids,
which is compiled by the linux-headers .deb postinst on the build host.

Fix by declaring the receiving variables as const char* in two places
in tools/lib/bpf/libbpf.c. Matches the upstream 6.13+ fix, backported
to the NXP lf-6.12.y SDK kernel (which NXP has moved off for 6.18+).
@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... and removed size/small PR with less then 50 lines labels Apr 15, 2026
@tomazzaman
Copy link
Copy Markdown
Author

tomazzaman commented Apr 15, 2026

Went ahead and fixed the headers issue as well, however, identified another bug, so I'm fixing the whole ASK patching process for future-proofness. Will push soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

1 participant