[pkg-go] Bug#907263: dh-golang: Failed to build with gccgo-8
Shengjing Zhu
i at zhsj.me
Sat Aug 25 17:01:11 BST 2018
Package: dh-golang
Severity: important
Tags: patch
Dear Maintainer,
dh-golang failed to build with gccgo-8.
dh_golang -O--buildsystem=golang
"go list -f '{{ range .Deps }}{{.}}\
{{ end }}'" github.com/elves/elvish [...]
"go list -f '\\\
{{ .Dir }}/{{ index (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles .IgnoredGoFiles) 0 }}'" bufio bytes [...]
template: main:2:14: executing "main" at <index (or .GoFiles ....>: error calling index: index out of range: 0
dh_golang: go list -f '\
{{ .Dir }}/{{ index (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles .IgnoredGoFiles) 0 }}' returned exit code 1
make: *** [debian/rules:18: binary] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
The reason is that since gccgo-8, `go list {{ .Deps }}` will return
standard library. But it can't return the source files for standard
library. So the template will execute things like `index [] 0`.
Patch is attached.
--
Best regards,
Shengjing Zhu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-index-out-of-range-when-list-godeps-sources.patch
Type: text/x-diff
Size: 907 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-go-maintainers/attachments/20180826/e808c8f4/attachment.patch>
More information about the Pkg-go-maintainers
mailing list