Skip to content

Linux CLI 0.78.0 links libxml2.so.2 again (regression of #1046), fails on Ubuntu 26.04 #4652

Closed

Description

@simonsteiner

Symptom

On Ubuntu 26.04, the 0.78.0 glibc CLI tarball won't start:

$ ~/.local/opt/codexbar/0.78.0/CodexBarCLI --version
codexbar: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

Ubuntu 26.04 ships libxml2 2.15 (libxml2-16, soname libxml2.so.16), so there is no libxml2.so.2 to load. This is the same failure as #1046. 0.77.0 and 0.76.0 run fine on the same machine.

Affected artifacts

From readelf -d on the v0.78.0 release assets:

Asset NEEDED libxml2.so.2
CodexBarCLI-v0.78.0-linux-x86_64.tar.gz yes
CodexBarCLI-v0.78.0-linux-aarch64.tar.gz yes
CodexBarCLI-v0.78.0-linux-musl-x86_64.tar.gz no (static, works)
CodexBarDesktop-v0.78.0-linux-x86_64.tar.gz no
CodexBarCLI-v0.77.0-linux-x86_64.tar.gz no

Homebrew on Linux installs the linux-x86_64/linux-aarch64 tarballs, so brew install steipete/tap/codexbar should hit this too (not verified).

Cause

#1046 was fixed in 305b6eb by limiting the FoundationXML import in JetBrainsStatusProbe.swift to macOS (#if os(macOS) && canImport(FoundationXML)). #4608 (ac30c44, plugin SVG icons) added Sources/CodexBarCore/Plugins/ProviderPluginIconSVG.swift with the old guard:

#if canImport(FoundationXML)
import FoundationXML
#endif

ProviderPluginManifest calls ProviderPluginIconSVG.isValid, so CodexBarCore pulls FoundationXML, and with it libxml2.so.2, into the Linux CLI again.

Suggested fix

  • Use the same guard as the JetBrains fix (#if os(macOS) && canImport(FoundationXML)). On other platforms, have isValid return false, which falls back to the monogram. The icon is only drawn by the macOS app anyway.

  • Since this has now regressed twice, add a release CI check that fails when a glibc Linux CLI binary lists libxml2 as a dependency. For example, after the build in release-cli.yml:

    ! readelf -d "$BIN" | grep -q 'libxml2'

Workaround

Use the static CodexBarCLI-v0.78.0-linux-musl-x86_64.tar.gz. It runs serve and usage fine on Ubuntu 26.04 (codex, claude, opencodego all return data). Or stay on 0.77.0.

Environment

  • Ubuntu 26.04.1 LTS on WSL2 (kernel 6.18.54.1-microsoft-standard-WSL2), x86_64
  • libxml2-16 2.15.2+dfsg-0.1ubuntu0.3, no libxml2 package available
  • CodexBar 0.78.0 release tarballs

Found and debugged by Claude Code (Claude Opus 5.5) while upgrading the CLI.

Activity

  1. added
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    P1Urgent regression or broken agent/channel workflow affecting real users now.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    impact:crash-loopThis issue is about crashes, hangs, restart loops, or process-level availability.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    no-staleExempts this issue from stale automation.
    and removed
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    on Oct 19, 2026
  2. clawsweeper commented on Oct 19, 2026

    @clawsweeper

    Codex review: this still needs some work.

    Summary
    Keep open: current main retains the FoundationXML dependency path implicated in the v0.78.0 Linux startup regression, and no open fix PR was found.

    Reproducibility: Current source establishes the shared-core FoundationXML path and the report supplies an affected-release loader trace; no binary execution or independent readelf inspection was performed.

    Regression provenance
    Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

    Next step
    Establish a failing Linux artifact dependency regression, then guard SVG XML parsing to macOS and verify both glibc CLI architectures start without libxml2.so.2.

    Review details

    Best possible solution:

    Keep SVG parsing confined to macOS and enforce a libxml2-free dependency contract for both glibc Linux CLI artifacts.

    Do we have a high-confidence way to reproduce the issue?

    Current source establishes the shared-core FoundationXML path and the report supplies an affected-release loader trace; no binary execution or independent readelf inspection was performed.

    Is this the best way to solve the issue?

    The proposed platform boundary matches the earlier repair, provided the XML parser body and delegate are also guarded and non-macOS validation returns false; dependency inspection must fail on inspection errors as well as forbidden libraries.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • Published binary dependencies and Ubuntu startup behavior were reported by the author rather than independently exercised in this read-only review.

    Codex review notes: model internal, reasoning medium; reviewed against 92acf2eac671.

    Label changes

    Label changes:

    • add P1: The latest release reportedly cannot start on an affected supported Linux distribution, blocking every CLI command.
    • add impact:crash-loop: The dynamic loader exits before CLI initialization because libxml2.so.2 is unavailable.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • add clawsweeper:queueable-fix: Current issue advisory state selects this label.
    • add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.

    Label justifications:

    • P1: The latest release reportedly cannot start on an affected supported Linux distribution, blocking every CLI command.
    • impact:crash-loop: The dynamic loader exits before CLI initialization because libxml2.so.2 is unavailable.
    Evidence reviewed

    Acceptance criteria:

    • Before the fix, build the glibc CLI with swift build -c release --product CodexBarCLI --static-swift-stdlib and establish that readelf -d on the resulting binary contains a libxml2 NEEDED entry.
    • On Linux, run swift test --filter UserProviderPluginPortableTests with the new manifest fallback regression.
    • On macOS, run make test-fast FILTER='UserProviderPluginTests' to preserve SVG validation and rendering coverage.
    • Run make check.
    • For both glibc release architectures, require successful readelf -d inspection and no libxml2 NEEDED entry.

    What I checked:

    Likely related people:

    • Shivanath Devinarayanan: Raw commit ac30c44 adds Sources/CodexBarCore/Plugins/ProviderPluginIconSVG.swift:2 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ac30c447f9d2; files: Sources/CodexBarCore/Plugins/ProviderPluginIconSVG.swift)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 19, 2026, 7:30 PM ET / 23:30 UTC.

  3. added a commit that references this issue on Oct 20, 2026
    e6bfb10
  4. steipete commented on Oct 20, 2026

    @steipete
    Owner

    Fixed in #4653 (e6bfb10). Thanks @simonsteiner for the precise report! The cause was the new plugin SVG icon support in 0.78.0, which pulled FoundationXML (and with it libxml2) into the Linux CLI. SVG parsing is now macOS-only, and CI plus the release builds now check the Linux binary's linked libraries so a libxml2 dependency can't ship again. The fix will be in the next release.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Urgent regression or broken agent/channel workflow affecting real users now.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopThis issue is about crashes, hangs, restart loops, or process-level availability.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.no-staleExempts this issue from stale automation.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions