Packge os/users incorrectly built on amd64 arch

Bug #1211749 reported by Geoff Teale
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
golang (Debian)
Fix Released
Unknown
golang (Ubuntu)
Fix Released
Critical
Unassigned
Saucy
Fix Released
Critical
Unassigned

Bug Description

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.

Related branches

Revision history for this message
Geoff Teale (tealeg) wrote :
James Page (james-page)
Changed in golang (Ubuntu Saucy):
status: New → Triaged
importance: Undecided → Critical
Changed in golang (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package golang - 2:1.1.2-2ubuntu1

---------------
golang (2:1.1.2-2ubuntu1) saucy; urgency=low

  * Merge from Debian unstable (LP: #1211749, #1202027). Remaining changes:
    - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
    - d/control,control.cross: Update Breaks/Replaces for Ubuntu
      versions to ensure smooth upgrades, regenerate control file.

golang (2:1.1.2-2) unstable; urgency=low

  * Build golang-go-linux-* for each architecture (Thanks James Page)
    (Closes: #719611)
  * Update lintian-overrides to override statically-linked-binary and
    unstripped-binary-or-object for all of golang-go

golang (2:1.1.2-1) unstable; urgency=low

  * New upstream release.
  * Relicense debian/ under the Go license to match upstream. All copyright
    holders agreed to this. (Closes: #716907)
  * golang-mode: don’t install for a number of emacs versions which are not
    supported upstream (Thanks Kevin Ryde) (Closes: #702511, #717521)
 -- James Page <email address hidden> Tue, 20 Aug 2013 14:06:23 +0100

Changed in golang (Ubuntu Saucy):
status: Triaged → Fix Released
Changed in golang (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.