Skip to content

precompiled binaries affected by upstream golang issue #250

Closed

Description

@lczyk

fyi, the precompiled binaries in the releases section are compiled with go go1.24.6 and are subject to this issue in golang. this is fixed in golang dev (1.26). here is the issue re backporting for 1.24.

this, for example, prevents running chisel-releases spreads with docker backend

Activity

  1. polarathene commented on Nov 9, 2025

    @polarathene

    this, for example, prevents running chisel-releases spreads with docker backend

    I'm probably not understanding that statement properly, but you can run the native build host chisel in a container to build for another arch via --arch?

    Generally you would not want to defer to QEMU to build images for other arches the process with chisel will be much faster when it avoids that and runs with a native arch:

    # Custom chisel image/stage until an official image is published:
    # Use the build host native arch only:
    FROM --platform=${BUILDPLATFORM} alpine AS get-chisel
    ARG CHISEL_VERSION=1.3.0
    ARG BUILDARCH
    ARG CHISEL_RELEASE="https://github.com/canonical/chisel/releases/download/v${CHISEL_VERSION}/chisel_v${CHISEL_VERSION}_linux_${BUILDARCH}.tar.gz"
    # NOTE: `--no-same-owner` used as `chisel` release has ownership of `1001:128`
    RUN wget -qO - "${CHISEL_RELEASE}" | tar -xz --no-same-owner -C /usr/local/bin chisel
    
    
    # The forced platform above will get used here too:
    FROM get-chisel AS root-fs
    # Still required to create the root target upfront:
    # https://github.com/canonical/chisel/issues/206
    WORKDIR /root-fs
    # This approach is brittle if using more niche archs, but workaround is rather verbose/inconvenient:
    # https://github.com/canonical/chisel/issues/223
    ARG TARGETARCH
    # Symlink `sh -> bash` is added to support the default SHELL (only dash slice adds the symlink)
    RUN --mount=type=cache,target=/root/.cache/chisel,id="chisel-cache-${TARGETARCH}",sharing=locked \
      chisel cut --release ubuntu-24.04 --arch "${TARGETARCH}" --root /root-fs base-files_base bash_bins && \
      ln -s bash /root-fs/usr/bin/sh
    
    
    # Any `RUN` here for non-native target will be via QEMU,
    # Image will then be exported for the target platform
    FROM scratch
    COPY --link --from=root-fs /root-fs /

    While you could avoid the --platform constraint and use QEMU to avoid the --arch caveat, as noted in my closed issue if you're dependent upon a niche/legacy arch, that won't work (unless custom building chisel?), and of course it'd be much slower.

  2. lczyk commented on Apr 6, 2026

    @lczyk
    ContributorAuthor
  3. upils commented on Apr 7, 2026

    @upils
    Collaborator

    Closing as fixed by #274

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions