Skip to content

Build robustness: surface build output, ERR-trap friendly failures, -j resource guard #9

Closed

Description

@VijitSingh97

Problem

cmake … &> /dev/null and make -j$CORES &> /dev/null (rigforge.sh:246-249) swallow all build output, so a failed compile aborts under set -e with zero diagnostics. There's also no ERR trap (pithead has on_err naming the step), and make -j$(nproc) can OOM the heavy XMRig build on low-RAM boxes.

Proposed

  • Tee build output to a logfile (and/or don't suppress it); on failure point the user at it.
  • Add a trap … ERR that names the failed step (mirror pithead's on_err).
  • Cap build parallelism on low-RAM hosts (reserve headroom).

Acceptance

  • Build failures show actionable output / a logfile path.
  • An ERR trap reports which step failed.
  • -j is bounded on low-memory machines.

Activity

  1. added this to the v1.0 milestone on Jun 3, 2026
  2. added theissue type on Jun 3, 2026
  3. VijitSingh97 commented on Jun 6, 2026

    @VijitSingh97
    ContributorAuthor

    #26 (closes #5) doesn't tackle the build-output / ERR-trap / -j items here, but two robustness-adjacent things from it are relevant:

    • Fixed a crash where rigforge.sh aborted under set -u in clean container/cron/CI environments because REAL_USER="${SUDO_USER:-$USER}" referenced an unset USER — now falls back to id -un. (Surfaced by the new Ubuntu E2E; the macOS suite missed it because Mac shells export USER.)
    • Finding for this issue: a missing /etc/logrotate.d makes generate_xmrig_config abort after the long compile — exactly the kind of unfriendly failure this issue is about. A one-line guard fixes it; I reverted it from test: add sourceable test suite + Ubuntu E2E (closes #5) #26 to keep that PR scoped, so it's a good candidate to pick up here.

    The new test suite also gives this issue a place to assert friendlier failures once the ERR trap / build-output handling lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    setupConfiguration and first-run setup

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions