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

golang package GOROOT_FINAL seems incorrect #6363

Closed
Tracked by #24
cpuguy83 opened this issue Oct 6, 2023 · 3 comments · May be fixed by #6388
Closed
Tracked by #24

golang package GOROOT_FINAL seems incorrect #6363

cpuguy83 opened this issue Oct 6, 2023 · 3 comments · May be fixed by #6388
Assignees
Labels
2.0 AzureLinux 2.0

Comments

@cpuguy83
Copy link

cpuguy83 commented Oct 6, 2023

In https://github.com/microsoft/CBL-Mariner/blob/ae993d0b3288b1bb291f5f468169fa36b681b4d4/SPECS/golang/golang.spec#L82

It seems to be setting GOROOT to /usr/bin/go.
But /usr/bin/go is a binary.
Actual GOROOT should be /usr/lib/golang in this case.

I found this while trying to build packages that depend on go using the mariner toolkit.
For whatever reason in the chroot during package build /etc/profile is not being sourced so GOROOT (and other GO* vars) are left unset leaving them to the compiled-in versions.
This yields a somewhat cryptic error (or at least very unexpected) like: go: cannot find GOROOT directory: /usr/bin/go

@cpuguy83
Copy link
Author

cpuguy83 commented Oct 27, 2023

Relevant for go1.21: golang/go#62047

GOROOT_FINAL support is being dropped.

@sozercan
Copy link
Member

cc @jslobodzian

@mfrw
Copy link
Member

mfrw commented Feb 10, 2024

Fixed as per upgrade to go1.21.6

Apologies for the long turn-around-time :(
/cc @cpuguy83

@mfrw mfrw closed this as completed Feb 10, 2024
@mfrw mfrw added the 2.0 AzureLinux 2.0 label Feb 10, 2024
@mfrw mfrw self-assigned this Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 AzureLinux 2.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants