alphagov / terraform-provider-concourse

A terraform provider for Concourse
MIT License
50 stars 28 forks source link

Unable to build (Linux) #7

Closed Tabby closed 5 years ago

Tabby commented 5 years ago

I tried to build this provider according to the readme instructions but get the following errors:

glide install

[INFO]  Lock file (glide.lock) does not exist. Performing update.
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Fetching updates for github.com/ghodss/yaml
[INFO]  --> Fetching updates for golang.org/x/oauth2
[INFO]  --> Fetching updates for github.com/concourse/concourse
[INFO]  --> Fetching updates for github.com/onsi/ginkgo
[INFO]  --> Fetching updates for github.com/hashicorp/terraform
[INFO]  --> Fetching updates for github.com/onsi/gomega
[INFO]  Resolving imports
[INFO]  --> Fetching updates for github.com/hashicorp/go-hclog
[INFO]  --> Fetching updates for github.com/hashicorp/go-plugin
[INFO]  --> Fetching updates for github.com/zclconf/go-cty
[INFO]  --> Fetching updates for google.golang.org/grpc
[INFO]  --> Fetching updates for github.com/agext/levenshtein
[INFO]  --> Fetching updates for github.com/hashicorp/errwrap
[INFO]  --> Fetching updates for github.com/hashicorp/go-multierror
[INFO]  --> Fetching updates for github.com/hashicorp/go-uuid
[INFO]  --> Fetching updates for github.com/hashicorp/go-version
[INFO]  --> Fetching updates for github.com/hashicorp/hcl
[INFO]  --> Fetching updates for github.com/mitchellh/copystructure
[INFO]  --> Fetching updates for github.com/mitchellh/reflectwalk
[INFO]  --> Fetching updates for github.com/davecgh/go-spew
[INFO]  --> Fetching updates for github.com/hashicorp/logutils
[INFO]  --> Fetching updates for github.com/mitchellh/colorstring
[INFO]  --> Fetching updates for github.com/mitchellh/mapstructure
[INFO]  --> Fetching updates for github.com/jessevdk/go-flags
[INFO]  --> Fetching updates for github.com/tedsuo/rata
[INFO]  --> Fetching updates for golang.org/x/crypto
[INFO]  --> Fetching updates for sigs.k8s.io/yaml
[INFO]  --> Fetching updates for github.com/peterhellberg/link
[INFO]  --> Fetching updates for github.com/cppforlife/go-semi-semantic
[INFO]  --> Fetching updates for gopkg.in/yaml.v2
[INFO]  --> Fetching updates for github.com/fatih/color
[INFO]  --> Fetching updates for github.com/mattn/go-colorable
[INFO]  --> Fetching updates for github.com/mattn/go-isatty
[INFO]  --> Fetching updates for github.com/hashicorp/yamux
[INFO]  --> Fetching updates for github.com/mitchellh/go-testing-interface
[INFO]  --> Fetching updates for github.com/oklog/run
[INFO]  --> Fetching updates for golang.org/x/net
[INFO]  --> Fetching updates for github.com/golang/protobuf
[INFO]  --> Fetching updates for github.com/hashicorp/go-getter
[INFO]  --> Fetching updates for github.com/hashicorp/terraform-svchost
[INFO]  --> Fetching updates for github.com/mitchellh/cli
[INFO]  --> Fetching updates for golang.org/x/text
[INFO]  --> Fetching updates for github.com/vmihailenco/msgpack
[ERROR] Error scanning github.com/hashicorp/hcl/v2: cannot find package "." in:
        /home/tabby/.glide/cache/src/https-github.com-hashicorp-hcl/v2
[ERROR] Error scanning github.com/hashicorp/hcl/v2/hcldec: cannot find package "." in:
        /home/tabby/.glide/cache/src/https-github.com-hashicorp-hcl/v2/hcldec
[ERROR] Error scanning github.com/hashicorp/hcl/v2/hclsyntax: cannot find package "." in:
        /home/tabby/.glide/cache/src/https-github.com-hashicorp-hcl/v2/hclsyntax
[INFO]  --> Fetching updates for github.com/blang/semver
[INFO]  --> Fetching updates for github.com/hashicorp/hil
[INFO]  --> Fetching updates for github.com/mitchellh/hashstructure
[INFO]  --> Fetching updates for github.com/spf13/afero
[INFO]  --> Fetching updates for github.com/hashicorp/go-cleanhttp
[INFO]  --> Fetching updates for github.com/zclconf/go-cty-yaml
[INFO]  --> Fetching updates for github.com/mitchellh/go-wordwrap
[INFO]  --> Fetching updates for github.com/hashicorp/terraform-config-inspect
[INFO]  --> Fetching updates for github.com/bmizerany/pat
[INFO]  --> Fetching updates for github.com/vito/go-sse
[INFO]  --> Fetching updates for github.com/google/jsonapi
[INFO]  --> Fetching updates for github.com/hpcloud/tail
[INFO]  --> Fetching updates for golang.org/x/sys
[INFO]  --> Fetching updates for google.golang.org/appengine
[INFO]  --> Fetching updates for google.golang.org/genproto
[INFO]  --> Fetching updates for cloud.google.com/go
[INFO]  --> Fetching updates for github.com/aws/aws-sdk-go
[INFO]  --> Fetching updates for github.com/bgentry/go-netrc
[INFO]  --> Fetching updates for github.com/hashicorp/go-safetemp
[INFO]  --> Fetching updates for github.com/mitchellh/go-homedir
[INFO]  --> Fetching updates for github.com/ulikunitz/xz
[INFO]  --> Fetching updates for google.golang.org/api
[INFO]  --> Fetching updates for github.com/armon/go-radix
[INFO]  --> Fetching updates for github.com/bgentry/speakeasy
[INFO]  --> Fetching updates for github.com/posener/complete
[INFO]  --> Fetching updates for github.com/vmihailenco/tagparser
[ERROR] Error scanning github.com/hashicorp/hcl/v2/gohcl: cannot find package "." in:
        /home/tabby/.glide/cache/src/https-github.com-hashicorp-hcl/v2/gohcl
[ERROR] Error scanning github.com/hashicorp/hcl/v2/hclparse: cannot find package "." in:
        /home/tabby/.glide/cache/src/https-github.com-hashicorp-hcl/v2/hclparse
[ERROR] Error scanning github.com/hashicorp/hcl/v2/ext/typeexpr: cannot find package "." in:
        /home/tabby/.glide/cache/src/https-github.com-hashicorp-hcl/v2/ext/typeexpr
[ERROR] Error scanning github.com/hashicorp/hcl/v2/ext/dynblock: cannot find package "." in:
        /home/tabby/.glide/cache/src/https-github.com-hashicorp-hcl/v2/ext/dynblock
[INFO]  --> Fetching updates for github.com/apparentlymart/go-cidr
[INFO]  --> Fetching updates for github.com/bmatcuk/doublestar
[INFO]  --> Fetching updates for github.com/google/uuid
[INFO]  --> Fetching updates for github.com/apparentlymart/go-textseg
[ERROR] Error scanning github.com/hashicorp/hcl/v2/hcled: cannot find package "." in:
        /home/tabby/.glide/cache/src/https-github.com-hashicorp-hcl/v2/hcled
[INFO]  --> Fetching updates for github.com/hashicorp/hcl2
[INFO]  --> Fetching crypto/ed25519
[WARN]  Unable to checkout crypto/ed25519
[ERROR] Error looking for crypto/ed25519: Cannot detect VCS
[INFO]  Found Godeps.json file in /home/tabby/.glide/cache/src/https-github.com-hpcloud-tail
[INFO]  --> Parsing Godeps metadata...
[INFO]  --> Fetching updates for gopkg.in/tomb.v1
[INFO]  --> Setting version for gopkg.in/tomb.v1 to c131134a1947e9afd9cecfe11f4c6dff0732ae58.
[INFO]  --> Fetching updates for github.com/googleapis/gax-go
[ERROR] Error scanning github.com/vmihailenco/msgpack/v4/codes: cannot find package "." in:
        /home/tabby/.glide/cache/src/https-github.com-vmihailenco-msgpack/v4/codes
[INFO]  --> Fetching updates for gopkg.in/fsnotify/fsnotify.v1
[INFO]  --> Fetching updates for github.com/jstemmer/go-junit-report
[INFO]  --> Fetching updates for golang.org/x/exp
[INFO]  --> Fetching updates for golang.org/x/lint
[INFO]  --> Fetching updates for golang.org/x/tools
[INFO]  --> Fetching updates for honnef.co/go/tools
[INFO]  --> Fetching updates for go.opencensus.io
[INFO]  --> Fetching updates for github.com/jmespath/go-jmespath
[INFO]  --> Fetching updates for github.com/google/go-cmp
[INFO]  --> Fetching updates for github.com/golang/groupcache
[INFO]  --> Fetching updates for github.com/BurntSushi/toml
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports

go build

pkg/provider/team.go:8:2: cannot find package "github.com/concourse/concourse/atc" in any of:
        /home/tabby/go/src/github.com/alphagov/terraform-provider-concourse/vendor/github.com/concourse/concourse/atc (vendor tree)
        /usr/lib/go/src/github.com/concourse/concourse/atc (from $GOROOT)
        /home/tabby/go/src/github.com/concourse/concourse/atc (from $GOPATH)
pkg/provider/config.go:6:2: cannot find package "github.com/concourse/concourse/fly/rc" in any of:
        /home/tabby/go/src/github.com/alphagov/terraform-provider-concourse/vendor/github.com/concourse/concourse/fly/rc (vendor tree)
        /usr/lib/go/src/github.com/concourse/concourse/fly/rc (from $GOROOT)
        /home/tabby/go/src/github.com/concourse/concourse/fly/rc (from $GOPATH)
pkg/client/client.go:7:2: cannot find package "github.com/concourse/concourse/go-concourse/concourse" in any of:
        /home/tabby/go/src/github.com/alphagov/terraform-provider-concourse/vendor/github.com/concourse/concourse/go-concourse/concourse (vendor tree)
        /usr/lib/go/src/github.com/concourse/concourse/go-concourse/concourse (from $GOROOT)
        /home/tabby/go/src/github.com/concourse/concourse/go-concourse/concourse (from $GOPATH)
pkg/provider/util.go:5:2: cannot find package "github.com/ghodss/yaml" in any of:
        /home/tabby/go/src/github.com/alphagov/terraform-provider-concourse/vendor/github.com/ghodss/yaml (vendor tree)
        /usr/lib/go/src/github.com/ghodss/yaml (from $GOROOT)
        /home/tabby/go/src/github.com/ghodss/yaml (from $GOPATH)
pkg/provider/config.go:8:2: cannot find package "github.com/hashicorp/terraform/helper/schema" in any of:
        /home/tabby/go/src/github.com/alphagov/terraform-provider-concourse/vendor/github.com/hashicorp/terraform/helper/schema (vendor tree)
        /usr/lib/go/src/github.com/hashicorp/terraform/helper/schema (from $GOROOT)
        /home/tabby/go/src/github.com/hashicorp/terraform/helper/schema (from $GOPATH)
main.go:4:2: cannot find package "github.com/hashicorp/terraform/plugin" in any of:
        /home/tabby/go/src/github.com/alphagov/terraform-provider-concourse/vendor/github.com/hashicorp/terraform/plugin (vendor tree)
        /usr/lib/go/src/github.com/hashicorp/terraform/plugin (from $GOROOT)
        /home/tabby/go/src/github.com/hashicorp/terraform/plugin (from $GOPATH)
main.go:5:2: cannot find package "github.com/hashicorp/terraform/terraform" in any of:
        /home/tabby/go/src/github.com/alphagov/terraform-provider-concourse/vendor/github.com/hashicorp/terraform/terraform (vendor tree)
        /usr/lib/go/src/github.com/hashicorp/terraform/terraform (from $GOROOT)
        /home/tabby/go/src/github.com/hashicorp/terraform/terraform (from $GOPATH)
pkg/client/client.go:8:2: cannot find package "golang.org/x/oauth2" in any of:
        /home/tabby/go/src/github.com/alphagov/terraform-provider-concourse/vendor/golang.org/x/oauth2 (vendor tree)
        /usr/lib/go/src/golang.org/x/oauth2 (from $GOROOT)
        /home/tabby/go/src/golang.org/x/oauth2 (from $GOPATH)

Output of go env:

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/tabby/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/tabby/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="x86_64-pc-linux-gnu-gcc"
CXX="x86_64-pc-linux-gnu-g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build376764370=/tmp/go-build -gno-record-gcc-switches"
tlwr commented 5 years ago

Thanks for submitting this issue, the README is out of date and I will update it.

We do not use Glide anymore. You can build by running make or go build

tlwr commented 5 years ago

Thanks again, hopefully the updated instructions/Makefile works for you

If not please comment on this issue