Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails due to ui.AssetInfo #1317

Closed
samdroid-apps opened this Issue Jan 15, 2016 · 6 comments

Comments

Projects
None yet
3 participants
@samdroid-apps
Copy link

samdroid-apps commented Jan 15, 2016

When running make (on fedora 24 rawhide) or make docker the build appears to fails.

Output from make docker:

>> building binaries
 >   prometheus
# github.com/prometheus/prometheus/web       
web/web.go:204: undefined: ui.AssetInfo
Makefile:41: recipe for target 'build' failed 

Or similar output from make:

>> writing assets
>> formatting code
web/ui/bindata.go
>> building binaries
 >   prometheus
# github.com/prometheus/prometheus/web
web/web.go:204: undefined: ui.AssetInfo
Makefile:41: recipe for target 'build' failed
make: *** [build] Error 2

Setting DEBUG=1 does not affect anything either.

@brian-brazil brian-brazil added the bug label Jan 15, 2016

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jan 15, 2016

Can't comment on the Docker part, but with a clean checkout in an otherwise completely empty GOPATH, I cannot reproduce the problem.

Are you building from head?
Which Go version?

@brian-brazil brian-brazil added question and removed bug labels Jan 15, 2016

@samdroid-apps

This comment has been minimized.

Copy link
Author

samdroid-apps commented Jan 18, 2016

Yes, I am building from HEAD.

I am running go version go1.5.3 linux/amd64 (from the package golang-1.5.3-1.fc24.x86_64). Maybe it is an issue with a package on my system. I will wait and check later after updating.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jan 18, 2016

All dependencies should be vendored, and the Makefile sets GO15VENDOREXPERIMENT=1.

Could you do a new clean clone from git and retry?

@samdroid-apps

This comment has been minimized.

Copy link
Author

samdroid-apps commented Jan 19, 2016

Hum, I tested in a Ubuntu-15.something VM, and it worked fine. But I did something differently - I didn't ran "make build" instead of "make assets"

Testing back on fc24 with a clean gopath, the same could be repoduced. Running "make build" works. However, running "make" (which includes format and assets) did not

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jan 19, 2016

So pretty clearly, you asset build doesn't work. It uses a tool not vendored, github.com/jteeuwen/go-bindata. so make assets go-get's go-bindata from the source and compiles it, to then create web/ui/bindata.go. Something in that chain fails for you, and then bindata.go is somehow malformed (possibly empty), which then makes the compile fail.

Luckily, you only have to generate wob/ui/bindata.go if any of the assets have changed, so if you only ever run make build, everything should be OK. (Which is probably the rationale why we didn't bundle the go-bindata tool). We might also remove it from the default make target, cf. #1326 ). @fabxc knows more about it (as he did things differently for prometheus/alertmanager).

Which leaves as an exercise for the reader why the go-bindata part fails for you. For me, it runs completely smoothly. Perhaps, you have no access to the internet, and therefore the go get fails?

@beorn7 beorn7 closed this Jan 19, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.