Bug 258548 - Mk/Uses/go.mk: Issues building net-mgmt/prometheus2 >= 2.29.0
Summary: Mk/Uses/go.mk: Issues building net-mgmt/prometheus2 >= 2.29.0
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitri Goutnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-16 21:56 UTC by David O'Rourke
Modified: 2021-09-22 20:42 UTC (History)
2 users (show)

See Also:


Attachments
net-mgmt/prometheus2: Update to 2.30.0, exposing build issue (48.04 KB, patch)
2021-09-16 21:56 UTC, David O'Rourke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David O'Rourke 2021-09-16 21:56:37 UTC
Created attachment 227953 [details]
net-mgmt/prometheus2: Update to 2.30.0, exposing build issue

Hi,

When attempting to build newer versions of Prometheus in Poudriere, the builds fail with an error:

# k8s.io/client-go/plugin/pkg/client/auth/exec
vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/metrics.go:108:12: klog.V(2).InfoS undefined (type klog.Verbose has no field or method InfoS)

This appears to be caused by something that the ports system is doing, as Prometheus builds fine outside of Poudriere when Go is handling dependencies itself.  Unfortunately, I lack enough knowledge of what magic ports is doing to handle Go dependencies to debug this issue, so I'm hoping someone in the know can take a look.

I've attached a net-mgmt/prometheus2 diff which should reveal the error in poudriere testport.

Thanks,
-David
Comment 1 Mikael Urankar freebsd_committer 2021-09-17 21:08:18 UTC
Try with this patch:
--- Makefile.modules.orig       2021-09-17 23:04:59.343603000 +0200
+++ Makefile.modules    2021-09-17 23:06:47.774279000 +0200
@@ -142,7 +142,7 @@ GH_TUPLE+=  \
                shurcooL:httpfs:8d4bc4ba7749:shurcool_httpfs/vendor/github.com/shurcooL/httpfs \
                shurcooL:vfsgen:0d455de96546:shurcool_vfsgen/vendor/github.com/shurcooL/vfsgen \
                simonpasquier:klog-gokit:v0.3.0:simonpasquier_klog_gokit/vendor/k8s.io/klog \
-               simonpasquier:klog-gokit:v3.0.0:simonpasquier_klog_gokit_v3/vendor/k8s.io/klog/v2 \
+               simonpasquier:klog-gokit:v3.0.0:simonpasquier_klog_gokit_v3 \
                sirupsen:logrus:v1.7.0:sirupsen_logrus/vendor/github.com/sirupsen/logrus \
                spf13:pflag:v1.0.5:spf13_pflag/vendor/github.com/spf13/pflag \
                stretchr:testify:v1.7.0:stretchr_testify/vendor/github.com/stretchr/testify \
@@ -164,3 +164,5 @@ post-extract:
        @${RLN} ${WRKSRC_azure_go_autorest_logger}/logger ${WRKSRC}/vendor/github.com/Azure/go-autorest/logger
        @${RM} -r ${WRKSRC}/vendor/github.com/Azure/go-autorest/tracing
        @${RLN} ${WRKSRC_azure_go_autorest_tracing}/tracing ${WRKSRC}/vendor/github.com/Azure/go-autorest/tracing
+       @${RM} -r ${WRKSRC}/vendor/k8s.io/klog/v2
+       @${RLN} ${WRKSRC_simonpasquier_klog_gokit_v3} ${WRKSRC}/vendor/k8s.io/klog/v2
Comment 2 David O'Rourke 2021-09-22 20:42:04 UTC
Hi,

Sorry for taking a few days to get back. I can confirm that the patch you supplied did let Prometheus compile correctly and I'll now be able to update the port.

Is this something that I'll have to do in the future until things change in the Prometheus upstream?

Thanks,
-David