Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile is broken!!! #418

Closed
jasmingacic opened this issue May 18, 2022 · 3 comments · Fixed by #419
Closed

Makefile is broken!!! #418

jasmingacic opened this issue May 18, 2022 · 3 comments · Fixed by #419

Comments

@jasmingacic
Copy link
Contributor

When ran on a fresh box either a docker container, linux host or macos running make produces this error:

[INFO] Installing protoc compiler to /root/temp/kusk-gateway/bin/protoc
Downloading protoc-3.19.4-linux-x86_64.zip to /tmp/tmp.s45qlzdcpI
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1660k  100 1660k    0     0  3747k      0 --:--:-- --:--:-- --:--:-- 3747k
bash: unzip: command not found
make: *** [Makefile:197: /root/temp/kusk-gateway/bin/protoc/bin/protoc] Error 127

or in some cases

[INFO]: Installing protobuf go generation plugin.
go: creating new go.mod: module tmp
Downloading google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
go: added google.golang.org/protobuf v1.27.1
[INFO]: Installing protobuf GRPC go generation plugin.
go: creating new go.mod: module tmp
Downloading google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0
go: added google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0
go: added google.golang.org/protobuf v1.27.1
cd "internal/agent/management"; /root/go/src/github.com/kubeshop/kusk-gateway/bin/protoc/bin/protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto
protoc-gen-go-grpc: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
@jasmingacic
Copy link
Contributor Author

And easy way to replicate:

FROM golang
WORKDIR /

RUN git clone https://github.com/kubeshop/kusk-gateway.git

RUN cd kusk-gateway && make 

@mbana
Copy link
Contributor

mbana commented May 18, 2022

unzip is required. Please try:

FROM docker.io/library/golang:1.17
WORKDIR /

RUN apt-get update -y
RUN apt-get install -y unzip
RUN git clone https://github.com/kubeshop/kusk-gateway.git

RUN cd kusk-gateway && make
$ docker build -t test . # or `podman build -t test .`
...
go build -o bin/manager -ldflags='-X github.com/kubeshop/kusk-gateway/pkg/analytics.TelemetryToken=' cmd/manager/main.go
go build -o bin/agent -ldflags='-X github.com/kubeshop/kusk-gateway/pkg/analytics.TelemetryToken=' cmd/agent/main.go
Removing intermediate container fe0dcc0009f4
 ---> f91a80b17e7b
Successfully built f91a80b17e7b
Successfully tagged test:latest

@jasmingacic
Copy link
Contributor Author

This was just an example why it failed I could install unzip but that's not the point.

Two Linux boxes and one Mac can't run make see the rest of the errors.

Even if you install unzip it will produce this error:

[INFO] Installing protoc compiler to /kusk-gateway/bin/protoc
Downloading protoc-3.19.4-linux-x86_64.zip to /tmp/tmp.lN50fZp9Nw
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1660k  100 1660k    0     0  3608k      0 --:--:-- --:--:-- --:--:-- 3608k
Archive:  protoc-3.19.4-linux-x86_64.zip
checkdir:  cannot create extraction directory: /kusk-gateway/bin/protoc
           No such file or directory
make: *** [Makefile:197: /kusk-gateway/bin/protoc/bin/protoc] Error 2
The command '/bin/sh -c cd kusk-gateway && make' returned a non-zero code: 2

mbana pushed a commit that referenced this issue May 18, 2022
* Replace `go get` with `go install` in `Makefile`.
* Tidy up `Makefile`.
* Introduce `tools` in `Makefile` that downloads all the tools/dependencies required.
* `DOCKER_BUILDKIT`: No point in defining this everyone - exporting and defining should be enough.

For further information, see:

* kubernetes-sigs/kubebuilder#2566
* kubernetes-sigs/kubebuilder#2486
mbana added a commit that referenced this issue May 18, 2022
* Replace `go get` with `go install` in `Makefile`.
* Tidy up `Makefile`.
* Introduce `tools` in `Makefile` that downloads all the tools/dependencies required.
* `DOCKER_BUILDKIT`: No point in defining this everyone - exporting and defining should be enough.

For further information, see:

* kubernetes-sigs/kubebuilder#2566
* kubernetes-sigs/kubebuilder#2486
mbana pushed a commit that referenced this issue May 18, 2022
1. > The indentation for these variable assignments are a bit all over the place, can you align them, please?
2. > If you've tested that kustomize v4 works as expected, this comment can be removed

Closes #418
mbana pushed a commit to kubeshop/kusk that referenced this issue May 20, 2022
Version information such as tag, revision and build date and time is built at _build_ time without having to resort to using `GO_LDFLAGS` or `-ldflags`, see: `internal/build/build.go`.
mbana added a commit that referenced this issue May 24, 2022
* Replace `go get` with `go install` in `Makefile`.
* Tidy up `Makefile`.
* Introduce `tools` in `Makefile` that downloads all the tools/dependencies required.
* `DOCKER_BUILDKIT`: No point in defining this everyone - exporting and defining should be enough.

For further information, see:

* kubernetes-sigs/kubebuilder#2566
* kubernetes-sigs/kubebuilder#2486
mbana pushed a commit that referenced this issue May 24, 2022
1. > The indentation for these variable assignments are a bit all over the place, can you align them, please?
2. > If you've tested that kustomize v4 works as expected, this comment can be removed

Closes #418
mbana pushed a commit that referenced this issue May 25, 2022
Fix/Cleanup `Makefile` - Closes #418:

* Replace `go get` with `go install` in `Makefile`.
* Tidy up `Makefile`.
* Introduce `tools` in `Makefile` that downloads all the tools/dependencies required.
* `DOCKER_BUILDKIT`: No point in defining this everyone - exporting and defining should be enough.

For further information, see:

* kubernetes-sigs/kubebuilder#2566
* kubernetes-sigs/kubebuilder#2486
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants