Skip to content

fix: Use system cryptography package on ARM v7 to fix Docker build#89

Merged
thiagoralves merged 4 commits into
developmentfrom
fix/armv7-cryptography-build
Jan 23, 2026
Merged

fix: Use system cryptography package on ARM v7 to fix Docker build#89
thiagoralves merged 4 commits into
developmentfrom
fix/armv7-cryptography-build

Conversation

@thiagoralves

Copy link
Copy Markdown
Contributor

Summary

  • Fixes Docker multi-arch build failure on linux/arm/v7 architecture
  • Adds python3-cryptography to apt dependencies
  • Uses --system-site-packages for plugin venvs on ARM v7 (mirrors existing MSYS2 strategy)

Problem

The Docker build was failing on ARM v7 with:

src/c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
   15 | #include <ffi.h>

This happens because:

  1. OPC-UA plugin requires asyncuacryptographycffi
  2. On ARM v7, there are no pre-built wheels for cffi
  3. Building from source requires libffi-dev and fails

Solution

Instead of adding build dependencies, we use the same strategy as MSYS2:

  1. Install python3-cryptography via apt (pre-built for all Debian architectures)
  2. Create plugin venvs with --system-site-packages on ARM v7
  3. The venv can then use the system-installed cryptography package

Test plan

  • Verify Docker multi-arch build passes for linux/arm/v7
  • Verify linux/amd64 and linux/arm64 builds still work
  • Verify OPC-UA plugin loads correctly on ARM v7

🤖 Generated with Claude Code

On ARM v7 (linux/arm/v7), pre-built wheels for cffi/cryptography are not
available on PyPI, causing pip to attempt building from source. This fails
because the build requires libffi-dev.

This fix:
- Installs libffi-dev for building cffi if needed
- Installs python3-cffi and python3-cryptography via apt (pre-built)
- Uses --system-site-packages when creating plugin venvs on ARM v7
- Mirrors the existing MSYS2 strategy for handling packages that can't
  be built from source

Fixes Docker multi-arch build failure on linux/arm/v7.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@thiagoralves thiagoralves force-pushed the fix/armv7-cryptography-build branch from 60fe701 to 3eff7de Compare January 23, 2026 17:53
thiagoralves and others added 3 commits January 23, 2026 12:55
Allow manual workflow dispatch to specify which platforms to build.
Useful for testing platform-specific fixes without building all archs.

Default remains all platforms (linux/amd64,linux/arm64,linux/arm/v7).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
libffi-dev alone provides the headers needed to build cffi from source.
python3-cffi and python3-cryptography were redundant since pip
successfully builds and installs newer versions in the venv.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
With libffi-dev installed, cffi can be built from source on ARM v7.
The --system-site-packages workaround is no longer needed for this
platform. MSYS2 still requires it due to Windows-specific build issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@thiagoralves thiagoralves merged commit 1e8b7d2 into development Jan 23, 2026
1 check passed
@thiagoralves thiagoralves deleted the fix/armv7-cryptography-build branch January 23, 2026 18:37
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