Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from cross-compilation to QEMU-based emulation builds #396

Merged
merged 4 commits into from
Dec 30, 2024

Conversation

felddy
Copy link
Owner

@felddy felddy commented Dec 30, 2024

🗣 Description

This change removes the tonistiigi/xx cross-compilation toolchain and instead relies on QEMU-based emulation for building multi-platform images. The Dockerfile is simplified by eliminating platform-specific commands (xx-apt) and dependencies.

Supported platforms are now limited to those that successfully build with the emulation approach. Platforms requiring additional changes can be added later via PRs.

Also:

  • modifies how the --version flag determines the version of the container. Needed to support the 5.1.0+r1 tag.
  • normalizes recommended :5 tag in sample docker-compose.yml and README.md.

💭 Motivation and context

pip was installing the wrong C extensions for some libraries. Specifically ephem.

🧪 Testing

On development box, production, and in CI.

Output from container built in GitHub Actions and pulled to an arm64 machine:

weewx@a3ca7e05579a:/home/weewx$ uname -a
Linux a3ca7e05579a 6.8.0-39-generic #39-Ubuntu SMP PREEMPT_DYNAMIC Sat Jul  6 02:50:39 UTC 2024 aarch64 GNU/Linux
weewx@a3ca7e05579a:/home/weewx$ find /opt/venv/lib/python3.13/site-packages/ephem/ -name _libastro*.so
/opt/venv/lib/python3.13/site-packages/ephem/_libastro.cpython-313-aarch64-linux-gnu.so

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Add a tag or create a release.

This change removes the `tonistiigi/xx` cross-compilation toolchain
and instead relies on QEMU-based emulation for building multi-platform
images. The Dockerfile is simplified by eliminating platform-specific
commands (`xx-apt`) and dependencies.

Supported platforms are now limited to those that successfully build
with the emulation approach. Platforms requiring additional changes
can be added later via PRs.
@felddy felddy marked this pull request as ready for review December 30, 2024 01:35
@felddy felddy merged commit 7d4b6ed into develop Dec 30, 2024
34 checks passed
@felddy felddy deleted the issue/395 branch December 30, 2024 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ephem package fails to install correctly for non-x86 architectures
1 participant