Skip to content

Dockerfile: install fp-units-fcl (SyncObjs) + adjacent unit packages - #251

Merged
FMXExpress merged 1 commit into
mainfrom
claude/dockerfile-fp-units-fcl
Jun 13, 2026
Merged

FMXExpress merged 1 commit into
mainfrom
claude/dockerfile-fp-units-fcl

Conversation

@FMXExpress

Copy link
Copy Markdown
Owner

Summary

DO App Platform build fails at the FPC link step:

PasClaw.Logger.pas(54,3) Fatal: Can't find unit SyncObjs used by PasClaw.Logger
Fatal: Compilation aborted
make: *** [Makefile:176: /out/pasclaw] Error 1

SyncObjs (FPC's TCriticalSection home) ships in Debian's fp-units-fcl package, which fp-compiler does NOT pull as a hard dependency on Bookworm. The PR #248 Dockerfile only requested fp-compiler + fp-units-db + fp-units-misc, so SyncObjs (and several other adjacent units) silently weren't present.

Fix

Add fp-units-fcl, fp-units-base, fp-units-rtl to the apt install. Comment block above the apt line maps each package to the PasClaw unit / feature that needs it so the next person hit by "Can't find unit X" can grep that block and know exactly which fp-units-* package to add (the FPC error itself doesn't give you the package name — you have to reverse-map by trial-and-error without this comment).

Package What's in it (PasClaw-relevant)
fp-units-base Classes / SysUtils / StrUtils / DateUtils
fp-units-fcl SyncObjs — TCriticalSection used by PasClaw.Logger, PasClaw.Otel, PasClaw.Tools.OutputCache, MCP, etc. (the actual fix)
fp-units-db fcl-db / SQLite3Connection (memory_search, kb_*, session_search)
fp-units-misc iconvenc (web_fetch HTML→text decoder)
fp-units-rtl Belt-and-suspenders; fp-compiler usually pulls it but Debian's dep chain has flexed before
lazarus-src Masks unit (fs_grep's include glob filter)

Why this slipped past local smoke

make smoke runs on a host that uses apt install fpc — the meta-package that pulls everything. The Dockerfile uses apt install fp-compiler for a leaner build image, which means each unit dependency has to be requested explicitly. Lesson learned; the comment block now documents the mapping so future Dockerfile edits stay aware.

Test plan

  • make smoke — green
  • DO build retried after this PR merges (operator validation; the symptom from the issue was the exact error this fixes).

Scope

1 file changed, +17 lines (3 apt package additions + the explanatory comment block). No other code changes.


Generated by Claude Code

DO App Platform build failed at the link step with:

  PasClaw.Logger.pas(54,3) Fatal: Can't find unit SyncObjs used by
  PasClaw.Logger

SyncObjs is the FPC TCriticalSection home -- used by PasClaw.Logger,
PasClaw.Otel, PasClaw.Tools.OutputCache, MCP, etc. It ships in
Debian's fp-units-fcl package, which fp-compiler does NOT pull as a
hard dependency on Bookworm. The PR #248 Dockerfile only requested
fp-compiler + fp-units-db + fp-units-misc, so SyncObjs (and several
other adjacent units) silently weren't present.

Fix: add fp-units-fcl, fp-units-base, fp-units-rtl to the apt
install. Comment block above the apt line maps each package to the
PasClaw unit / feature that needs it -- the next person hit by
"Can't find unit X" can grep that block and know exactly which
fp-units-* package to add (the FPC error itself doesn't give you
the package name; you have to reverse-map by trial-and-error
without this).

After-fix unit -> apt mapping:
  fp-units-base  -- Classes / SysUtils / StrUtils / DateUtils
  fp-units-fcl   -- SyncObjs (THE fix)
  fp-units-db    -- fcl-db / SQLite3Connection
  fp-units-misc  -- iconvenc (web_fetch)
  fp-units-rtl   -- belt-and-suspenders; usually pulled by fp-compiler
  lazarus-src    -- Masks (fs_grep's `include` glob filter)

No other PasClaw changes; `make smoke` green on the host system
which has all units installed (which is how this regression slipped
past -- the host runs apt install fpc which is the meta-package).
@FMXExpress
FMXExpress merged commit 60e6701 into main Jun 13, 2026
khongten001 pushed a commit to khongten001/PasClaw that referenced this pull request Jul 13, 2026
… wiring

The PR FMXExpress#250 root Dockerfile was written from scratch and missed
several units (`opensslsockets` in LocalVector.OrtProvision is the
latest casualty after `SyncObjs` from PR FMXExpress#251) AND didn't bring in
the libssl1.0 RPATH/multi-arch/buildx work from docker/Dockerfile
that was carefully sorted out in PR FMXExpress#121.

docker/Dockerfile has been the canonical "this builds and runs"
shape since PR FMXExpress#121 -- bookworm builder + `fpc` meta-package (pulls
every fp-units-*), multi-arch libssl1.0.2 fetched from
snapshot.debian.org's immutable archive, patched RPATH=$ORIGIN so
Indy's plain `dlopen("libssl.so")` resolves to the bundled
libraries. Container2wasm builds use the same Dockerfile via
`make C2W=1 browser` -> `--build-arg C2W=1`.

This PR:
  - Moves docker/Dockerfile to the repo root (overwrites the
    broken PR FMXExpress#250 root Dockerfile in place).
  - Adds the DigitalOcean App Platform first-boot wiring at the
    end of the runtime stage:
       COPY digitalocean/entrypoint.sh        /usr/local/bin/...
       COPY digitalocean/config.template.json /etc/pasclaw/...
       ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
       CMD ["gateway", "--addr", "0.0.0.0", "--port", "8088"]
  - Rewrites digitalocean/entrypoint.sh to handle BOTH the default
    case (no CMD args -> gateway) AND pass-through (`docker run
    pasclaw version` / `agent -m "..."` / etc. flow verbatim).
    The original PR FMXExpress#248 entrypoint always hardcoded `gateway`
    which would have broken the `docker run pasclaw version` use
    case that docker/README.md documents.
  - Updates docker/README.md: drops `-f docker/Dockerfile` from
    the build commands (no longer needed). The Quick start, multi-
    arch buildx, and Configuration sections all stay accurate.
  - Removes the now-unused docker/Dockerfile.

Net effect:
  - DigitalOcean App Platform now builds end-to-end (the
    `opensslsockets` Fatal goes away because fpc meta pulls
    fp-units-net implicitly).
  - Docker Hub / GHCR push paths from docker/README.md continue
    to work, just without the -f flag.
  - Container2wasm builds (`make C2W=1 browser`) continue to work
    -- the C2W=1 build-arg is preserved.
  - One Dockerfile, one canonical container shape, no more drift
    between the docker/ and root flavours.

PasClaw core untouched; `make smoke` green.
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