Vault: Can't build from a fresh clone of vault on mac

Created on 10 Oct 2017  路  4Comments  路  Source: hashicorp/vault

Environment:
go version go1.9.1 darwin/amd64

Expected Behavior:
Vault would compile

Actual Behavior:
$ make dev --debug
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
Reading makefiles...
Updating goal targets....
File dev' does not exist. Filefmtcheck' does not exist.
Must remake target fmtcheck'. ==> Checking that code complies with gofmt requirements... Successfully remade target filefmtcheck'.
File prep' does not exist. Must remake targetprep'.
go generate
can't load package: package github.com/hashicorp/vault/vault: code in directory /Users/rzabicki/go/src/github.com/hashicorp/vault/vault expects import "github.com/hashicorp/vault"
make: * [prep] Error 1

Steps to Reproduce:
$ echo $GOPATH
/Users/rzabicki/go
$ mkdir -p $GOPATH/src/github.com/hashicorp/vault
$ cd $GOPATH/src/github.com/hashicorp/vault
$ git clone https://github.com/hashicorp/vault.git
$ cd vault/
$ make bootstrap
$ make dev

Important Factoids:

References:

Most helpful comment

Run make bootstrap to fix that.

All 4 comments

Your source is in $GOPATH/src/github.com/hashicorp/vault/vault but needs to be in $GOPATH/src/github.com/hashicorp/vault -- changing that should fix it!

D'oh! That was a silly error. Thanks. I fixed that, but now I get a different error:

$ make dev --debug
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
Reading makefiles...
Updating goal targets....
File dev' does not exist. Filefmtcheck' does not exist.
Must remake target fmtcheck'. ==> Checking that code complies with gofmt requirements... Successfully remade target filefmtcheck'.
File prep' does not exist. Must remake targetprep'.
go generate
cp .hooks/* .git/hooks/
Successfully remade target file prep'. Must remake targetdev'.
==> Removing old directory...
==> Building...
/Users/rzabicki/go/src/github.com/hashicorp/vault/scripts/build.sh: line 49: gox: command not found
make: * [dev] Error 127

Run make bootstrap to fix that.

That did it. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tustvold picture tustvold  路  3Comments

Wonder007 picture Wonder007  路  3Comments

gtmtech picture gtmtech  路  3Comments

lexsys27 picture lexsys27  路  3Comments

weisinc picture weisinc  路  3Comments