Skip to content

Fix GLIBCXX compatibility, streamline build workflows and fix CI caching - #11

Merged
LeoLTM merged 4 commits into
LeoLTM:mainfrom
jojo141185:main
Jul 14, 2026
Merged

LeoLTM merged 4 commits into
LeoLTM:mainfrom
jojo141185:main

Conversation

@jojo141185

Copy link
Copy Markdown
Contributor

Summary

This PR addresses a critical compatibility issue where cross-compiled binaries fail on older target environments (like Raspbian Bookworm on the Pi Zero W) due to missing GLIBCXX versions.

Started sendspin-client.service - SendSpin Client Service (ARMv6).
sendspin-armv6[13553]: /usr/local/bin/sendspin-armv6: /lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /usr/local/bin/sendspin-armv6)
sendspin-armv6[13553]: /usr/local/bin/sendspin-armv6: /lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.31' not found (required by /usr/local/bin/sendspin-armv6)

While forcing static linking to fix this, I streamlined the GitHub Actions into a unified matrix workflow and resolved some small bugs regarding action caching permissions, artifact permissions, and release safety.

What changed?

  • Critical Fix: Static Toolchain Linking
    Added -static-libstdc++ and -static-libgcc to the CMake flags for both configurations. This bakes the required standard library versions directly into the binary, preventing runtime mismatches on target deployment systems.

  • CI Bugfixes (Caching & Permissions)

    • Removed sudo when injecting ALSA headers into the cross-compiler sysroot. Using sudo caused ownership mismatches that can trigger permission denied errors during the GitHub Actions caching step.
    • Added a cache check to skip the ALSA installation step entirely if the toolchain is successfully restored from the cache.
    • Swapped standard cp for cp -p in the packaging step to preserve file permissions (ensuring executable bits remain intact) and added uninstall.sh to the release bundles.
  • Workflow Consolidation & Release Guardrails

    • Merged the redundant build-debug.yml and build-release.yml files into a unified build.yml using a build-type matrix. This cuts down on maintenance and deduplicates setup steps while keeping separate -debug.tar.gz and -release.tar.gz artifacts.
    • Added workflow_dispatch to allow manual triggering of standard builds via the UI.

Adds `-static-libstdc++` and `-static-libgcc` to the CMake configuration
in both release and debug GitHub Actions workflows. This prevents
`GLIBCXX` version mismatch errors (e.g., missing GLIBCXX_3.4.32) when running binaries on older target environments like Raspbian Bookworm on Raspberry Pi Zero W.
- Merged `build-debug.yml` and `build-release.yml` into a unified `build.yml` using a build type matrix
- Added `workflow_dispatch` support to `release.yml` to allow manual releases via the GitHub UI
- Maintained exact artifact naming and packaging constraints (including conditional `upgrade.sh` inclusion for release builds)
- Removed redundant workflow files to reduce CI maintenance overhead
…se trigger

- Remove `sudo` from sysroot copies in `build.yml` to prevent permission denied errors when the runner attempts to cache the toolchain directory.
- Skip ALSA installation step entirely if toolchain is restored from cache, as it is already included in the cached sysroot.
- Use `cp -p` during packaging to preserve file permissions (like executable bits) and include `uninstall.sh` in release builds.
- Remove `workflow_dispatch` from `release.yml` to prevent accidental releases named "main" and strictly enforce tag-based releases.
@LeoLTM
LeoLTM merged commit 5985a7b into LeoLTM:main Jul 14, 2026
2 checks passed
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