[pkg-golang-devel] Bug#890495: golang-1.8: FTBFS on ppc64el

Frédéric Bonnard frediz at debian.org
Thu Feb 15 10:05:46 UTC 2018


Package: src:golang-1.8
Version: 1.8.5-1
Tags: patch pending
User: debian-powerpc at lists.debian.org
Usertags: ppc64el 

--

Dear maintainer,

I see that the package golang-1.8 fails to build on ppc64el :
https://buildd.debian.org/status/fetch.php?pkg=golang-1.8&arch=ppc64el&ver=1.8.5-1&stamp=1509012143&raw=0
This is a well known issue fixed in later versions and it was discussed 
here : https://go-review.googlesource.com/c/go/+/66870
For current source, I did minimal changes inspired from the "Patch Set
2" listed above and only targeted linux-ppc64le. Maybe linux-ppc64
could be included as well but I've no machine to test the fix on ppc64.
Also, sorry for the failed upload (hopefully), I wanted to upload to
debomatic but missed some arguments.

Regards.
F.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-golang-devel/attachments/20180215/ad66f57a/attachment.sig>
-------------- next part --------------
Description: Fix build on ppc64el when using PIE
 This problem is known and has been fixed in different ways depending on the
golang version : https://go-review.googlesource.com/c/go/+/66870 I took patch
set 2 and only applied the fix for ppc64el to not introduce any other issue on
other archs.
Author: Frédéric Bonnard <frediz at debian.org>
Origin: https://go-review.googlesource.com/c/go/+/66870
Bug: https://golang.org/issue/21954
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -899,14 +899,26 @@
 				if err := cmd.Run(); err != nil {
 					fmt.Println("No support for -pie found, skip cgo PIE test.")
 				} else {
-					cmd = t.addCmd(dt, "misc/cgo/test", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
-					cmd.Env = env
+					if pair != "linux-ppc64le" {
+						cmd = t.addCmd(dt, "misc/cgo/test", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
+						cmd.Env = env
 
-					cmd = t.addCmd(dt, "misc/cgo/testtls", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
-					cmd.Env = env
+						cmd = t.addCmd(dt, "misc/cgo/testtls", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
+						cmd.Env = env
 
-					cmd = t.addCmd(dt, "misc/cgo/nocgo", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
-					cmd.Env = env
+						cmd = t.addCmd(dt, "misc/cgo/nocgo", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
+						cmd.Env = env
+					} else {
+						cmd = t.addCmd(dt, "misc/cgo/test", "go", "test", "-buildmode=pie")
+						cmd.Env = env
+
+						cmd = t.addCmd(dt, "misc/cgo/testtls", "go", "test", "-buildmode=pie")
+						cmd.Env = env
+
+						cmd = t.addCmd(dt, "misc/cgo/nocgo", "go", "test", "-buildmode=pie")
+						cmd.Env = env
+
+					}
 
 				}
 			}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-golang-devel/attachments/20180215/ad66f57a/attachment-0001.sig>


More information about the pkg-golang-devel mailing list