Can´t build Skenario
kmmelcher opened this issue · 0 comments
kmmelcher commented
Hey there,
Skenario seems to be a great tool and I'm really interested to use or improve it for academy studies at my college.
Unfortunately, I've run into problems when trying to build it, could you help me?
$ make
mkdir -p build
cd sim
go build -o ../build/sim ./cmd/skenario/main.go
# github.com/bvinc/go-sqlite-lite/sqlite3
sqlite3.c: In function ‘sqlite3SelectNew’:
sqlite3.c:124800:10: warning: function may return address of local variable [-Wreturn-local-addr]
124800 | return pNew;
| ^~~~
sqlite3.c:124760:10: note: declared here
124760 | Select standin;
| ^~~~~~~
mkdir -p build
cd plugin-k8s
go build -o ../build/plugin-k8s ./cmd/main.go
go: k8s.io/kubernetes@v0.0.0 (replaced by ../../kubernetes): reading ../../kubernetes/go.mod: open /home/kilian/.../kubernetes/go.mod: no such file or directory
make: *** [Makefile:17: build-plugin-k8s] Error 1
Here is my Go version:
$ go version
go version go1.21.4 linux/amd64
I've installed Go using the Official Docs.
I was able to fix this issue by exporting this flags:
$ export CGO_CFLAGS="-g -O2 -Wno-return-local-addr"
(Even though I think this issue should already be address on the repo).
But I ended up falling into another error:
$ make build
mkdir -p build
cd sim
go build -o ../build/sim ./cmd/skenario/main.go
mkdir -p build
cd plugin-k8s
go build -o ../build/plugin-k8s ./cmd/main.go
go: k8s.io/kubernetes@v0.0.0 (replaced by ../../kubernetes): reading ../../kubernetes/go.mod: open /home/kilian/.../kubernetes/go.mod: no such file or directory
make: *** [Makefile:17: build-plugin-k8s] Error 1