Skip to content

ci: re-enable armv7lh in cross-compile workflow#777

Closed
leoparente wants to merge 2 commits into
developfrom
chore/cross-armv7-reenable
Closed

ci: re-enable armv7lh in cross-compile workflow#777
leoparente wants to merge 2 commits into
developfrom
chore/cross-armv7-reenable

Conversation

@leoparente
Copy link
Copy Markdown
Contributor

Summary

  • Re-enables the `armv7lh` matrix entry in `.github/workflows/build_cross.yml`'s `pkvisor` job (commented out since the 2023 docker-folder cleanup in `32b15f2`).
  • Adds `ldflags: "-static"` to match the x86_64 / aarch64 siblings.
  • Toolchain tarball (`armv7l-linux-musleabihf-cross.tgz`) is already hosted in this repo's `toolchains` release.
  • Downstream `pkvisor-cli` matrix already covers armv7lh, so Go binary cross-build is unaffected.

Why this works without other changes

  • Conan host profile is templated on `${{matrix.conan_arch}}` → `arch=armv7hf` flows through.
  • `-DCMAKE_CXX_STANDARD_LIBRARIES=-latomic` is already in the configure step (armv7 needs `libatomic` for 64-bit atomics).
  • `-DCRASHPAD_NOT_SUPPORTED=true` + `conanfile.py`'s `compiler.libc == "musl"` guard means crashpad isn't pulled in.
  • Upload steps interpolate `${{matrix.arch}}` → produces `pktvisord-linux-armv7lh-static` and `pktvisor-reader-linux-armv7lh-static`.

Risk

First CI run rebuilds all conan deps for `armv7hf` (no cache exists for the new arch). If a recipe surfaces armv7-specific issues — likely candidates: `opentelemetry-cpp`, `protobuf`, `libpcap` — they'll be fixed as follow-up commits on this PR.

Test plan

  • `Cross Compilation` workflow shows a `pkvisor (armv7lh)` job alongside x86_64 and aarch64.
  • armv7lh job uploads `pktvisord-linux-armv7lh-static` + `pktvisor-reader-linux-armv7lh-static`.
  • `file` on the artifact reports `ELF 32-bit LSB ... ARM, EABI5`.
  • x86_64 and aarch64 jobs unchanged.

Uncomments the armv7lh matrix entry in build_cross.yml's pkvisor job
and adds ldflags: "-static" so it matches the x86_64 and aarch64
siblings. The musl-cross toolchain tarball is still hosted in the
repo's `toolchains` GitHub release; the downstream pkvisor-cli matrix
already includes armv7lh, so the Go binary cross-build is unaffected.

Restores static armv7 pktvisord / pktvisor-reader artifacts that have
been disabled since the 2023 docker-folder cleanup (32b15f2).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@leoparente
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

LCOV of commit 8f64d6b during Debug Builds #127

  lines......: 82.7% (13927 of 16844 lines)
  functions..: 73.1% (1416 of 1937 functions)
  branches...: no data found

Files changed coverage rate: n/a

Full coverage report

The protobuf 6.33.5 / v34.x cmake hardcodes `libprotobuf` (not the
function's target parameter) in its libatomic linkage branch:

    function(protobuf_configure_target target)
        if(protobuf_LINK_LIBATOMIC)
            target_link_libraries(libprotobuf PRIVATE atomic)
        endif()

When protobuf_LINK_LIBATOMIC=ON and the function is called for
libprotobuf-lite *before* libprotobuf is created, cmake fails:

    Cannot specify link libraries for target "libprotobuf" which is
    not built by this project.

This is upstream protobuf bug, fixed on main in PR #24068 but not
in any tagged release through v34.x. The try_compile that sets
protobuf_LINK_LIBATOMIC fires only on 32-bit ARM (no native 64-bit
atomics) — so the failure is armv7-specific. x86_64 and aarch64
have native 64-bit atomics, protobuf_LINK_LIBATOMIC stays OFF, and
the buggy branch is never reached.

Force protobuf_LINK_LIBATOMIC=OFF via a per-package conan conf in
the host profile. Safe for static-library consumers (protobuf is
built shared=False) because final pktvisor link already pulls in
-latomic via -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic. The conf
is a no-op for x86_64/aarch64 where the auto-detect already
yields OFF.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@leoparente leoparente closed this May 18, 2026
@leoparente leoparente deleted the chore/cross-armv7-reenable branch May 18, 2026 20:45
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.

1 participant