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

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



Hello go-team,

While trying to make fscrypt build on more archs using gccgo-go, I've
noticed that it fails to compile even on amd64 when using it. fcrypt is
not the easiest package to exemplify the issue, I will use 'evilsh'
instead. It build-depends on golang-any, which is satisfied by gccgo-go.

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:

https://buildd.debian.org/status/fetch.php?pkg=elvish&arch=ppc64&ver=0.12%2Bds1-1&stamp=1531280512&raw=0

2. Build the package on amd64, see how it builds fine.

3. Change the build-dep from golang-any to gccgo-go and try to rebuild
it on amd64. It will fail with the same error encountered on ppc64. A
verbose build (DH_VERBOSE = 1) will show the error in the attached file.

I don't think gccgo-go is at fault here, as the binaries get built. Is
there a problem in how dh_golang interacts with gccgo-go?

Am I missing something?

Paride
   dh_golang -O--buildsystem=golang
	"go list -f '{{ range .Deps }}{{.}}\
{{ end }}'" github.com/elves/elvish github.com/elves/elvish/buildinfo github.com/elves/elvish/daemon github.com/elves/elvish/edit github.com/elves/elvish/edit/completion github.com/elves/elvish/edit/edcore github.com/elves/elvish/edit/eddefs github.com/elves/elvish/edit/highlight github.com/elves/elvish/edit/history github.com/elves/elvish/edit/lastcmd github.com/elves/elvish/edit/location github.com/elves/elvish/edit/lscolors github.com/elves/elvish/edit/prompt github.com/elves/elvish/edit/tty github.com/elves/elvish/edit/ui github.com/elves/elvish/eval github.com/elves/elvish/eval/bundled github.com/elves/elvish/eval/daemon github.com/elves/elvish/eval/re github.com/elves/elvish/eval/store github.com/elves/elvish/eval/str github.com/elves/elvish/eval/vals github.com/elves/elvish/eval/vars github.com/elves/elvish/getopt github.com/elves/elvish/glob github.com/elves/elvish/parse github.com/elves/elvish/parse/parseutil github.com/elves/elvish/program github.com/elves/elvish/program/daemon github.com/elves/elvish/program/shell github.com/elves/elvish/program/web github.com/elves/elvish/runtime github.com/elves/elvish/store github.com/elves/elvish/store/storedefs github.com/elves/elvish/styled github.com/elves/elvish/sys github.com/elves/elvish/tt github.com/elves/elvish/util
	"go list -f '\\\
{{ .Dir }}/{{ index (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles .IgnoredGoFiles) 0 }}'" bufio bytes container/list encoding encoding/binary encoding/json errors flag fmt github.com/boltdb/bolt github.com/elves/elvish/buildinfo github.com/elves/elvish/daemon github.com/elves/elvish/edit github.com/elves/elvish/edit/completion github.com/elves/elvish/edit/edcore github.com/elves/elvish/edit/eddefs github.com/elves/elvish/edit/highlight github.com/elves/elvish/edit/history github.com/elves/elvish/edit/lastcmd github.com/elves/elvish/edit/location github.com/elves/elvish/edit/lscolors github.com/elves/elvish/edit/prompt github.com/elves/elvish/edit/tty github.com/elves/elvish/edit/ui github.com/elves/elvish/eval github.com/elves/elvish/eval/bundled github.com/elves/elvish/eval/daemon github.com/elves/elvish/eval/re github.com/elves/elvish/eval/store github.com/elves/elvish/eval/str github.com/elves/elvish/eval/vals github.com/elves/elvish/eval/vars github.com/elves/elvish/getopt github.com/elves/elvish/glob github.com/elves/elvish/parse github.com/elves/elvish/parse/parseutil github.com/elves/elvish/program github.com/elves/elvish/program/daemon github.com/elves/elvish/program/shell github.com/elves/elvish/program/web github.com/elves/elvish/runtime github.com/elves/elvish/store github.com/elves/elvish/store/storedefs github.com/elves/elvish/styled github.com/elves/elvish/sys github.com/elves/elvish/util github.com/xiaq/persistent/hash github.com/xiaq/persistent/hashmap github.com/xiaq/persistent/vector golang.org/x/sys/unix hash/fnv html io io/ioutil log math math/big math/rand net net/http net/rpc os os/exec os/signal os/user path path/filepath reflect regexp runtime runtime/debug runtime/pprof sort strconv strings sync syscall testing time unicode unicode/utf8 unsafe
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

Reply to: