patches for cgo on arm64

Bug #1361940 reported by Michael Hudson-Doyle on 2014-08-27
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.9 (Ubuntu)
Undecided
Unassigned
Trusty
Undecided
Unassigned
Utopic
Undecided
Unassigned
gccgo-4.9 (Ubuntu)
Undecided
Unassigned
Trusty
Undecided
Unassigned
gccgo-go (Ubuntu)
Trusty
Undecided
Unassigned

Bug Description

Hi, I'm attaching three patches that together with https://bugs.launchpad.net/ubuntu/+source/gccgo-go/+bug/1361946 makes cgo work with gccgo on arm64.

0001-compiler-symbol-names-should-have-.-replaced-with-_.patch -- this isn't actually arm64 specific at all, but a general gccgo/cgo problem
0002-debug-elf-support-arm64-relocations.patch -- cgo parses dwarf data from .o files and can't do it without this
0003-Enable-cgo-by-default-on-linux-arm64.patch -- this means that I don't have to remember to run export CGO_ENABLED=1 all the time

Let me know if you need any more info.

Michael Hudson-Doyle (mwhudson) wrote :
description: updated
description: updated

The attachment "0001-compiler-symbol-names-should-have-.-replaced-with-_.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Michael Hudson-Doyle (mwhudson) wrote :

And here's another one.

Michael Hudson-Doyle (mwhudson) wrote :

And here's a better version of the 0002 patch (patch(1) screwed up applying the version that went upstream to the code in gccgo :()

Michael Hudson-Doyle (mwhudson) wrote :

The patches work with the 4.9.1 in trusty-proposed too (apart from the lexing one, that's already fixed in 4.9.1, go me for duplicating effort :/)

Matthias Klose (doko) on 2014-09-03
Changed in gcc-4.9 (Ubuntu Trusty):
status: New → Invalid
Changed in gccgo-4.9 (Ubuntu Utopic):
status: New → Invalid
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.9 - 4.9.1-12ubuntu2

---------------
gcc-4.9 (4.9.1-12ubuntu2) utopic; urgency=medium

  * Update to SVN 20140903 (r214876) from the gcc-4_9-branch.
  * Enable cgo on AArch64 (Michael Hudson). LP: #1361940.
  * Update the Linaro support from the Linaro/4.9 branch.

gcc-4.9 (4.9.1-12) unstable; urgency=medium

  [ Samuel Thibault ]
  * boehm-gc: use anonymous mmap instead of brk also on hurd-*.
    Closes: #753791.

gcc-4.9 (4.9.1-11) unstable; urgency=medium

  * Update to SVN 20140830 (r214759) from the gcc-4_9-branch.
  * Update cross installation patches for the branch.
  * Use the base version (4.9) when accessing files in gcc_lib_dir.
 -- Matthias Klose <email address hidden> Wed, 03 Sep 2014 16:21:46 +0200

Changed in gcc-4.9 (Ubuntu Utopic):
status: New → Fix Released

Hello Michael, or anyone else affected,

Accepted gccgo-4.9 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gccgo-4.9/4.9.3-0ubuntu4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gccgo-4.9 (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed

So I started doing verification for this, found that the patches from bug 1361946 are required, brought them up to date, and then the arm64 node I was testing fell over. Next week, I guess.

Got access to another machine and tested. My test was pretty basic, using this file:

ubuntu@ms10-36-mcdivittB0:~$ cat trivialcgo.go
package main

import "C"

func main() {

}

Even with the patch in https://bugs.launchpad.net/ubuntu/+source/gccgo-go/+bug/1361946/comments/16 this file cannot be run:

ubuntu@ms10-36-mcdivittB0:~$ go run trivialcgo.go
no buildable Go source files in /home/ubuntu

But after installing gccgo-4.9 from proposed, it can:

ubuntu@ms10-36-mcdivittB0:~$ go run trivialcgo.go
ubuntu@ms10-36-mcdivittB0:~$

(I was going to test using docker, but I can't remember which version of docker I used before: the one in trusty-updates does not build, I think because it depends on the patching of the standard library archive/tar package by add-tar-xattr-support.patch that the debian packaging for golang in trusty carries but that gccgo does not. I can probably find a version that works if you really want).

tags: added: verification-done
removed: verification-needed
Matthias Klose (doko) on 2015-11-26
no longer affects: gccgo-go (Ubuntu)
no longer affects: gccgo-go (Ubuntu Utopic)
no longer affects: gccgo-4.9 (Ubuntu Utopic)
Launchpad Janitor (janitor) wrote :
Download full text (35.7 KiB)

This bug was fixed in the package gccgo-4.9 - 4.9.3-0ubuntu4

---------------
gccgo-4.9 (4.9.3-0ubuntu4) trusty-proposed; urgency=medium

  * Upload the final GCC 4.9.3 release.
  * Merge changes from gcc-4.9 4.9.3-2ubuntu1, including:
    - Fix PR go/60931, garbage collector issue with non 4kB system page size.
      LP: #1304754.
    - Fix wrong-code issue in the little endian vector API (ppc64el).
      LP: #1311128.
    - Fix ABI incompatibility between POWER and Z HTM builtins and intrinsics.
      LP: #1320292.
    - Fix an ICE with invalid code. PR c++/61046. LP: #1313102.
    - gccgo: Don't overwrite memory if an archive has a bad file name.
    - Fix PR rtl-optimization/61801, sched2 miscompiles syscall sequence with -g.
    - libgo: Fix unexpected GC interfering with closure passing.
    - libgo: Fix PR other/61895, ignore small argv[0] file for backtrace.
    - libgo: Fix unexpected GC interfering with closure passing.
    - Fix ICE in the Go frontend. LP: #1362906.
    - Enable cgo on AArch64 (Michael Hudson). LP: #1361940.
    - libgo: runtime: Use the clone system call on GNU/Linux.
    - libgo: Support arm64 relocations (Michael Hudson).
  * Include the cc1 binary into the gccgo-4.9 package.
  * Do not build-depend on sdt-systemtap for the trusty upload.
  * Warn about ppc ELFv2 ABI issues, which will change in GCC 5.
  * libgo: Fix PR go/67508, rewrite lfstack packing/unpacking to look more
    like that in Go (Michael Hudson). LP: #1472650.

gcc-4.9 (4.9.3-2ubuntu1) wily; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-4.9 (4.9.3-2) unstable; urgency=medium

  * Update to SVN 20150714 (r225765) from the gcc-4_9-branch.
  * Update the Linaro support to the 4.9-2015.06 release.

gcc-4.9 (4.9.3-1ubuntu1) wily; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-4.9 (4.9.3-1) unstable; urgency=medium

  * GCC 4.9.3 release.
  * Update to SVN 20150629 (r225135) from the gcc-4_9-branch.
  * Refresh patches.

gcc-4.9 (4.9.2-22ubuntu1) wily; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-4.9 (4.9.2-22) unstable; urgency=medium

  * Update to SVN 20150623 (r224833) from the gcc-4_9-branch.
  * Fix PR target/66483, taken from the trunk. Closes: #787689.
  * Fix "empty-binary-package" lintian warnings.
  * Fix PR tree-optimization/66233. Closes: #788812.

gcc-4.9 (4.9.2-21) unstable; urgency=medium

  * Update to SVN 20150611 (r224436) from the gcc-4_9-branch.
  * Build libstdc++6 when building the common libraries.

gcc-4.9 (4.9.2-20ubuntu1) wily; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-4.9 (4.9.2-20) unstable; urgency=medium

  * Update to SVN 20150531 (r223898) from the gcc-4_9-branch.
  * Fix PR rtl-optimization/63843, taken from the trunk. Closes: #785475.

gcc-4.9 (4.9.2-19ubuntu1) wily; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-4.9 (4.9.2-19) unstable; urgency=medium

  * Update to SVN 20150529 (r223861) from the gcc-4_9-branch.
  * Make symbols file symlinking for cross bu...

Changed in gccgo-4.9 (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for gccgo-4.9 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers