Bug#877541: [pkg-go] Bug#877541: prometheus FTBFS on i386: FAIL github.com/prometheus/prometheus/storage/local [build failed]
Upstream has already provided a patch, and I can confirm it solves the issue: diff --git a/src/cmd/compile/internal/x86/387.go b/src/cmd/compile/internal/x86/387.go index cdac000..7a36224 100644 --- a/src/cmd/compile/internal/x86/387.go +++ b/src/cmd/compile/internal/x86/387.go @@ -46,6 +46,9 @@ case ssa.Op386MOVSSloadidx1, ssa.Op386MOVSDloadidx1: p.From.Scale = 1 p.From.Index = v.Args[1].Reg() + if p.From.Index == x86.REG_SP { + p.From.Reg, p.From.Index = p.From.Index, p.From.Reg + } case ssa.Op386MOVSSloadidx4: p.From.Scale = 4 p.From.Index = v.Args[1].Reg() @@ -95,6 +98,9 @@ case ssa.Op386MOVSSstoreidx1, ssa.Op386MOVSDstoreidx1: p.To.Scale = 1 p.To.Index = v.Args[1].Reg() + if p.To.Index == x86.REG_SP { + p.To.Reg, p.To.Index = p.To.Index, p.To.Reg + } case ssa.Op386MOVSSstoreidx4: p.To.Scale = 4 p.To.Index = v.Args[1].Reg() On 24/10/17 19:44, Martín Ferrari wrote: > forwarded 877541 https://github.com/golang/go/issues/22429 > thanks > > I have opened an issue in upstream's tracker: > https://github.com/golang/go/issues/22429 > -- Martín Ferrari (Tincho)
Bug#877541: [pkg-go] Bug#877541: prometheus FTBFS on i386: FAIL github.com/prometheus/prometheus/storage/local [build failed]
forwarded 877541 https://github.com/golang/go/issues/22429 thanks I have opened an issue in upstream's tracker: https://github.com/golang/go/issues/22429 -- Martín Ferrari (Tincho)
Bug#877541: [pkg-go] Bug#877541: prometheus FTBFS on i386: FAIL github.com/prometheus/prometheus/storage/local [build failed]
If I disable optimizations (-N option for go tool compile), the error disappears. I think this confirms it is a compiler bug. $ GOPATH=$PWD/build go test -c -v -gcflags=-N github.com/prometheus/prometheus/storage/local $ GOPATH=$PWD/build go test -c -v github.com/prometheus/prometheus/storage/local # github.com/prometheus/prometheus/storage/local build/src/github.com/prometheus/prometheus/storage/local/storage_test.go:2028:26: invalid instruction: 01483 (/tmp/buildd/prometheus-1.8.1+ds/build/src/github.com/prometheus/prometheus/storage/local/storage_test.go:2029) FMOVD ""..autotmp_78+176(DX)(SP*1), F0 $
Bug#877541: [pkg-go] Bug#877541: prometheus FTBFS on i386: FAIL github.com/prometheus/prometheus/storage/local [build failed]
reassign 877541 golang-1.9 retitle 877541 golang-1.9: Invalid instruction error in i386 thanks This seems to be an issue with go 1.9, this error is not reproducible with other versions of go: $ /usr/lib/go-1.7/bin/go test -c -v github.com/prometheus/prometheus/storage/local $ /usr/lib/go-1.8/bin/go test -c -v github.com/prometheus/prometheus/storage/local $ /usr/lib/go-1.9/bin/go test -c -v github.com/prometheus/prometheus/storage/local # github.com/prometheus/prometheus/storage/local build/src/github.com/prometheus/prometheus/storage/local/storage_test.go:2028:26: invalid instruction: 01483 (/tmp/buildd/prometheus-1.8.1+ds/build/src/github.com/prometheus/prometheus/storage/local/storage_test.go:2029) FMOVD ""..autotmp_78+176(DX)(SP*1), F0 I can't find any reference listing this instruction as valid i386, but maybe I am not looking correctly. It is the same issue as #877319. Also, I don't see anything weird in the code (it faults at the for): got := it.RangeValues(metric.Interval{OldestInclusive: 0, NewestInclusive: 3}) // Note that we cannot just reflect.DeepEqual(want, got) because it has // the semantics of NaN != NaN. for i, gotSamplePair := range got { wantSamplePair := want[i] if !wantSamplePair.Equal() { t.Fatalf("want %v, got %v", wantSamplePair, gotSamplePair) } } On 02/10/17 13:45, Adrian Bunk wrote: > Source: prometheus > Version: 1.7.2+ds-1 > Severity: serious > > https://buildd.debian.org/status/fetch.php?pkg=prometheus=i386=1.7.2%2Bds-1=1506959630=0 > > ... > FAIL github.com/prometheus/prometheus/storage/local [build failed] > ... > dh_auto_test: cd build && go test -v -p 4 -timeout 20m > github.com/prometheus/prometheus/cmd/prometheus > github.com/prometheus/prometheus/cmd/promtool > github.com/prometheus/prometheus/config > github.com/prometheus/prometheus/discovery > github.com/prometheus/prometheus/discovery/azure > github.com/prometheus/prometheus/discovery/consul > github.com/prometheus/prometheus/discovery/dns > github.com/prometheus/prometheus/discovery/ec2 > github.com/prometheus/prometheus/discovery/file > github.com/prometheus/prometheus/discovery/gce > github.com/prometheus/prometheus/discovery/marathon > github.com/prometheus/prometheus/discovery/openstack > github.com/prometheus/prometheus/discovery/triton > github.com/prometheus/prometheus/discovery/zookeeper > github.com/prometheus/prometheus/notifier > github.com/prometheus/prometheus/promql > github.com/prometheus/prometheus/relabel > github.com/prometheus/prometheus/retrieval > github.com/prometheus/prometheus/rules > github.com/prometheus/prometheus/storage github.com/prometheus/pr > ometheus/storage/fanin github.com/prometheus/prometheus/storage/local > github.com/prometheus/prometheus/storage/local/chunk > github.com/prometheus/prometheus/storage/local/codable > github.com/prometheus/prometheus/storage/local/index > github.com/prometheus/prometheus/storage/local/storagetool > github.com/prometheus/prometheus/storage/metric > github.com/prometheus/prometheus/storage/remote > github.com/prometheus/prometheus/template > github.com/prometheus/prometheus/util/cli > github.com/prometheus/prometheus/util/flock > github.com/prometheus/prometheus/util/httputil > github.com/prometheus/prometheus/util/promlint > github.com/prometheus/prometheus/util/stats > github.com/prometheus/prometheus/util/strutil > github.com/prometheus/prometheus/util/testutil > github.com/prometheus/prometheus/util/treecache > github.com/prometheus/prometheus/web > github.com/prometheus/prometheus/web/api/v1 > github.com/prometheus/prometheus/web/ui returned exit code 2 > debian/rules:46: recipe for target 'override_dh_auto_test' failed > make[1]: *** [override_dh_auto_test] Error 2 > > ___ > Pkg-go-maintainers mailing list > pkg-go-maintain...@lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers > -- Martín Ferrari (Tincho)