Skip to content

cmd/dist: The OSX build breaks if /usr/sbin is not in the path #13425

Description

@williamh

On Darwin, it appears that the method of determining whether default GOHOSTARCH setting should be amd64 relies on sysctl. There are use cases where sysctl is not in the users' path. In situations like this, the OSx build of go will break.

For an example, see https://bugs.gentoo.org/show_bug.cgi?id=558368.

The suggested patch for that bug is to hard code the path to /usr/sbin/sysctl in the command.

Before I do that, I'm wondering if you are interested in doing so upstream, or if there is a better way to do this autodetection on OSx?

Thanks much,

William

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions