-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
user.Current panic in darwin-amd64 when crosscompiled from linux-amd64 #6376
Labels
Comments
os/user relies on cgo, and cgo is disabled for cross compiling, thus this is expected. if you use os/user, you must compile natively on OS X. even if we enable cross compilation cgo support, I doubt everybody have a working OS X cross toolchain on their linux machine. Status changed to WorkingAsIntended. |
yudai
added a commit
to yudai/gotty
that referenced
this issue
Aug 23, 2015
`os/user.Current()` is not available on Darwin when a binary is cross compiled from another platform. See also: golang/go#6376
tsenart
pushed a commit
to d2iq-archive/mesos-dns
that referenced
this issue
Sep 23, 2015
As reported in golang/go#6376, `os/user.Current` doesn't work with cross-compilation. This commit replaces its use with `os.Getenv` of the `$HOME` and `$USERPROFILE` environment variables. Fixes #275
ebartels
added a commit
to ebartels/hdfs
that referenced
this issue
Oct 2, 2015
hlidotbe
added a commit
to epicagency/deploybot-cli
that referenced
this issue
Oct 3, 2015
user.Current() relies on cgo (well os/user does) and thus is not cross compilable See golang/go#6376
andreaskoch
added a commit
to andreaskoch/allmark
that referenced
this issue
Nov 17, 2015
user.Current() fails on Mac OS for binaries that have been cross-compiled on another OS than Mac with the message: "Error: user: Current not implemented on darwin/amd64" Since this is, for some reason unclear to me, intended behaviour by go (see: golang/go#6376) I will use Mitchell Hachimoto's go-homedir library for determining the current users home directory path. I also fixed two failing unit tests that are unrelated to this feature. Fixes issue /issues/1
ebartels
added a commit
to ebartels/hdfs
that referenced
this issue
Dec 21, 2015
colinmarc
added a commit
to colinmarc/hdfs
that referenced
this issue
Jan 4, 2016
Use environment for determining user per golang/go#6376
Closed
diwakergupta
pushed a commit
to dropbox/dbxcli
that referenced
this issue
Mar 11, 2016
This causes issues with cross-compilation due to golang/go#6376 Use https://github.com/mitchellh/go-homedir instead.
This issue was closed.
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
The text was updated successfully, but these errors were encountered: