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

Windows build docs & Makefile targets fail to produce a Windows binary #1619

Closed
dzrw opened this issue Aug 10, 2016 · 1 comment
Closed

Windows build docs & Makefile targets fail to produce a Windows binary #1619

dzrw opened this issue Aug 10, 2016 · 1 comment

Comments

@dzrw
Copy link
Contributor

dzrw commented Aug 10, 2016

System info:

Telegraf version: version 1.0.0-beta3-46-g69e4e86
OS: OSX 10.10.5
Go version: 1.5

Steps to reproduce:

  1. go get github.com/influxdata/telegraf into a clean $GOPATH.
  2. Undefine $GOOS and $GOARCH
  3. make windows
  4. file telegraf.exe
  5. Observe that telegraf.exe is Mach-O 64-bit executable x86_64.

Expected behavior:

I expected to be able to use the README.md documentation combined with the make windows target to produce a Windows binary (because I'd like to run the latest version which contains a fix to support running telegraf as a Windows service).

Actual behavior:

From a clean $GOPATH, running make windows fails during go build with missing packages that are not restored by gdm.

../../aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go:8:2: cannot find package "github.com/go-ini/ini" in any of:
    /usr/local/go/src/github.com/go-ini/ini (from $GOROOT)
    /Users/politician/go/src/github.com/go-ini/ini (from $GOPATH)
../../aws/aws-sdk-go/aws/awsutil/path_value.go:9:2: cannot find package "github.com/jmespath/go-jmespath" in any of:
    /usr/local/go/src/github.com/jmespath/go-jmespath (from $GOROOT)
    /Users/politician/go/src/github.com/jmespath/go-jmespath (from $GOPATH)
../../stretchr/testify/assert/assertions.go:18:2: cannot find package "github.com/pmezard/go-difflib/difflib" in any of:
    /usr/local/go/src/github.com/pmezard/go-difflib/difflib (from $GOROOT)
    /Users/politician/go/src/github.com/pmezard/go-difflib/difflib (from $GOPATH)
../../stretchr/testify/mock/mock.go:12:2: cannot find package "github.com/stretchr/objx" in any of:
    /usr/local/go/src/github.com/stretchr/objx (from $GOROOT)
    /Users/politician/go/src/github.com/stretchr/objx (from $GOPATH)
../../hpcloud/tail/watch/inotify.go:12:2: cannot find package "gopkg.in/fsnotify.v1" in any of:
    /usr/local/go/src/gopkg.in/fsnotify.v1 (from $GOROOT)
    /Users/politician/go/src/gopkg.in/fsnotify.v1 (from $GOPATH)
../../hpcloud/tail/watch/inotify.go:13:2: cannot find package "gopkg.in/tomb.v1" in any of:
    /usr/local/go/src/gopkg.in/tomb.v1 (from $GOROOT)
    /Users/politician/go/src/gopkg.in/tomb.v1 (from $GOPATH)

After manually fetching the HEAD of each of these packages, the build was able to complete.

> go get github.com/go-ini/ini
> go get github.com/jmespath/go-jmespath
> go get github.com/pmezard/go-difflib/difflib
> go get github.com/stretchr/objx
> go get gopkg.in/fsnotify.v1
> go get gopkg.in/tomb.v1

However, the binary produced is not a Windows binary!

> file telegraf.exe
telegraf.exe: Mach-O 64-bit executable x86_64
> ./telegraf.exe --version
Telegraf - version 1.0.0-beta3-46-g69e4e86
@dzrw
Copy link
Contributor Author

dzrw commented Aug 11, 2016

Resolved by #1621

@dzrw dzrw closed this as completed Aug 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant