Skip to content

Docker: link system libffi instead of fetching from GitHub#4

Merged
Getty merged 2 commits into
mainfrom
fix/docker-ffi-system-libffi
Jun 22, 2026
Merged

Docker: link system libffi instead of fetching from GitHub#4
Getty merged 2 commits into
mainfrom
fix/docker-ffi-system-libffi

Conversation

@Getty

@Getty Getty commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Was war kaputt

Der CI-Build von e7c2e5e schlug im Docker-Image-Build (@Author::GETTY::Docker) fehl — nicht in den Tests. Die Fehlerkette:

Git::Native → Git::Libgit2 → FFI::Platypus → Alien::FFI   ← Building Alien-FFI-0.27 failed

Der Commit selbst (.claude/-Agent-Struktur) hat weder Code, cpanfile, dist.ini noch Dockerfile angefasst. Beweis: Der grüne Run ~16 h zuvor baute dieselben Versionen (Alien-FFI-0.27, FFI-Platypus-2.11, Git-Native-0.003) erfolgreich. Also transient.

Ursache

Der Docker-builder setzt global ALIEN_INSTALL_TYPE=share. Das zwingt auch Alien::FFI in den share-Modus, wo es ein libffi-Tarball von einer GitHub-Release-Seite lädt und aus Quellcode baut. Alien::Build warnt selbst:

It looks like this alien is using the regular download negotiator plugin on a GitHub release page. This will typically not work due to changes in the way GitHub release page works now.

Dieser Download ist rate-limited / unzuverlässig → intermittierende Build-Fehler.

Fix

  • libffi-dev im builder ergänzt und Alien::FFI vorab mit ALIEN_INSTALL_TYPE=system installiert → linkt das System-libffi, kein GitHub-Download mehr.
  • Der libgit2-Vendoring-Pfad (share) bleibt unverändert → runtime bleibt self-contained.
  • libffi8 ins runtime-Image, da FFI::Platypus jetzt dynamisch gegen System-libffi.so linkt.

Verifikation

Lokaler Multi-Stage-Build, der den Dockerfile-Aufbau spiegelt:

  • Alien-FFI-0.27 baut in ~1,5 s ohne libffi-Fetch (vorher ~30–60 s Source-Build im share-Modus).
  • Alien-Libgit2 baut weiter vendored (~70 s via cmake).
  • runtime-Smoke-Test: perl -MGit::Native lädt FFI::Platypus + vendored libgit2 + system libffi sauber → SMOKE OK.

🤖 Generated with Claude Code

Getty and others added 2 commits June 22, 2026 18:00
Alien::FFI in share mode (the global ALIEN_INSTALL_TYPE=share) fetches a
libffi tarball from a GitHub release page to build it from source. That
download is fragile and rate-limited — Alien::Build itself warns the
release-page download negotiator "will typically not work" — and it broke
the Docker image build intermittently in CI (identical Alien-FFI-0.27 /
FFI-Platypus-2.11 succeeded ~16h earlier, then failed with no code change).

Install Alien::FFI up front with ALIEN_INSTALL_TYPE=system against the
packaged libffi (apt libffi-dev), so it links the system library and never
touches GitHub. The libgit2 vendoring (share build) is left untouched, so
the runtime stays self-contained; libffi8 is added to the runtime image for
the now-dynamically-linked FFI::Platypus.

Verified end-to-end with a multi-stage build mirroring the Dockerfile:
Alien::FFI links system libffi (no fetch), libgit2 still vendors, and the
runtime loads Git::Native + FFI::Platypus + libgit2 + libffi cleanly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A push trigger with branches: ['*'] only matches single-segment branch
names; a branch like fix/foo (with a slash) never fires the push event, so
feature branches silently get no on-push CI. ['**'] matches across slashes.
pull_request already covered PRs; this fixes direct branch pushes too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Getty Getty merged commit 02b34ce into main Jun 22, 2026
6 checks passed
@Getty Getty deleted the fix/docker-ffi-system-libffi branch June 22, 2026 17:13
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