Thanks for the reply. Are you able to build with CGO enabled? I can build without CGO support, but once I remove the cgo flag, the build will fail. I probably mess up my paths somewhere.
On Tuesday, November 6, 2018 at 9:09:27 PM UTC+7, peterGo wrote: > > Henry, > > MinGW and TDM-GCC both work for installing Go from source on Windows 10 > 64-bit. Here is MinGW: > > # Windows: > > Microsoft Windows [Version 10.0.17134.345] > > # gcc: > > C:\Users\peter>gcc --version > gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.2.0 > > # Go1.4: > > C:\Users\peter\Go1.4\bin>go version > go version go1.4-bootstrap-20170531 windows/amd64 > > C:\Users\peter\Go1.4\bin>go env > set GOARCH=amd64 > set GOBIN= > set GOCHAR=6 > set GOEXE=.exe > set GOHOSTARCH=amd64 > set GOHOSTOS=windows > set GOOS=windows > set GOPATH=C:\Users\peter\gopath > set GORACE= > set GOROOT=C:\Users\peter\Go1.4 > set GOTOOLDIR=C:\Users\peter\Go1.4\pkg\tool\windows_amd64 > set CC=gcc > set GOGCCFLAGS=-m64 -fmessage-length=0 > set CXX=g++ > set CGO_ENABLED=0 > > # Go (devel): > > C:\Users\peter\Go\bin>go version > go version devel +d6e204e71f Fri Nov 2 17:28:53 2018 +0000 windows/amd64 > > C:\Users\peter\Go\bin>go env > set GOARCH=amd64 > set GOBIN= > set GOCACHE=C:\Users\peter\AppData\Local\go-build > set GOEXE=.exe > set GOFLAGS= > set GOHOSTARCH=amd64 > set GOHOSTOS=windows > set GOOS=windows > set GOPATH=C:\Users\peter\gopath > set GOPROXY= > set GORACE= > set GOROOT=C:\Users\peter\Go > set GOTMPDIR= > set GOTOOLDIR=C:\Users\peter\Go\pkg\tool\windows_amd64 > set GCCGO=gccgo > set CC=gcc > set CXX=g++ > set CGO_ENABLED=1 > set GOMOD= > set CGO_CFLAGS=-g -O2 > set CGO_CPPFLAGS= > set CGO_CXXFLAGS=-g -O2 > set CGO_FFLAGS=-g -O2 > set CGO_LDFLAGS=-g -O2 > set PKG_CONFIG=pkg-config > set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 > -fdebug-prefix-map=C:\Users\peter\AppData\Local\Temp\go-build538867246=/tmp/go-build > > -gno-record-gcc-switches > > C:\Users\peter\Go\src>make.bat > Building Go cmd/dist using C:\Users\peter\Go1.4 > Building Go toolchain1 using C:\Users\peter\Go1.4. > Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1. > Building Go toolchain2 using go_bootstrap and Go toolchain1. > Building Go toolchain3 using go_bootstrap and Go toolchain2. > Building packages and commands for windows/amd64. > --- > Installed Go for windows/amd64 in C:\Users\peter\Go > Installed commands in C:\Users\peter\Go\bin > > C:\Users\peter\Go\src>go version > go version devel +d6e204e71f Fri Nov 2 17:28:53 2018 +0000 windows/amd64 > > Peter > > On Monday, November 5, 2018 at 9:55:24 PM UTC-5, Henry wrote: >> >> Hi, >> >> I am having problems trying to build Go from source on my Windows 10 >> 64-bit machine. If someone has done this, it would be great if you could >> show me how you set up your box (eg. which GCC version you are using, >> whether you are using MinGW vs TDM-GCC, etc.). >> >> Thanks. >> >> Henry >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.