[pkg-go] Bug#794815: Bug#794815: FTBFS because go generate is missing a build dependency... and then some.

Michael Hudson-Doyle michael.hudson at canonical.com
Thu Aug 6 21:33:58 UTC 2015


On 7 August 2015 at 08:41, Hilko Bengen <bengen at debian.org> wrote:
> Source: golang-x-text
> Version: 0+git20150518.c93e7c9-1
> Severity: grave
>
> Beacuse dh-golang now executes go generate, the "stringer" binary is
> needed in building:
>
> ,----
> | ...
> | src/golang.org/x/text/width/trieval.go
> | src/golang.org/x/text/width/width.go
> | src/golang.org/x/text/width/width.go:5: running "stringer": exec: "stringer": executable file not found in $PATH
> | dh_auto_build: go generate -v golang.org/x/text golang.org/x/text/cases golang.org/x/text/cldr golang.org/x/text/collate golang.org/x/text/collate/build golang.org/x/text/collate/colltab golang.org/x/text/display golang.org/x/text/encoding golang.org/x/text/encoding/charmap golang.org/x/text/encoding/htmlindex golang.org/x/text/encoding/ianaindex golang.org/x/text/encoding/internal golang.org/x/text/encoding/internal/identifier golang.org/x/text/encoding/japanese golang.org/x/text/encoding/korean golang.org/x/text/encoding/simplifiedchinese golang.org/x/text/encoding/traditionalchinese golang.org/x/text/encoding/unicode golang.org/x/text/internal/colltab golang.org/x/text/internal/gen golang.org/x/text/internal/testtext golang.org/x/text/internal/triegen golang.org/x/text/internal/ucd golang.org/x/text/language golang.org/x/text/runes golang.org/x/text/search golang.org/x/text/transform golang.org/x/text/unicode/norm golang.org/x/text/unicode/rangetable golang.org/x/text/width returned exit code 1
> | make: *** [build] Error 1
> | debian/rules:9: recipe for target 'build' failed
> | dpkg-buildpackage: error: debian/rules build gave error exit status 2
> `----
>
> I tried the patch below, but now the build fails with a different error:
>
> ,----
> | ...
> | src/golang.org/x/text/width/width.go
> | stringer: checking package: transform.go:10:2: could not import golang.org/x/text/transform (can't find import: golang.org/x/text/transform)
> | src/golang.org/x/text/width/width.go:5: running "stringer": exit status 1
> | ...
> `----

Hm, I think this is an argument against running go:generate at package
build time -- stringer, an absolutely canonical target for
go:generate, uses go/types which depends on the package dependencies
being already built, and if you run go generate before install then
they won't be. I guess you could run go install, go generate, and go
install again which would at least be less broken than the current
behaviour (it would also fix the ubuntu-snappy build I think). Or stop
running go:generate at package build time, I think it's at best a
marginal thing.



More information about the Pkg-go-maintainers mailing list