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

build.sh is missing in go directory for SDK #1039

Closed
pooneh-m opened this issue Sep 5, 2019 · 5 comments · Fixed by #2072
Closed

build.sh is missing in go directory for SDK #1039

pooneh-m opened this issue Sep 5, 2019 · 5 comments · Fixed by #2072
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/bug These are bugs.
Milestone

Comments

@pooneh-m
Copy link
Contributor

pooneh-m commented Sep 5, 2019

When running "make build-sdk" there is an error: "Command build not found - nothing to execute"

The script is looking for build.sh in the default go directory.

According to README build.sh needs to be in the directory.

@pooneh-m pooneh-m added the kind/bug These are bugs. label Sep 5, 2019
@markmandel
Copy link
Member

I think that's more of a warning than an actual issue - @cyriltovena you did this work, yes?

According to the readme:

All commands might not be required for all SDKs. (e.g. build is only used for our cpp SDK)

@roberthbailey
Copy link
Member

Would it be better to have a build.sh that is a no-op to get rid of the error then? I ran into the same thing when I was first poking at the SDKs and found it confusing.

@markmandel
Copy link
Member

I don't have strong opinions here 🤷‍♂️ - @cyriltovena you wrote it? WDYT?

@cyriltovena
Copy link
Collaborator

I don't think you should run make build-sdk but SDK_FOLDER=go make build-sdk.

If you want to build all of them you can use make build-sdks.

@markmandel markmandel added good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! labels Apr 22, 2021
@roberthbailey
Copy link
Member

Here is the current output:

$ make build-sdk SDK_FOLDER=go
cd build-sdk-images; \
if [ "go" != "tool" ] && [ -f go/build.sh ] ; then \
	cd - ; \
	make ensure-build-sdk-image SDK_FOLDER=go ; \
	docker run --rm -v /usr/local/google/home/robertbailey/Work/agones/build//.config/gcloud:/root/.config/gcloud -v ~/.kube/:/root/.kube -v ~/.config/helm:/root/.config/helm -v ~/.cache/helm:/root/.cache/helm -v /usr/local/google/home/robertbailey/Work/agones:/go/src/agones.dev/agones -v /usr/local/google/home/robertbailey/Work/agones/build//.gomod:/go/pkg/mod -v /usr/local/google/home/robertbailey/Work/agones/build//.gocache:/root/.cache/go-build -e "VERSION=1.14.0-e2d5970" \
		 agones-build-sdk-go:e2c96ffb94 build ; \
else \
	echo "Command build not found - nothing to execute" ; \
fi
Command build not found - nothing to execute

I think that the confusion is that a bunch of stuff is printed that looks like an error, but what is happening is that make is printing out a long line of shell that is saying "if the file exists, execute it, and if not print that there is nothing to do".

If we suppress the shell command itself, then the output looks a lot nicer:

$ make build-sdk SDK_FOLDER=go
Command build not found - nothing to execute

It prints a message (not an error) but without all of the confusing bits around it. It also looks ok for building the cpp sdk (which is the only one that currently has a build.sh file):

$ make build-sdk SDK_FOLDER=cpp
/usr/local/google/home/robertbailey/Work/agones/build
make[1]: Entering directory '/usr/local/google/home/robertbailey/Work/agones/build'
make ensure-image IMAGE_TAG=agones-build-sdk-cpp:39762d569b BUILD_TARGET=build-build-sdk-image SDK_FOLDER=cpp
make[2]: Entering directory '/usr/local/google/home/robertbailey/Work/agones/build'
make[2]: Leaving directory '/usr/local/google/home/robertbailey/Work/agones/build'
make[1]: Leaving directory '/usr/local/google/home/robertbailey/Work/agones/build'
+ /root/build.sh
+ cd ./sdks/cpp
+ make build verify install archive VERSION=1.14.0-e2d5970
mkdir /go/src/agones.dev/agones/sdks/cpp//.build
mkdir: cannot create directory '/go/src/agones.dev/agones/sdks/cpp//.build': File exists
mkdir /go/src/agones.dev/agones/sdks/cpp//.archives
make: [Makefile:27: build] Error 1 (ignored)
mkdir: cannot create directory '/go/src/agones.dev/agones/sdks/cpp//.archives': File exists
make: [Makefile:28: build] Error 1 (ignored)
cd /go/src/agones.dev/agones/sdks/cpp//.build && cmake .. -DCMAKE_BUILD_TYPE=Release -DAGONES_SILENT_OUTPUT=ON -G "Unix Makefiles" -Wno-dev -DCMAKE_INSTALL_PREFIX=.install
-- Configuring done
-- Generating done
-- Build files have been written to: /go/src/agones.dev/agones/sdks/cpp/.build
cd /go/src/agones.dev/agones/sdks/cpp//.build && cmake --build . --target install -- -s
Install the project...
-- Install configuration: "Release"
cd /go/src/agones.dev/agones/sdks/cpp//.build/clang-format && cmake . -DAGONES_SILENT_OUTPUT=ON
-- Configuring done
-- Generating done
-- Build files have been written to: /go/src/agones.dev/agones/sdks/cpp/.build/clang-format
cp -r /go/src/agones.dev/agones/sdks/cpp//.build/.install /opt/local
cd /go/src/agones.dev/agones/sdks/cpp//.build/.install && tar cf /go/src/agones.dev/agones/sdks/cpp//.archives/agonessdk-1.14.0-e2d5970-linux-arch_64.tar.gz *

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/bug These are bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants