Skip to content

Fix absence of border in WSL wayland environment#1829

Open
psolstice wants to merge 5 commits into
masterfrom
wayland-window-decorations
Open

Fix absence of border in WSL wayland environment#1829
psolstice wants to merge 5 commits into
masterfrom
wayland-window-decorations

Conversation

@psolstice
Copy link
Copy Markdown
Contributor

PR intention

Add patches to the build scripts to fix the problem on non-EGL wayland sessions

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 30, 2026

User peter@shugalev.com does not have a PR Review subscription.

Go to Team management and add this email to the PR Review subscription.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds Qt Wayland patches and applies them in depends; updates static Qt Wayland plugin discovery and runtime registration; converts multiple XCB-related depends to static builds and adds libXdmcp; adds CMake cache cleanup for stale depends shared-library entries; registers XDG icon/desktop resources and sets Qt desktop file name.

Changes

Qt Wayland decoration & plugin changes

Layer / File(s) Summary
Patch: FindXCB / transitive deps
depends/patches/qt/qtbase_findxcb_image_aux.patch
Adds AUX to XCB_IMAGE component deps so Qt’s generated linkage/prl includes libxcb-util (transitive static link).
Patch: decoration behavior
depends/patches/qt/qtwayland_decoration_no_egl_gate.patch
Makes QWaylandDisplay::supportsWindowDecoration() return true (unless QT_WAYLAND_DISABLE_WINDOWDECORATION set) without requiring EGL clientBufferIntegration(), enabling SHM-only decoration creation.
Patch registration / apply order
depends/packages/qt.mk
Adds the two new Qt patches to $(package)_patches and applies them during $(package)_preprocess_cmds in the updated sequence.
CMake: static Qt plugin imports
src/qt/CMakeLists.txt
For static Qt on Linux/FreeBSD + Wayland, finds libffi (fatal if missing) and conditionally appends Wayland Qt plugin targets to imports when targets exist.
Runtime: static plugin registration & XDG resources
src/qt/bitcoin.cpp, src/qt/bitcoin.qrc, contrib/debian/firo-qt.desktop
Conditions static Q_IMPORT_PLUGIN for additional Wayland plugins; adds qresource alias firo_svg; on Linux writes icon and firo-qt.desktop into XDG data dirs and calls QGuiApplication::setDesktopFileName("firo-qt"); desktop Icon set to firo-qt.

Depends: XCB / libXdmcp / xcb-util changes (static builds)

Layer / File(s) Summary
New package
depends/packages/libXdmcp.mk
Adds libXdmcp package (1.1.5) with URL, sha256, xproto dependency and autotools build/stage hooks.
Depends list update
depends/packages/packages.mk
Adds libXdmcp to qt_linux_packages.
libxcb: deps and archive merging
depends/packages/libxcb.mk
Adds libXdmcp to dependencies, appends --disable-shared to config, and postprocess now merges libXau.a/libXdmcp.a objects into lib/libxcb.a and updates lib/pkgconfig/xcb.pc to add -lXau -lXdmcp.
libxcb-util packages: static build flags & archive rebuild
depends/packages/libxcb_util_image.mk, depends/packages/libxcb_util_keysyms.mk, depends/packages/libxcb_util_render.mk, depends/packages/libxcb_util_wm.mk
Each package appends --disable-shared to configure options; libxcb_util_image postprocess rebuilds lib/libxcb-image.a from extracted objects of libxcb-util.a.
libxkbcommon
depends/packages/libxkbcommon.mk
Appends --disable-shared to configure options.
Wayland meson default
depends/packages/wayland.mk
Adds --default-library=static to Meson setup to prefer static libraries for Wayland build.

Build system cache hygiene

Layer / File(s) Summary
CMake helper
CMakeLists.txt
Adds clear_stale_depends_shared_cache_entries() to scan CMake cache for cached depends shared-library paths under ${CMAKE_SOURCE_DIR}/depends/ and unset entries pointing to non-existent files; invoked when BUILD_GUI is enabled before Qt selection.

Sequence Diagram(s)

sequenceDiagram
    participant App as Application
    participant QWaylandDisplay as QWaylandDisplay
    participant ClientIntegration as ClientBufferIntegration (EGL)
    participant QWaylandWindow as QWaylandWindow
    Note over App,QWaylandWindow: Environment may be SHM-only (no EGL)

    App->>QWaylandDisplay: query supportsWindowDecoration()
    alt QT_WAYLAND_DISABLE_WINDOWDECORATION set
        QWaylandDisplay-->>App: return false
    else
        QWaylandDisplay->>ClientIntegration: query clientBufferIntegration() (may be absent)
        Note right of QWaylandDisplay: new logic does not gate on EGL integration
        QWaylandDisplay-->>App: return true
    end
    App->>QWaylandWindow: createDecoration()
    QWaylandWindow-->>App: decoration created (works without EGL)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Possibly related PRs

Suggested reviewers

  • aleflm
  • levonpetrosyan93
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main issue being fixed - window decorations (borders) in WSL Wayland environments without EGL support.
Description check ✅ Passed The description is minimal but covers the essential intent: adding patches to fix Wayland window decoration issues in non-EGL sessions. However, it lacks details about the architectural changes and specific patches involved.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wayland-window-decorations

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/qt/bitcoin.cpp`:
- Around line 76-78: Wrap each Q_IMPORT_PLUGIN invocation
(Q_IMPORT_PLUGIN(QWaylandXdgShellIntegrationPlugin);
Q_IMPORT_PLUGIN(QWaylandEglClientBufferPlugin);
Q_IMPORT_PLUGIN(QWaylandBradientDecorationPlugin);) in its own compile-time
guard so the code only references qt_static_plugin_* symbols when that plugin is
actually built; e.g. surround each import with `#ifdef` <PLUGIN_SPECIFIC_DEFINE>
... `#endif` (use distinct defines per plugin as set by CMake via
target_compile_definitions for the corresponding plugin target) so the C++ build
matches the conditional linking in CMake.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c710a5bb-acaa-4a7c-a058-a8e629b67eb5

📥 Commits

Reviewing files that changed from the base of the PR and between 288825f and cad2a45.

📒 Files selected for processing (4)
  • depends/packages/qt.mk
  • depends/patches/qt/qtwayland_decoration_no_egl_gate.patch
  • src/qt/CMakeLists.txt
  • src/qt/bitcoin.cpp

Comment thread src/qt/bitcoin.cpp
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 3, 2026

User peter@shugalev.com does not have a PR Review subscription.

Go to Team management and add this email to the PR Review subscription.

@psolstice psolstice force-pushed the wayland-window-decorations branch from 22a58b8 to a7c3e45 Compare May 3, 2026 17:19
@coderabbitai coderabbitai Bot requested a review from levonpetrosyan93 May 3, 2026 17:20
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
depends/packages/libXdmcp.mk (1)

1-23: 💤 Low value

Consider adding postprocess_cmds to remove .la files.

This package definition is missing the cleanup step that other similar packages include. Libtool archive (.la) files can cause linking issues due to hardcoded paths.

Suggested addition for consistency with other packages
 define $(package)_stage_cmds
   $(MAKE) DESTDIR=$($(package)_staging_dir) install
 endef
+
+define $(package)_postprocess_cmds
+  rm -f lib/*.la
+endef
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@depends/packages/libXdmcp.mk` around lines 1 - 23, Add a postprocess step to
remove libtool archive files by defining libXdmcp_postprocess_cmds (use the
$(package)_postprocess_cmds naming pattern) and delete any *.la under the
package staging dir (refer to $($(package)_staging_dir)) after install;
implement it similarly to other packages so the .la files are removed from the
staged install to avoid hardcoded path/linking issues.
depends/packages/libxcb.mk (1)

41-41: ⚡ Quick win

Split the one-liner into readable multi-line steps.

The entire postprocess_cmds block is a single long &&-chain, making it very difficult to audit, diff, or debug. Standard practice in the depends system is to use \ continuations.

♻️ Proposed refactor for readability
 define $(package)_postprocess_cmds
-  rm -rf share lib/*.la && mkdir -p _xau _xdmcp && (cd _xau && ar x $(host_prefix)/lib/libXau.a) && (cd _xdmcp && ar x $(host_prefix)/lib/libXdmcp.a) && ar qc lib/libxcb.a _xau/*.o _xdmcp/*.o && ranlib lib/libxcb.a && rm -rf _xau _xdmcp && python3 -c "c=open('lib/pkgconfig/xcb.pc').read();open('lib/pkgconfig/xcb.pc','w').write(c.replace(' -lxcb\n',' -lxcb -lXau -lXdmcp\n'))"
+  rm -rf share lib/*.la && \
+  mkdir -p _xau _xdmcp && \
+  (cd _xau && ar x $(host_prefix)/lib/libXau.a) && \
+  (cd _xdmcp && ar x $(host_prefix)/lib/libXdmcp.a) && \
+  ar qc lib/libxcb.a _xau/*.o _xdmcp/*.o && \
+  ranlib lib/libxcb.a && \
+  rm -rf _xau _xdmcp && \
+  python3 -c "c=open('lib/pkgconfig/xcb.pc').read(); \
+    open('lib/pkgconfig/xcb.pc','w').write(c.replace(' -lxcb\n',' -lxcb -lXau -lXdmcp\n'))"
 endef
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@depends/packages/libxcb.mk` at line 41, The postprocess_cmds one-liner in
depends/packages/libxcb.mk is unreadable; split it into multiple logical shell
commands using line continuations (backslashes) so each step is its own line:
remove share and lib/*.la, create _xau and _xdmcp, extract objects into _xau and
_xdmcp with (cd _xau && ar x $(host_prefix)/lib/libXau.a) and (cd _xdmcp && ar x
$(host_prefix)/lib/libXdmcp.a), archive and ranlib lib/libxcb.a, remove the
temporary dirs, and finally run the python3 pkg-config edit that replaces '
-lxcb\n' with ' -lxcb -lXau -lXdmcp\n'; keep the exact commands/ordering (rm -rf
share lib/*.la, mkdir -p _xau _xdmcp, ar x calls, ar qc, ranlib, rm -rf _xau
_xdmcp, python3 -c ...) and ensure this is placed into postprocess_cmds in the
same Makefile fragment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@depends/packages/libxcb.mk`:
- Line 41: The one-liner that edits lib/pkgconfig/xcb.pc using python3 -c
currently does a silent no-op when the pattern " -lxcb\n" isn't found; modify
that python snippet to verify the replacement took place (e.g., perform the
replace, compare original vs new, and if unchanged write nothing and exit with
non-zero/raise an exception or print an error), keeping the same pattern and
replacement strings (" -lxcb\n" -> " -lxcb -lXau -lXdmcp\n") so the build fails
fast if xcb.pc was not patched; locate the inline python in the shell command
that reads open('lib/pkgconfig/xcb.pc') and add the check/assert and non-zero
exit on failure.

---

Nitpick comments:
In `@depends/packages/libxcb.mk`:
- Line 41: The postprocess_cmds one-liner in depends/packages/libxcb.mk is
unreadable; split it into multiple logical shell commands using line
continuations (backslashes) so each step is its own line: remove share and
lib/*.la, create _xau and _xdmcp, extract objects into _xau and _xdmcp with (cd
_xau && ar x $(host_prefix)/lib/libXau.a) and (cd _xdmcp && ar x
$(host_prefix)/lib/libXdmcp.a), archive and ranlib lib/libxcb.a, remove the
temporary dirs, and finally run the python3 pkg-config edit that replaces '
-lxcb\n' with ' -lxcb -lXau -lXdmcp\n'; keep the exact commands/ordering (rm -rf
share lib/*.la, mkdir -p _xau _xdmcp, ar x calls, ar qc, ranlib, rm -rf _xau
_xdmcp, python3 -c ...) and ensure this is placed into postprocess_cmds in the
same Makefile fragment.

In `@depends/packages/libXdmcp.mk`:
- Around line 1-23: Add a postprocess step to remove libtool archive files by
defining libXdmcp_postprocess_cmds (use the $(package)_postprocess_cmds naming
pattern) and delete any *.la under the package staging dir (refer to
$($(package)_staging_dir)) after install; implement it similarly to other
packages so the .la files are removed from the staged install to avoid hardcoded
path/linking issues.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e048d602-b470-4227-8244-3f0892efbf4c

📥 Commits

Reviewing files that changed from the base of the PR and between 22a58b8 and a7c3e45.

📒 Files selected for processing (13)
  • CMakeLists.txt
  • depends/packages/libXdmcp.mk
  • depends/packages/libxcb.mk
  • depends/packages/libxcb_util_image.mk
  • depends/packages/libxcb_util_keysyms.mk
  • depends/packages/libxcb_util_render.mk
  • depends/packages/libxcb_util_wm.mk
  • depends/packages/libxkbcommon.mk
  • depends/packages/packages.mk
  • depends/packages/qt.mk
  • depends/packages/wayland.mk
  • depends/patches/qt/qtbase_findxcb_image_aux.patch
  • src/qt/CMakeLists.txt
✅ Files skipped from review due to trivial changes (3)
  • depends/packages/packages.mk
  • depends/patches/qt/qtbase_findxcb_image_aux.patch
  • depends/packages/libxcb_util_image.mk
🚧 Files skipped from review as they are similar to previous changes (1)
  • depends/packages/qt.mk

Comment thread depends/packages/libxcb.mk Outdated
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 4, 2026

User peter@shugalev.com does not have a PR Review subscription.

Go to Team management and add this email to the PR Review subscription.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
src/qt/bitcoin.cpp (1)

76-82: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard optional Wayland static plugin imports with per-plugin defines.

These imports are unconditional once HAVE_WAYLAND is set, but the corresponding plugin targets are conditionally linked in CMake. In static builds where one optional target is missing, this can produce unresolved qt_static_plugin_* symbols at link time.

Proposed fix
 `#ifdef` HAVE_WAYLAND
 Q_IMPORT_PLUGIN(QWaylandIntegrationPlugin);
 Q_IMPORT_PLUGIN(QWaylandEglPlatformIntegrationPlugin);
-Q_IMPORT_PLUGIN(QWaylandXdgShellIntegrationPlugin);
-Q_IMPORT_PLUGIN(QWaylandEglClientBufferPlugin);
-Q_IMPORT_PLUGIN(QWaylandBradientDecorationPlugin);
+#ifdef HAVE_QT_WAYLAND_XDG_SHELL_INTEGRATION_PLUGIN
+Q_IMPORT_PLUGIN(QWaylandXdgShellIntegrationPlugin);
+#endif
+#ifdef HAVE_QT_WAYLAND_EGL_CLIENT_BUFFER_PLUGIN
+Q_IMPORT_PLUGIN(QWaylandEglClientBufferPlugin);
+#endif
+#ifdef HAVE_QT_WAYLAND_BRADIENT_DECORATION_PLUGIN
+Q_IMPORT_PLUGIN(QWaylandBradientDecorationPlugin);
+#endif
 `#endif`
#!/bin/bash
set -euo pipefail

echo "== Optional Wayland imports in src/qt/bitcoin.cpp =="
rg -n -C2 'Q_IMPORT_PLUGIN\(QWayland(XdgShellIntegration|EglClientBuffer|BradientDecoration)Plugin\)' src/qt/bitcoin.cpp

echo
echo "== Plugin target existence checks in src/qt/CMakeLists.txt =="
rg -n -C3 'TARGET Qt6::QWayland(XdgShellIntegration|EglClientBuffer|BradientDecoration)Plugin' src/qt/CMakeLists.txt

echo
echo "== Compile defines exposed to bitcoin.cpp =="
rg -n -C3 'HAVE_QT_WAYLAND_(XDG_SHELL_INTEGRATION|EGL_CLIENT_BUFFER|BRADIENT_DECORATION)_PLUGIN' src/qt/CMakeLists.txt
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/qt/bitcoin.cpp` around lines 76 - 82, The unconditional Q_IMPORT_PLUGIN
lines in bitcoin.cpp cause unresolved symbols when optional Wayland plugin
targets are not linked; for each plugin import (QWaylandIntegrationPlugin,
QWaylandEglPlatformIntegrationPlugin, QWaylandXdgShellIntegrationPlugin,
QWaylandEglClientBufferPlugin, QWaylandBradientDecorationPlugin) wrap the
Q_IMPORT_PLUGIN call in its own `#ifdef` using the per-plugin compile define used
in CMake (e.g. HAVE_QT_WAYLAND_XDG_SHELL_INTEGRATION_PLUGIN,
HAVE_QT_WAYLAND_EGL_CLIENT_BUFFER_PLUGIN,
HAVE_QT_WAYLAND_BRADIENT_DECORATION_PLUGIN) so each plugin is only imported when
its corresponding CMake target/define is present; leave the overall HAVE_WAYLAND
guard around Wayland-related imports as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@src/qt/bitcoin.cpp`:
- Around line 76-82: The unconditional Q_IMPORT_PLUGIN lines in bitcoin.cpp
cause unresolved symbols when optional Wayland plugin targets are not linked;
for each plugin import (QWaylandIntegrationPlugin,
QWaylandEglPlatformIntegrationPlugin, QWaylandXdgShellIntegrationPlugin,
QWaylandEglClientBufferPlugin, QWaylandBradientDecorationPlugin) wrap the
Q_IMPORT_PLUGIN call in its own `#ifdef` using the per-plugin compile define used
in CMake (e.g. HAVE_QT_WAYLAND_XDG_SHELL_INTEGRATION_PLUGIN,
HAVE_QT_WAYLAND_EGL_CLIENT_BUFFER_PLUGIN,
HAVE_QT_WAYLAND_BRADIENT_DECORATION_PLUGIN) so each plugin is only imported when
its corresponding CMake target/define is present; leave the overall HAVE_WAYLAND
guard around Wayland-related imports as-is.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1796d30f-c334-44fe-9548-49129839fd8f

📥 Commits

Reviewing files that changed from the base of the PR and between a7c3e45 and 934ef17.

📒 Files selected for processing (3)
  • contrib/debian/firo-qt.desktop
  • src/qt/bitcoin.cpp
  • src/qt/bitcoin.qrc
✅ Files skipped from review due to trivial changes (1)
  • src/qt/bitcoin.qrc

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 5, 2026

User peter@shugalev.com does not have a PR Review subscription.

Go to Team management and add this email to the PR Review subscription.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
depends/packages/libxcb.mk (1)

41-41: 💤 Low value

Consider splitting the postprocess chain for readability

The entire postprocess is a single 300+ character line. Make uses && continuations naturally; splitting across multiple lines with \ significantly improves maintainability and debuggability.

♻️ Proposed refactor
 define $(package)_postprocess_cmds
-  rm -rf share lib/*.la && mkdir -p _xau _xdmcp && (cd _xau && ar x $(host_prefix)/lib/libXau.a) && (cd _xdmcp && ar x $(host_prefix)/lib/libXdmcp.a) && ar rc lib/libxcb.a _xau/*.o _xdmcp/*.o && ranlib lib/libxcb.a && rm -rf _xau _xdmcp && python3 -c "c=open('lib/pkgconfig/xcb.pc').read();n=c.replace(' -lxcb\n',' -lxcb -lXau -lXdmcp\n');assert n!=c,'xcb.pc patch failed: -lxcb not found at end of Libs line';open('lib/pkgconfig/xcb.pc','w').write(n)"
+  rm -rf share lib/*.la && \
+  mkdir -p _xau _xdmcp && \
+  (cd _xau && ar x $(host_prefix)/lib/libXau.a) && \
+  (cd _xdmcp && ar x $(host_prefix)/lib/libXdmcp.a) && \
+  ar rc lib/libxcb.a _xau/*.o _xdmcp/*.o && \
+  ranlib lib/libxcb.a && \
+  rm -rf _xau _xdmcp && \
+  python3 -c "\
+    c=open('lib/pkgconfig/xcb.pc').read(); \
+    n=c.replace(' -lxcb\n',' -lxcb -lXau -lXdmcp\n'); \
+    assert n!=c,'xcb.pc patch failed: -lxcb not found at end of Libs line'; \
+    open('lib/pkgconfig/xcb.pc','w').write(n)"
 endef
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@depends/packages/libxcb.mk` at line 41, The long single-line postprocess
command should be split into multiple chained shell commands using line
continuations for readability while preserving behavior; break the sequence that
starts with "rm -rf share lib/*.la && mkdir -p _xau _xdmcp" into separate lines
(preserve the order of rm, mkdir, (cd _xau && ar x $(host_prefix)/lib/libXau.a),
(cd _xdmcp && ar x $(host_prefix)/lib/libXdmcp.a), ar qc lib/libxcb.a _xau/*.o
_xdmcp/*.o, ranlib lib/libxcb.a, rm -rf _xau _xdmcp, and the python3 -c patch of
lib/pkgconfig/xcb.pc), joining them with "&& \\" so the commands and the python
patch remain identical but are easier to read and debug.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@depends/packages/libxcb_util_image.mk`:
- Line 31: Replace the fragile archive step that uses "ar qc lib/libxcb-image.a
_util/*.o" and the "mkdir -p _util" setup: instead remove any stale temp objects
first by running "rm -rf _util && mkdir _util" before extracting, and use "ar rc
lib/libxcb-image.a _util/*.o" so archive members are replaced (not appended) on
retries; ensure the final cleanup "rm -rf _util" still runs only after
successful steps to avoid leaving stale objects for subsequent runs and
reference the archive name "lib/libxcb-image.a" and temp directory "_util" when
making these changes.

In `@depends/packages/libxcb.mk`:
- Line 41: The command that builds lib/libxcb.a currently uses "ar qc" which
appends object members and can produce duplicate entries; edit the shell
pipeline that contains "ar qc lib/libxcb.a _xau/*.o _xdmcp/*.o" (the line that
also does ar x into _xau/_xdmcp and ranlib) and change "ar qc" to "ar rc" so
members are replaced rather than appended, keeping the subsequent ranlib step
intact.

---

Nitpick comments:
In `@depends/packages/libxcb.mk`:
- Line 41: The long single-line postprocess command should be split into
multiple chained shell commands using line continuations for readability while
preserving behavior; break the sequence that starts with "rm -rf share lib/*.la
&& mkdir -p _xau _xdmcp" into separate lines (preserve the order of rm, mkdir,
(cd _xau && ar x $(host_prefix)/lib/libXau.a), (cd _xdmcp && ar x
$(host_prefix)/lib/libXdmcp.a), ar qc lib/libxcb.a _xau/*.o _xdmcp/*.o, ranlib
lib/libxcb.a, rm -rf _xau _xdmcp, and the python3 -c patch of
lib/pkgconfig/xcb.pc), joining them with "&& \\" so the commands and the python
patch remain identical but are easier to read and debug.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6872645f-1b87-4c8c-9793-929eb5138fad

📥 Commits

Reviewing files that changed from the base of the PR and between 934ef17 and 14f8c24.

📒 Files selected for processing (5)
  • depends/packages/libXdmcp.mk
  • depends/packages/libxcb.mk
  • depends/packages/libxcb_util_image.mk
  • src/qt/CMakeLists.txt
  • src/qt/bitcoin.cpp
🚧 Files skipped from review as they are similar to previous changes (3)
  • depends/packages/libXdmcp.mk
  • src/qt/bitcoin.cpp
  • src/qt/CMakeLists.txt

Comment thread depends/packages/libxcb_util_image.mk Outdated
Comment thread depends/packages/libxcb.mk Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants