Skip to content

oras build fails with go toolchain not available #1350

Closed

Description

@Amulyam24

What happened in your environment?

$ make build-linux-ppc64le
GOARCH=ppc64le CGO_ENABLED=0 GOOS=linux go build -v --ldflags="-w -X oras.land/oras/internal/version.GitCommit=fa65f61c86fa75b23b8f2afffe1ba77a5fbf44b7 -X oras.land/oras/internal/version.GitTreeState=clean" \
        -o bin/linux/ppc64le/oras oras.land/oras/cmd/oras
go: downloading go1.22 (linux/ppc64le)
go: download go1.22 for linux/ppc64le: toolchain not available
make: *** [Makefile:81: build-linux-ppc64le] Error 1

What did you expect to happen?

Binary to be built successfully.

How can we reproduce it?

$ make build-linux-ppc64le
GOARCH=ppc64le CGO_ENABLED=0 GOOS=linux go build -v --ldflags="-w -X oras.land/oras/internal/version.GitCommit=fa65f61c86fa75b23b8f2afffe1ba77a5fbf44b7 -X oras.land/oras/internal/version.GitTreeState=clean" \
        -o bin/linux/ppc64le/oras oras.land/oras/cmd/oras
go: downloading go1.22 (linux/ppc64le)
go: download go1.22 for linux/ppc64le: toolchain not available
make: *** [Makefile:81: build-linux-ppc64le] Error 1

What is the version of your ORAS CLI?

Build failing

What is your OS environment?

Ubuntu 22.04.4 LTS

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Activity

  1. added
    bug
    triage
    on Apr 16, 2024
  2. qweeah commented on Apr 16, 2024

    @qweeah
    Contributor

    @Amulyam24 Thanks for reporting this issue. I am using Ubuntu 20.04 with go 1.22.1 and I cannot reproduce this issue. What is the version of the go binary you are using?

  3. Amulyam24 commented on Apr 16, 2024

    @Amulyam24
    ContributorAuthor

    @Amulyam24 Thanks for reporting this issue. I am using Ubuntu 20.04 with go 1.22.1 and I cannot reproduce this issue.
    Hi @qweeah, with go 1.22 it works.

    What is the version of the go binary you are using?
    1.21.3

  4. qweeah commented on Apr 16, 2024

    @qweeah
    Contributor

    The error is expected, you need to upgrade go to 1.22.* and then compile oras. IMHO, no change need on ORAS side.

  5. Amulyam24 commented on Apr 16, 2024

    @Amulyam24
    ContributorAuthor

    Updating the toolchain patch version works - #1351
    and this won't need updating the go version as it is handled internally by downloading the desired version for the build
    Is it not the desired approach?
    Reference - golang/go#66175

  6. TerryHowe commented on Apr 16, 2024

    @TerryHowe
    Member

    Thanks, I was having this issue too.

  7. removed
    triage
    on Apr 19, 2024
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions