Skip to content

z/OS build blocked by vendored afero missing build flags #5547

@msradam

Description

@msradam

Brief summary

Following up on #2888 and #2892 — the z/OS build flags were added to cmd/ui_unix.go in v0.44.0, which was greatly appreciated!
I recently attempted to build the latest k6 on z/OS USS and hit a blocker with the vendored afero dependency.

Building k6 on z/OS fails with:

# github.com/spf13/afero
vendor/github.com/spf13/afero/const_win_unix.go:25:23: undefined: syscall.EBADFD

The issue is that the vendored afero (v1.1.2) predates the upstream z/OS support I contributed in spf13/afero#384, which was merged in afero v1.15.0.

k6 version

v1.5.1-0.20260109162857-b9b1d57948fc+dirty

OS

z/OS 3.1

Docker version and image (if applicable)

No response

Steps to reproduce the problem

  1. On z/OS USS with Go 1.25.3 installed, clone k6:
   git clone https://github.com/grafana/k6.git
   cd k6

  1. Set Go environment:
   export CGO_ENABLED=0
   export GOOS=zos
   export GOARCH=s390x
  1. Build:
    go build .

Expected behaviour

k6 builds successfully and produces a working binary, as z/OS support was added in #2892 (v0.44.0).

Actual behaviour

Build fails with:

# github.com/spf13/afero
vendor/github.com/spf13/afero/const_win_unix.go:25:23: undefined: syscall.EBADFD

The vendored afero (v1.1.2) predates the upstream z/OS build flags added in spf13/afero#384 (merged in v1.15.0).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions