Files
fruix/docs/reports/phase1-guile-json-freebsd.md

5.3 KiB

Phase 1.2 follow-up: local Guile-JSON built on FreeBSD and checkout investigation advanced again

Date: 2026-04-01

Summary

This step addressed the next Guix checkout blocker found after adding local Guile-GnuTLS and Guile-Git support on FreeBSD.

Added/updated files:

  • tests/guix/build-local-guile-json.sh
  • updated tests/guix/run-derivation-generation-investigation.sh

The result is:

  1. guile-json can be built successfully on FreeBSD against the previously validated fixed local Guile build
  2. it can be installed into the same local dependency prefix already used for the earlier checkout prerequisite work
  3. after making (json) available, the Guix checkout configure step advances again
  4. the next checkout blocker is now Guile-SQLite3

Inputs used

Local Guile

The same fixed local Guile build was used:

  • /tmp/guile-freebsd-validate-install/bin/guile

Existing local dependency prefix

This step reused the same local dependency prefix already populated by earlier prerequisite builds:

  • /tmp/guile-gnutls-freebsd-validate-install

At this point that prefix contains at least:

  • Guile-GnuTLS
  • Guile bytestructures
  • Guile-Git
  • Guile-JSON

Guix source-of-truth package definition

This step used the current Guix package definition in ~/repos/guix/gnu/packages/guile.scm:

  • guile-json
  • version 4.7.3
  • Guix nix-base32 source hash:
    • 127k2xc07w1gnyqs40z4865l8p3ra5xgpcn569dz04lxsa709fiq

Translated and verified SHA256:

38ba048ed29d12f05b32c5b2fb7a51795c448b41e403a2b1b72ff0035817f388

Build findings

1. The release tarball builds cleanly on FreeBSD with the fixed local Guile

Unlike the earlier Guile-Git step, guile-json was built from the upstream release tarball rather than a Git checkout, so no autotools regeneration step was required in this validation pass.

2. No new FreeBSD-specific source patch was needed

Unlike the earlier Guile-GnuTLS step, this build did not require any FreeBSD-specific source patch.

3. The validation matched Guix's actual configure-time expectation

Guix does not merely check that (json) loads; configure.ac calls GUIX_CHECK_GUILE_JSON, which requires a recent-enough Guile-JSON providing define-json-mapping.

The local validation therefore used the same kind of test:

  • load (json)
  • define a small JSON mapping with define-json-mapping
  • decode a JSON object and confirm the mapped record matches the expected value

Observed validation result:

ok

Validation command

ENV_OUT=/tmp/guile-json-env.sh \
METADATA_OUT=/tmp/guile-json-metadata.txt \
./tests/guix/build-local-guile-json.sh

Default install prefix used by the harness:

/tmp/guile-gnutls-freebsd-validate-install

Result

The local Guile-JSON build succeeded.

Observed checks:

json module check: ok
Existing (gnutls) module in prefix: present
Existing (git) module in prefix: present

This means the same local prefix now satisfies at least the following mandatory Guix checkout module requirements previously encountered on FreeBSD:

  • (gnutls)
  • (git) with recent Guile-Git export support
  • (json) with recent-enough define-json-mapping support

Re-running the checkout investigation

After installing Guile-JSON, the derivation-generation investigation was re-run with:

GUILE_EXTRA_PREFIX=/tmp/guile-gnutls-freebsd-validate-install \
METADATA_OUT=/tmp/guix-derivation-investigation-with-json.txt \
./tests/guix/run-derivation-generation-investigation.sh

The investigation continued to use the requested experimental directories:

  • store: /frx/store
  • local state: /frx/var
  • sysconf: /frx/etc

Updated result

With (gnutls), (git), and (json) available, the Guix checkout configure step progresses farther and now fails at the next missing Guile dependency:

configure: error: A recent Guile-SQLite3 could not be found; please install it.

Relevant configure summary lines observed:

checking whether Guile-JSON is available and recent enough... yes
configure: error: A recent Guile-SQLite3 could not be found; please install it.

What this step demonstrates

This step demonstrates that:

  1. the earlier Guile-JSON blocker is genuinely cleared on FreeBSD when using the fixed local Guile build plus the local dependency prefix
  2. the checkout can move one more dependency layer deeper than before
  3. the project is still in the checkout-prerequisite stage rather than the derivation/store/daemon stage
  4. the next concrete prerequisite for reaching deeper Guix checkout usability on FreeBSD is Guile-SQLite3

Current blocker stack

The current checkout path is now blocked by:

  1. unsupported-platform configure gating unless --with-courage is used
  2. missing recent Guile-SQLite3 after supplying:
    • Guile-GnuTLS
    • Guile-Git
    • Guile-JSON

The earlier missing blockers have now been cleared locally for validation:

  • (gnutls)
  • (git) / recent Guile-Git export requirement
  • recent (json) support

Obtain or build Guile-SQLite3 compatible with the same fixed local Guile build, install it into the same local dependency prefix, and re-run the derivation-generation investigation again.

That should show whether the next boundary lies at:

  • Guile-Gcrypt
  • Guile-zlib
  • Guile-lzlib
  • Guile-semver
  • or finally something beyond configure-time Guile module prerequisites