https://bugzilla.redhat.com/show_bug.cgi?id=1135152
Bug ID: 1135152 Summary: user: Current not implemented on linux/amd64 Product: Fedora Version: 20 Component: golang Assignee: vbatts@redhat.com Reporter: adam@spicenitz.org QA Contact: extras-qa@fedoraproject.org CC: admiller@redhat.com, golang@lists.fedoraproject.org, lemenkov@gmail.com, lsm5@fedoraproject.org, renich@woralelandia.com, s@shk.io, vbatts@redhat.com
Description of problem: golang seems to be using some cross-compiled components which are causing problems. Specifically, Fedora has exactly the problem described here: http://stackoverflow.com/questions/20609415/cross-compiling-user-current-not...
Here is the sample code from that page:
package main
import ( "fmt" "os/user" )
func main() { fmt.Println(user.Current()) }
You can build the sample code and see the problem directly:
$ go build ./current.go $ ./current <nil> user: Current not implemented on linux/amd64
Version-Release number of selected component (if applicable): golang-1.2.2-22.fc20.x86_64
How reproducible: Always
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #1 from Adam Goode adam@spicenitz.org --- Here is a related upstream bug that describes this behavior: https://code.google.com/p/go/issues/detail?id=6376
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
Adam Goode adam@spicenitz.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|20 |21
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
Wayne Walker wwalker@bybent.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wwalker@bybent.com
--- Comment #2 from Wayne Walker wwalker@bybent.com --- If one downloads golang from golang.org (http://golang.org/dl/ the tar.gz "go1.4.1.linux-amd64.tar.gz", and use that, the bug is not there. This is a fedora build failure:
wwalker@wwalker-desktop:~$ sudo tar -C /usr/local -xzf go1.3.3.linux-amd64.tar.gz wwalker@wwalker-desktop:~$ PATH=/usr/local/bin:$PATH wwalker@wwalker-desktop:~$ cd - /home/wwalker/golang_workspace/src/github.com/wwalker/hello wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ rm -rf ~/golang_workspace/pkg/* wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ rm -rf ~/golang_workspace/bin/* wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ go install wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ hello asdf wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ PATH=/usr/bin:$PATH wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ go install wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ hello asdf wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ rm -rf ~/golang_workspace/bin/* wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ rm -rf ~/golang_workspace/pkg/* wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ go install wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ hello user: Current not implemented on linux/amd64
wwalker@wwalker-desktop:~/golang_workspace/src/github.com/wwalker/hello$ rpm -q golang golang-1.3.3-1.fc21.x86_64
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #3 from Vincent Batts vbatts@redhat.com --- """ 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.
""" Upstream issue closed as WorkingAsIntended.
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #4 from Vincent Batts vbatts@redhat.com --- ah, i see. this has to deal with the artifacts chosen by koji when the rpm is built across the arm, i386 and x86_64 builders. argh.
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #5 from Miloslav Trmač mitr@redhat.com --- (To list a real-world impact:) this breaks build of https://github.com/docker/notary/blob/master/cmd/notary/main.go .
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #6 from Vincent Batts vbatts@redhat.com --- Can you test this on the go1.5 build that is in f23/f24(rawhide)?
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #7 from Vincent Batts vbatts@redhat.com --- http://koji.fedoraproject.org/koji/packageinfo?packageID=16224
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #8 from Nalin Dahyabhai nalin@redhat.com --- Both claim to require a matching build of golang-src that doesn't exist. If I use --nodeps to install the f23 package on x86_64, the sample code builds and runs, printing out the expected contents of a User struct describing my logged-in user: &{1000 1000 nalin Nalin Dahyabhai /home/nalin} <nil>
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
techtonik@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |techtonik@gmail.com
--- Comment #9 from techtonik@gmail.com --- This also breaks LXD (friendly LXC wrapper) on Fedora https://github.com/lxc/lxd/issues/830 Is there any workaround?
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #10 from Vincent Batts vbatts@redhat.com --- (In reply to Nalin Dahyabhai from comment #8)
Both claim to require a matching build of golang-src that doesn't exist. If I use --nodeps to install the f23 package on x86_64, the sample code builds and runs, printing out the expected contents of a User struct describing my logged-in user: &{1000 1000 nalin Nalin Dahyabhai /home/nalin} <nil>
there are several rpms to update (golang, golang-bin, golang-src), not just a single rpm. Download them all, and `rpm -Uvh golang*rpm`.
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #11 from Nalin Dahyabhai nalin@redhat.com --- Ah, they're noarch, so I missed them when downloading them with koji download-build. Same result: they work.
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #12 from Vincent Batts vbatts@redhat.com --- right, so go1.5 fixes this. Presently on f23 and rawhide. Soon we can roll this out safely to el6 and prior fedora releases.
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
Vincent Batts vbatts@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RELEASE_PENDING
--- Comment #13 from Vincent Batts vbatts@redhat.com --- go1.5 is in -testing for f21, f22 and el6
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #14 from Fedora End Of Life endoflife@fedoraproject.org --- This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'.
Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #15 from Miloslav Trmač mitr@redhat.com --- Fix confirmed as of golang-1.5.1-0.fc22.x86_64.
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
Fedora End Of Life honza.kurik@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RELEASE_PENDING |CLOSED Resolution|--- |WONTFIX Last Closed| |2015-12-01 22:35:41
https://bugzilla.redhat.com/show_bug.cgi?id=1135152
--- Comment #16 from Fedora End Of Life honza.kurik@gmail.com --- Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug.
Thank you for reporting this bug and we are sorry it could not be fixed.
golang@lists.fedoraproject.org