From 36664d433bee0a1b700fd24a90288ec5d6fc6549 Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Wed, 12 Jan 2022 14:13:42 -0500 Subject: [PATCH 1/2] chore(makefile): Fix docker-build-dev target This target is updated to set GOOS and GOARCH instead of XC_OSARCH since the build script was updated to use these environment variables for cross-compiling. See: 1c8e0ed1e1cb041944034264fb22b5537d69eb7e --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b17c92518..20000f0b6 100644 --- a/Makefile +++ b/Makefile @@ -249,7 +249,8 @@ docker-multiarch-build: .PHONY: docker-build-dev # builds from locally generated binary in bin/ -docker-build-dev: export XC_OSARCH=linux/amd64 +docker-build-dev: export GOOS=linux +docker-build-dev: export GOARCH=amd64 docker-build-dev: dev cp -r bin docker/ docker build -t $(IMAGE_TAG_DEV) \ From 0c3218ec3ef4202623ae12ed9544ec66cb03b5ad Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Wed, 12 Jan 2022 14:16:00 -0500 Subject: [PATCH 2/2] docs(website): Update cross-compiling notes This replaces references to XC_OSARCH with GOOS and GOARCH. See: 1c8e0ed1e1cb041944034264fb22b5537d69eb7e --- website/content/docs/developing/building.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/docs/developing/building.mdx b/website/content/docs/developing/building.mdx index e48b2b797..62ba05dc4 100644 --- a/website/content/docs/developing/building.mdx +++ b/website/content/docs/developing/building.mdx @@ -27,8 +27,8 @@ binary to somewhere in your `$PATH` such as `/usr/local/bin`. ## Cross Platform Build -If you need to cross compile boundary for another OS or architecture, use the [XC_OSARCH](https://github.com/hashicorp/boundary/blob/master/scripts/build.sh#L26) -environment variable to set this. Example: `$ XC_OSARCH=linux/amd64 make dev` +If you need to cross compile boundary for another OS or architecture, use the [GOOS and GOARCH](https://github.com/hashicorp/boundary/blob/master/scripts/build.sh#L26) +environment variable to set this. Example: `$ GOOS=linux GOARCH=amd64 make dev` For more details, please consult the [Boundary project on GitHub](https://github.com/hashicorp/boundary#build-and-start-boundary-in-dev-mode).