Xk6-kafka binary is getting build

I got the below issue when trying to build the k6-kafka binary.

[INFO] Build environment ready
2024/05/02 09:12:55 [INFO] Building k6
2024/05/02 09:12:55 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17 
�[0m�[91m2024/05/02 09:12:55 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /app/k6 -ldflags=-w -s -trimpath 
�[0m�[91mpackage k6
	imports go.k6.io/k6/cmd
	imports golang.org/x/crypto/x509roots/fallback: build constraints exclude all Go files in /root/go/pkg/mod/golang.org/x/crypto/x509roots/fallback@v0.0.0-20231218163308-9d2ee975ef9f
�[0m�[91m2024/05/02 09:12:55 [INFO] Cleaning up temporary folder: /tmp/buildenv_2024-05-02-0912.135389988
�[0m�[91m2024/05/02 09:12:55 [FATAL] exit status 1
�[0m

These are the final logs. But this did not create the k6 binary. (Previously(few months back) this worked for me without any issue. I was able to build the binary)
can you please help to solve this issue?

Hi @sahaniperera995,

Try to upgrade your go version. With 1.19 I get the same error as you described, 1.20 doesn’t work either, but with 1.21 and 1.22 it creates the k6 binary.

I hope it helps.

1 Like