[SOLVED] Build packetbeat on windows

I am really new to Go, and I can't figure out why make does not work:
C:\Go\src\github.com\elastic\packetbeat>make
Must run make.bat from Go src directory.

Running make from the c:\src gives this:
C:\Go\src>make github.com/elastic/packetbeat

Building Go bootstrap tool.

cmd/dist
ERROR: Cannot find C:\Users\admin\Go1.4\bin\go.exe
"Set GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4."

And when I try and add the GOROOT_BOOTSTRAP variable my Go starts giving me compile not found errors and I have to reinstall Go to make it work again.

So I followed Tudor's advice and modified my GOPATH

My paths:
GOPATH=c:\go;c:\go\src\github.com\elastic\packetbeat
GOROOT=c:\go\

That gives me the following error (there is no header file for pcap.h on my system)

C:\Go\src\github.com\elastic\packetbeat>go build

github.com/elastic/packetbeat/protos/thrift

protos\thrift\thrift_idl.go:30: field.Id undefined (type *parser.Field has no field or method Id, but does have ID)
protos\thrift\thrift_idl.go:31: field.Id undefined (type *parser.Field has no field or method Id, but does have ID)
protos\thrift\thrift_idl.go:39: field.Id undefined (type *parser.Field has no field or method Id, but does have ID)

github.com/tsg/gopacket/pcap

....\tsg\gopacket\pcap\pcap.go:18:18: fatal error: pcap.h: No such file or directory
#include <pcap.h>
^
compilation terminated.

The reason why I want to compile myself is that I will try and add support for at second windows driver "Microsoft Network Monitor 3 Driver" so I don't have to install the Riverbed driver, hope that it makes sense :slight_smile: