Skip to content

Cannot build GOOS=windows GOARCH=arm64 #40247

@braydonk

Description

@braydonk

Component(s)

No response

What happened?

Description

There appears to be a build-tag definition problem of some kind with windows arm64 builds, and I think it started in v0.126.0.

Steps to Reproduce

make genotelcontribcol
cd ./cmd/otelcontribcol
GOWORK=off GOOS=windows GOARCH=arm64 go build .
# github.com/DataDog/gohai/cpu
../../../../go/pkg/mod/github.com/!data!dog/[email protected]/cpu/cpu_windows.go:270:15: undefined: computeCoresAndProcessors
# github.com/DataDog/gohai/platform
../../../../go/pkg/mod/github.com/!data!dog/[email protected]/platform/platform_windows.go:168:29: undefined: SERVER_INFO_101
../../../../go/pkg/mod/github.com/!data!dog/[email protected]/platform/platform_windows.go:185:9: undefined: platGetServerInfo
# github.com/DataDog/datadog-agent/pkg/util/winutil
../../../../go/pkg/mod/github.com/!data!dog/datadog-agent/pkg/util/[email protected]/winmem.go:126:15: undefined: performanceInformation
# github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters
../../pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh.go:347:89: undefined: PDH_FMT_COUNTERVALUE_DOUBLE
../../pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh.go:515:77: undefined: PDH_RAW_COUNTER
../../pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query.go:127:12: undefined: PDH_COUNTER_INFO
../../pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query.go:137:12: undefined: PDH_FMT_COUNTERVALUE_DOUBLE
../../pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query.go:160:28: undefined: PDH_FMT_COUNTERVALUE_ITEM_DOUBLE
../../pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query.go:176:15: undefined: PDH_RAW_COUNTER
../../pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query.go:199:28: undefined: PDH_RAW_COUNTER_ITEM

Expected Result

Successful Windows ARM64 build.

Actual Result

Posted in repro steps.

Collector version

main

Environment information

Environment

OS: Appears unimportant; this leverages Go cross-compile features.
Compiler(if manually compiled): go1.24.3

OpenTelemetry Collector configuration

N/A

Log output

Posted in repro steps.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions