More verbose Prometheus build (errors) with promu

188 views
Skip to first unread message

Jasper Siepkes

unread,
Jan 9, 2021, 4:11:24 AM1/9/21
to Prometheus Developers
Hi!

I'm trying to build Prometheus on Illumos (Solaris) I won't bore you with my platform specific porting issues ;-) but I would appreciate any help you folks can offer with promu. I can't seem to get the actual build error message.

When building with "make build" the build eventually fails on "building binaries". I suspect due to some platform specific things I need to fix. However I can't seem to get a decent error message out of the build. It fails with:

----8<--------------------------
>> building binaries
GO111MODULE=on CGO_LDFLAGS="-lsocket -lsendfile" /root/go/bin/promu build --prefix /root/go/src/github.com/prometheus/prometheus 
 >   prometheus
vendor/github.com/docker/docker/client/client.go:120:35: undefined: DefaultDockerHost
vendor/github.com/docker/docker/client/client.go:125:12: undefined: DefaultDockerHost
vendor/github.com/docker/docker/client/client.go:128:12: undefined: defaultProto
make: *** [Makefile.common:229: common-build] Error 1
----8<--------------------------

I managed to get a bit more information by attempting this build step manually with the "promu -v build" command. However that only yields a backtrace which (I think) just shows a part of the promu execution and not the actual build failure:

----8<--------------------------
!! exit status 2
main.main
runtime.main
        /opt/local/go115/src/runtime/proc.go:204
runtime.goexit
        /opt/local/go115/src/runtime/asm_amd64.s:1374
----8<--------------------------

Am I missing something obvious here?

Kind regards,

Jasper

David Leadbeater

unread,
Jan 9, 2021, 4:32:07 AM1/9/21
to Jasper Siepkes, Prometheus Developers
I think the error is hiding in there:
vendor/github.com/docker/docker/client/client.go:120:35: undefined:
DefaultDockerHost

(You can probably just do: go build ./cmd/prometheus to get that,
rather than needing to use the full build system.)

It looks like https://github.com/prometheus/prometheus/blob/v2.23.0/vendor/github.com/docker/docker/client/client_unix.go
was missing illumos -- although a dependency update for 2.24 seems to
have added it, so try 2.24?
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/59464ddc-2861-40d3-b16c-9c1844be7790n%40googlegroups.com.

Jasper Siepkes

unread,
Jan 9, 2021, 7:52:36 AM1/9/21
to Prometheus Developers
Thanks for the pointer!

I had dismissed those as warnings since there was about a minute between those messages and the actual failing of the build. With the expected platform specific changes 2.24 builds fine!

Kind regards,

Jasper

Reply all
Reply to author
Forward
0 new messages