Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kperf build failing

Tags:

go

build

knative

I've tried to Build kperf by running build.sh, but I get The following error with unable to find io/fs. I'm a huge go noob, any help appreciated.

ibrahim@home:~/kperf/src/knative.dev/kperf$ ./hack/build.sh
⚖️ License
🧹 Format
🚧 Compile
knative.dev/kperf/pkg/config imports
        github.com/spf13/viper imports
        io/fs: cannot find module providing package io/fs
-mod=mod not supported (can be '', 'readonly', or 'vendor')
/home/ibrahim/kperf/src/knative.dev/kperf/hack/build-funcs.sh: line 44: go-bindata: command not found
-mod=mod not supported (can be '', 'readonly', or 'vendor')
🧪 Test
knative.dev/kperf/pkg/config imports
        github.com/spf13/viper imports
        io/fs: cannot find module providing package io/fs
-mod=mod not supported (can be '', 'readonly', or 'vendor')
/home/ibrahim/kperf/src/knative.dev/kperf/hack/build-funcs.sh: line 44: go-bindata: command not found
build io/fs: cannot load io/fs: open /home/ibrahim/kperf/src/knative.dev/kperf/vendor/io/fs: no such file or directory
🔥 Failure

Steps to reproduce:

  1. Create and cd into /kperf/src/knative.dev directory
  2. Clone Kperf project
  3. cd into kperf project directory and run ./hack/build.sh
like image 842
Desolar1um Avatar asked Dec 10 '25 11:12

Desolar1um


1 Answers

The error message means that your Go tool

  • does not support -mod=mod (module support was introduced as an experimental feature in Go1.11).
  • does not have the package io/fs (which was added in Go1.16).

That indicates the Go tool installed on your system is too old.

According to the go directive in the go.mod file, I think you should upgrade to Go1.18 at least.

module knative.dev/kperf

go 1.18

It's better to install the latest Go. See https://go.dev/doc/install for the installation instructions.

like image 141
Zeke Lu Avatar answered Dec 13 '25 05:12

Zeke Lu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!