Skip to content

how do you build? #858

@xin-at-marathon

Description

@xin-at-marathon

This is the 1st time I try to build confd.

go version
go version go1.18.3 linux/amd64
export GOPATH=/data

I follow the instruction:

$ mkdir -p $GOPATH/src/github.com/kelseyhightower
$ git clone https://github.com/kelseyhightower/confd.git $GOPATH/src/github.com/kelseyhightower/confd
$ cd $GOPATH/src/github.com/kelseyhightower/confd
$ make

then I got error:

Building confd...
go: cannot find main module, but found Gopkg.lock in /data/src/github.com/kelseyhightower/confd
        to create a module there, run:
        go mod init
make: *** [build] Error 1

If I run go mod init, I will get:

go mod init
go: creating new go.mod: module github.com/kelseyhightower/confd
go: copying requirements from Gopkg.lock
go: to add module requirements and sums:
        go mod tidy

If I run go mod tidy, I will get:

……
……
……
go: found github.com/armon/go-radix in github.com/armon/go-radix v1.0.0
go: found github.com/hashicorp/go-memdb in github.com/hashicorp/go-memdb v1.3.3
go: found github.com/hashicorp/golang-lru in github.com/hashicorp/golang-lru v0.5.4
go: found github.com/keybase/go-crypto/openpgp in github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4
go: found github.com/keybase/go-crypto/openpgp/packet in github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4                                                                                                                     
go: found github.com/mitchellh/go-testing-interface in github.com/mitchellh/go-testing-interface v1.14.1
go: found github.com/patrickmn/go-cache in github.com/patrickmn/go-cache v2.1.0+incompatible
go: found github.com/ghodss/yaml in github.com/ghodss/yaml v1.0.0
go: found github.com/grpc-ecosystem/grpc-gateway/runtime in github.com/grpc-ecosystem/grpc-gateway v1.16.0
go: found github.com/tmc/grpc-websocket-proxy/wsproxy in github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75                                                                                                              
go: found github.com/prometheus/client_golang/prometheus in github.com/prometheus/client_golang v1.12.2
go: found github.com/jonboulle/clockwork in github.com/jonboulle/clockwork v0.3.0
go: found golang.org/x/time/rate in golang.org/x/time v0.0.0-20220609170525-579cf78fd858
go: found github.com/xiang90/probing in github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go: found golang.org/x/sync/errgroup in golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
go: found github.com/golang/glog in github.com/golang/glog v1.0.0
go: found github.com/coreos/bbolt in github.com/coreos/bbolt v1.3.6
go: found github.com/hashicorp/go-plugin in github.com/hashicorp/go-plugin v1.4.4
go: found github.com/hashicorp/go-version in github.com/hashicorp/go-version v1.5.0
go: found github.com/grpc-ecosystem/grpc-gateway/utilities in github.com/grpc-ecosystem/grpc-gateway v1.16.0
go: found github.com/google/btree in github.com/google/btree v1.1.1
go: found github.com/golang/groupcache/lru in github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: found github.com/hashicorp/yamux in github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87
go: found github.com/duosecurity/duo_api_golang in github.com/duosecurity/duo_api_golang v0.0.0-20220428205559-fa137a8ef05b                                                                                                                  
go: found github.com/duosecurity/duo_api_golang/authapi in github.com/duosecurity/duo_api_golang v0.0.0-20220428205559-fa137a8ef05b                                                                                                          
go: found github.com/gocql/gocql in github.com/gocql/gocql v1.1.0
go: found github.com/SAP/go-hdb/driver in github.com/SAP/go-hdb v0.106.1
go: found gopkg.in/mgo.v2 in gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
go: found github.com/denisenkom/go-mssqldb in github.com/denisenkom/go-mssqldb v0.12.2
go: found github.com/go-sql-driver/mysql in github.com/go-sql-driver/mysql v1.6.0
go: found github.com/lib/pq in github.com/lib/pq v1.10.6
go: github.com/kelseyhightower/confd/backends/etcdv3 imports
        github.com/coreos/etcd/clientv3 tested by
        github.com/coreos/etcd/clientv3.test imports
        github.com/coreos/etcd/auth imports
        github.com/coreos/etcd/mvcc/backend imports
        github.com/coreos/bbolt: github.com/coreos/[email protected]: parsing go.mod:
        module declares its path as: go.etcd.io/bbolt
                but was required as: github.com/coreos/bbolt

If I run make AGAIN, I'll get this error:

make
Building confd...
go: inconsistent vendoring in /data/src/github.com/kelseyhightower/confd:
        github.com/BurntSushi/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/aws/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/coreos/[email protected]+incompatible: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/coreos/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/fsnotify/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/garyburd/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/go-ini/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/gogo/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/golang/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/golang/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/hashicorp/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/hashicorp/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/hashicorp/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/hashicorp/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/hashicorp/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/hashicorp/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/hashicorp/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/hashicorp/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/hashicorp/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/jmespath/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/kelseyhightower/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/mitchellh/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/mitchellh/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/ryanuber/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/samuel/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/sethgrid/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/sirupsen/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/ugorji/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/xordataexchange/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        golang.org/x/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        golang.org/x/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        golang.org/x/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        golang.org/x/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        google.golang.org/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        google.golang.org/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        gopkg.in/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt

        To ignore the vendor directory, use -mod=readonly or -mod=mod.
        To sync the vendor directory, run:
                go mod vendor
make: *** [build] Error 1

any hint? please help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions