Skip to content

fix(render): prevent format truncation warning in pair_sheet on GCC 16 - #1

Merged
schwimmbeck merged 1 commit into
horcom-rr:mainfrom
9M2PJU:feat/packaging-and-installers
Nov 19, 2026
Merged

schwimmbeck merged 1 commit into
horcom-rr:mainfrom
9M2PJU:feat/packaging-and-installers

Conversation

@9M2PJU

@9M2PJU 9M2PJU commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Enlarge house label buffer in src/horcom/render/pair_sheet.cpp to 16 bytes to satisfy GCC 16 -Werror=format-truncation under -O2/-O3 optimization.

@schwimmbeck

Copy link
Copy Markdown
Contributor

Thank you so much for this, and for packaging HORCOM on the AUR! This is the project's very first pull request, so I took the time to test it on Arch with GCC 16.2.1.

The pair_sheet.cpp fix is right, thanks for catching it. Current main fails there with a plain -O2 or -O3 build, which is what build.sh does. With your change everything builds cleanly and all tests pass. Could you trim the PR down to just that change? A force push is fine. I'll squash-merge it in the project's commit format, with you as the author.

The other parts I'd like to leave out, mostly for policy reasons:

  • The official install steps only use files the project builds and publishes itself. A script served from a fork, with a fallback to the fork's releases, would run code on users' machines that the project can't review.
  • Native .deb and .rpm packages aren't planned for now, the AppImage stays the official Linux download.
  • PKGBUILDs are best kept on the AUR, copies here would drift.

About horcom-git: I'd be happy to list it in our install instructions as a community package. Three small suggestions first, I tried all three with makepkg's default settings:

  • Please drop the -DCMAKE_CXX_FLAGS override. It replaces makepkg's own flags, including the hardening ones, and with makepkg's flags current main already builds and passes check().
  • Passing -DHORCOM_VERSION="$pkgver" puts the version in the window title, otherwise it shows 0.0.
  • ttf-liberation as a dependency keeps the columns of the sheets aligned where Courier New is missing. That's why the AppImage bundles Liberation Mono.
A few notes from testing install.sh, in case you keep it in your fork
  • In install_via_aur || install_from_source, bash suspends set -e inside the function, so a failed makepkg goes unnoticed, the fallback never runs and the script still prints "All set!".
  • On Ubuntu 22.04 and its relatives the source build stops at configure, they ship CMake 3.22 and HORCOM needs 3.25.
  • The uninstaller removes /usr/bin/horcom* and /usr/share/horcom with sudo after checking only for horcom-git, so it could delete files that belong to another package.

Thanks again, it's great to see HORCOM reach new people!

Enlarge house label buffer to 16 bytes to satisfy GCC 16 -Werror=format-truncation under -O2/-O3 optimization.
@9M2PJU
9M2PJU force-pushed the feat/packaging-and-installers branch from fbecc79 to 6dcc3a1 Compare November 19, 2026 12:14
@9M2PJU 9M2PJU changed the title feat(packaging): add universal 1-liner installer, deb/rpm CPack, and Arch Linux/AUR packaging fix(render): prevent format truncation warning in pair_sheet on GCC 16 Nov 19, 2026
@9M2PJU

9M2PJU commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Hi @schwimmbeck,

Thank you very much for taking the time to test on Arch with GCC 16.2.1 and for the detailed, thoughtful feedback!

  1. Pull Request Trimmed:
    As requested, I have trimmed down this PR to only include the pair_sheet.cpp fix (+1 -1) rebased on latest main, and force-pushed the branch. Everything builds cleanly and passes all 82 tests.

  2. AUR Package (horcom-git) Updated:
    I have applied all three of your suggestions to the horcom-git package and pushed the update:

    • Added ttf-liberation to depends to keep sheet columns aligned.
    • Passed -DHORCOM_VERSION="$pkgver" so the window title bar displays the actual package version instead of 0.0.
    • Dropped the -DCMAKE_CXX_FLAGS override so makepkg's native flags (including Arch hardening flags) are fully respected.

    We would be delighted to have it referenced in the official install instructions as a community package!

  3. Standalone Installer Notes:
    Thank you as well for the notes regarding install.sh (the set -e suppression in chained bash functions, CMake >= 3.25 requirement on older distros like Ubuntu 22.04, and uninstaller scope). I will incorporate those fixes into my fork's standalone tools.

Thanks again for your guidance and for maintaining HORCOM!

@schwimmbeck
schwimmbeck merged commit 5921c3b into horcom-rr:main Nov 19, 2026
9 checks passed
@schwimmbeck

Copy link
Copy Markdown
Contributor

Thank you so much for the quick changes, both here and on the AUR! It's merged now, so plain -O2 and -O3 builds with GCC 16 go through as well.

horcom-git is now listed as a community package for Arch Linux in the README and in the install guide. Thanks again for bringing HORCOM to Arch!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants