Skip to content

golang package GOROOT_FINAL seems incorrect #6363

Closed
@cpuguy83

Description

@cpuguy83

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

Metadata

Metadata

Assignees

Labels

2.0AzureLinux 2.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions