Skip to content

[filestatsreceiver]: Not able to build agent with builder with filestatsreceiver for freebsd #42645

@bmunukuntla

Description

@bmunukuntla

Component(s)

receiver/filestats

What happened?

When we are trying to build the agent with filestatreceiver with go 1.24.0 and contrib version 0.132.0(same error is on previous versions as well)

(18:47:56)abcd-bin> ./builder --config builder-config.yaml
2025-09-11T18:48:00.453Z INFO internal/command.go:99 OpenTelemetry Collector Builder {"version": "v0.132.0"}
2025-09-11T18:48:00.453Z INFO internal/command.go:104 Using config file {"path": "builder-config.yaml"}
2025-09-11T18:48:00.454Z INFO builder/config.go:160 Using go {"go-executable": "/root/go/bin/go"}
2025-09-11T18:48:00.454Z INFO builder/main.go:99 Sources created {"path": "./otel-agent"}
2025-09-11T18:48:01.112Z INFO builder/main.go:201 Getting go modules
2025-09-11T18:48:01.168Z INFO builder/main.go:110 Compiling
Error: failed to compile the OpenTelemetry Collector distribution: go subcommand failed with args '[build -trimpath -o otelagent -ldflags=-s -w -gcflags=]': exit status 1, error message: # github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver
../../pkg/mod/github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/scraper.go:46:3: undefined: collectStats

Also looked at scraper.go file and could see freebsd annotation is added already.
//go:build darwin || freebsd || dragonfly || netbsd || openbsd

Note: It is working in macos with same versions.

Collector version

0.132.0

Environment information

Environment

OS: freebsd
Compiler(Go 1.24)

OpenTelemetry Collector configuration

Log output

(18:47:56)abcd-bin> ./builder --config builder-config.yaml 
2025-09-11T18:48:00.453Z	INFO	internal/command.go:99	OpenTelemetry Collector Builder	{"version": "v0.132.0"}
2025-09-11T18:48:00.453Z	INFO	internal/command.go:104	Using config file	{"path": "builder-config.yaml"}
2025-09-11T18:48:00.454Z	INFO	builder/config.go:160	Using go	{"go-executable": "/root/go/bin/go"}
2025-09-11T18:48:00.454Z	INFO	builder/main.go:99	Sources created	{"path": "./otel-agent"}
2025-09-11T18:48:01.112Z	INFO	builder/main.go:201	Getting go modules
2025-09-11T18:48:01.168Z	INFO	builder/main.go:110	Compiling
Error: failed to compile the OpenTelemetry Collector distribution: go subcommand failed with args '[build -trimpath -o otelagent -ldflags=-s -w -gcflags=]': exit status 1, error message: # github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver
../../pkg/mod/github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/scraper.go:46:3: undefined: collectStats

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions