Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oras build fails with go toolchain not available #1350

Closed
1 task done
Amulyam24 opened this issue Apr 16, 2024 · 5 comments · Fixed by #1351
Closed
1 task done

oras build fails with go toolchain not available #1350

Amulyam24 opened this issue Apr 16, 2024 · 5 comments · Fixed by #1351
Labels
bug Something isn't working

Comments

@Amulyam24
Copy link
Contributor

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.
@Amulyam24 Amulyam24 added bug Something isn't working triage New issues or PRs to be acknowledged by maintainers labels Apr 16, 2024
@qweeah
Copy link
Contributor

qweeah commented Apr 16, 2024

@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?

@Amulyam24
Copy link
Contributor Author

@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

@qweeah
Copy link
Contributor

qweeah commented Apr 16, 2024

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

@Amulyam24
Copy link
Contributor Author

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

@TerryHowe
Copy link
Member

Thanks, I was having this issue too.

@qweeah qweeah removed the triage New issues or PRs to be acknowledged by maintainers label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants