Building Istio from code

I am building Istio in DEBUG mode on MacOS. I set:

export DEBUG=1
make docker

I am getting this error:

mkdir -p /work/out/darwin_amd64/release
GOOS=linux GOARCH=amd64 LDFLAGS='' common/scripts/gobuild.sh /work/out/linux_amd64/ ./istioctl/cmd/istioctl ./pilot/cmd/pilot-discovery ./pkg/test/echo/cmd/client ./pkg/test/echo/cmd/server ./operator/cmd/operator ./cni/cmd/istio-cni ./cni/cmd/istio-cni-taint ./cni/cmd/install-cni ./tools/istio-iptables ./tools/bug-report
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed

Any idea on this issue?

Hello,

What release branch are you trying to build against? I fixed a similar issue earlier.

I just tried it on the main branch and it worked.

Thanks ericvn. I was able to resolve. I increased the CPU and Memory limits on Docker. Apparently, Istio builds the code inside the container and in my case the memory limit was 2GB. I bumped to 8GB and it built successfully.

Glad to hear you got it working. Yes, by default Istio builds inside a container. This allows anyone with Docker and make to build Istio without needing to install other tools.