Skip to content

V2 breaks xk6 cross compilation #399

Description

@timvahlbrock

Hey there, thanks for this easy to use project. We are currently trying to upgrade to V2 and have noticed, that cross compilation (specifically Linux compiles for ARM MacOS) in a docker image no longer seems to work.

Commands that work in the golang:1.26.4 image:

xk6 build --k6-version v1.7.1 --with github.com/mostafa/xk6-kafka@v1.3.0 --os linux --verbose

xk6 build --k6-version v1.7.1 --with github.com/mostafa/xk6-kafka@v1.3.0 --os darwin --verbose

xk6 build --k6-version v2.0.0 --with github.com/mostafa/xk6-kafka/v2@v2.0.0 --os linux --verbose

Commands that don't work in the same image:

xk6 build --k6-version v2.0.0 --with github.com/mostafa/xk6-kafka/v2@v2.0.0 --os darwin --verbose

The command fails with

9:24AM INF Building k6
# github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/internal
/xk6-go/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.14.0/schemaregistry/internal/rest_service.go:93:22: undefined: kafka.LibraryVersion
9:24AM INF Cleaning up work directory /tmp/k6foundry2632259015
9:24AM ERR compiling: executing go command: exit status 1

It would be great if this could work again, because by cross building with docker we can avoid having each developer install a k6 toolchain and maintain it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions