[pkg-go] Bug#907263: Bug#907263: dh-golang: Failed to build with gccgo-8

Michael Hudson-Doyle michael.hudson at canonical.com
Sun Aug 26 10:44:01 BST 2018


I've forgotten everything about this code even though I wrote it, but
wouldn't it be better to filter out the standard library dependencies?

On Sun, 26 Aug 2018 at 04:03, Shengjing Zhu <i at zhsj.me> wrote:

> 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
> _______________________________________________
> Pkg-go-maintainers mailing list
> Pkg-go-maintainers at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-go-maintainers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-go-maintainers/attachments/20180826/0270ff33/attachment-0001.html>


More information about the Pkg-go-maintainers mailing list