Public bug reported:

Currently the golang-go package ( golang-go_1.1.1-4ubuntu1_amd64.deb )
distributes a crippled version of the corse os/user package because of
the way it handles cgo for cross-compiling.

The source code for the os/user package contains three implementations
it's lookup module:

- lookup_unix.go (the one we should use on Linux)
- lookup_windows.go (for windows, obviously)
- lookup_stubs.go (the fallback for other platforms)

.. each of thes files has build conditions in it's header.  We should
use the lookup_unix.go file, but it will only be used it the "cgo" flag
is set - which isn't the case for the amd64 build if we cross compile
from i386.  So we end up using lookups_stub.go, which returns an error
message when calling any of it's functions.

I'll attach a trivial go program that will demonstrate the failure.  If
you compile go on an amd64 machine and compile the program with it then
it'll work, but if you use the packaged version it will fail.

** Affects: golang (Ubuntu)
     Importance: Critical
         Status: Triaged

** Affects: golang (Ubuntu Saucy)
     Importance: Critical
         Status: Triaged

** Attachment added: "main.go"
   https://bugs.launchpad.net/bugs/1211749/+attachment/3771028/+files/main.go

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1211749

Title:
  Packge os/users incorrectly built on amd64 arch

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/golang/+bug/1211749/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to