[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packages failing to build with gccgo-go (index out of range: 0)



> 1. Observe that on architectures where golang-go is not available and
> gccgo-go is used instead, the build fails ("template: main:2:14:
> executing "main" at <index (or .GoFiles ....>: error calling index:
> index out of range: 0"). For example, on ppc64:
>

The actual failed command is:

go list -f '\
{{ .Dir }}/{{ index (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles
.IgnoredGoFiles) 0 }}' bufio bytes container/list encoding
encoding/binary
[snip...]

With gccgo, `go list` can't list any file for std libraries.

for i in `cat file-types.txt`; do go-8 list -f "$i: {{ .$i }}" bytes; done
GoFiles: []
CgoFiles: []
IgnoredGoFiles: []
CFiles: []
CXXFiles: []
MFiles: []
HFiles: []
FFiles: []
SFiles: []
SwigFiles: []
SwigCXXFiles: []
SysoFiles: []
TestGoFiles: []
XTestGoFiles: []


Previous gccgo build was successful, because previously gccgo didn't
return std library for .Deps. Compare the gccgo-7 and gccgo-8 result

$ go-8 list -f '{{ join .Deps "\n" }}'
bufio
bytes
[snip...]
github.com/boltdb/bolt
[snip...]

$ go-7 list -f '{{ join .Deps "\n" }}'
github.com/boltdb/bolt
github.com/elves/elvish/buildinfo
[snip...]

So gccgo-8 behaves more like go.

-- 
Best regards,
Shengjing Zhu


Reply to: