Building influxdb fails

Trying to build influxdb on CentOS 7.6…

/nfs/home/centos> cat infl.out
+ export GOPATH=/nfs/home/centos/go
+ GOPATH=/nfs/home/centos/go
+ export GOBIN=/nfs/home/centos/go/bin
+ GOBIN=/nfs/home/centos/go/bin
+ export PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/nfs/home/centos/go/bin
+ PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/nfs/home/centos/go/bin
+ mkdir -p /nfs/home/centos/go
+ go get github.com/influxdata/influxdb
+ cd /nfs/home/centos/go/src/github.com/influxdata/
+ go get ./...
# github.com/influxdata/flux/ast/asttest/cmpgen
flux/ast/asttest/cmpgen/main.go:25:14: undefined: importer.ForCompiler
# github.com/influxdata/flux/stdlib/runtime
flux/stdlib/runtime/runtime.go:18:31: cannot use Version (type func() (values.Value, error)) as type func(context.Context, dependencies.Interface, values.Object) (values.Value, error) in argument to values.NewFunction
# github.com/influxdata/flux/execute/executetest
flux/execute/executetest/dataset.go:14:37: multiple-value uuid.NewV4() in single-value context
flux/execute/executetest/source.go:48:36: multiple-value uuid.NewV4() in single-value context
# github.com/influxdata/influxdb/chronograf/id
influxdb/chronograf/id/uuid.go:15:19: multiple-value uuid.NewV4() in single-value context
# github.com/influxdata/influxdb/query
influxdb/query/spec.go:17:8: undefined: lang.WalkIR
# github.com/hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp
../hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp/client.go:447:17: c.HTTPClient.CloseIdleConnections undefined (type *http.Client has no field or method CloseIdleConnections)
../hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp/client.go:507:16: c.HTTPClient.CloseIdleConnections undefined (type *http.Client has no field or method CloseIdleConnections)
../hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp/client.go:538:16: c.HTTPClient.CloseIdleConnections undefined (type *http.Client has no field or method CloseIdleConnections)
../hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp/client.go:545:15: c.HTTPClient.CloseIdleConnections undefined (type *http.Client has no field or method CloseIdleConnections)
../hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp/client.go:554:14: c.HTTPClient.CloseIdleConnections undefined (type *http.Client has no field or method CloseIdleConnections)
# github.com/influxdata/influxdb/nats
influxdb/nats/server.go:28:50: cannot use s.serverOpts (type *"github.com/nats-io/gnatsd/server".Options) as type *"github.com/nats-io/nats-streaming-server/vendor/github.com/nats-io/nats-server/v2/server".Options in argument to "github.com/nats-io/nats-streaming-server/server".RunServerWithOpts
influxdb/nats/server.go:46:2: cannot use "github.com/nats-io/nats-streaming-server/server".DefaultNatsServerOptions (type "github.com/nats-io/nats-streaming-server/vendor/github.com/nats-io/nats-server/v2/server".Options) as type "github.com/nats-io/gnatsd/server".Options in return argument

Trying a different way. (make in influxdb dir)…

 make[1]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/http'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/http'
    make[1]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/ui'
    yarn install
    yarn install v1.17.3
    [1/5] Validating package.json...
    error chronograf-ui@2.0.0: The engine "node" is incompatible with this module. Expected version ">=10.5.0". Got "6.17.1"
    error Found incompatible module.
    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    make[1]: *** [node_modules] Error 1
    make[1]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/ui'
    make[1]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf'
    make -C dist all
    find: ‘../../ui/build’: No such file or directory
    make[2]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf/dist'
    go generate -x
    env GO111MODULE=on go run github.com/kevinburke/go-bindata/go-bindata -o dist_gen.go -ignore 'map|go' -tags assets -pkg dist ../../ui/build/...
    bindata: Failed to stat input path '../../ui/build': lstat ../../ui/build: no such file or directory
    exit status 1
    dist.go:3: running "env": exit status 1
    make[2]: *** [dist_gen.go] Error 1
    make[2]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf/dist'
    make[1]: *** [dist] Error 2
    make[1]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf'
    make[1]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/query'
    make -C promql all
    make[2]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/query/promql'
    make[2]: Nothing to be done for `all'.
    make[2]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/query/promql'
    make[1]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/query'
    make[1]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage'
    make -C reads all
    make[2]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage/reads'
    make -C datatypes all
    make[3]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage/reads/datatypes'
    make[3]: Nothing to be done for `all'.
    make[3]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage/reads/datatypes'
    make[2]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage/reads'
    make[1]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage'
    env GO111MODULE=on go build -tags 'assets ' -o bin/linux/influx ./cmd/influx
    # github.com/influxdata/influxdb/chronograf/canned
    chronograf/canned/bin.go:20:11: undefined: AssetNames
    chronograf/canned/bin.go:23:18: undefined: Asset
    note: module requires Go 1.12# github.com/influxdata/influxdb/chronograf/dist
    chronograf/dist/dist.go:39:13: undefined: AssetInfo
    chronograf/dist/dist.go:59:18: undefined: Asset
    chronograf/dist/dist.go:74:11: undefined: Asset
    chronograf/dist/dist.go:83:14: undefined: AssetDir
    chronograf/dist/dist.go:84:14: undefined: AssetInfo
    note: module requires Go 1.12# github.com/influxdata/flux/stdlib/runtime
    /home/centos/go/pkg/mod/github.com/influxdata/flux@v0.47.0/stdlib/runtime/runtime.go:18:31: cannot use Version (type func() (values.Value, error)) as type func(context.Context, dependencies.Interface, values.Object) (values.Value, error) in argument to values.NewFunction
    note: module requires Go 1.12make: *** [bin/linux/influx] Error 2

It looks like your node version is 6.x.x, which is very old. You’ll need to update nodejs to atleast version 10.x.x

Yeah, I saw that. Stupid for posting the above. Fixed the node problem and it bails out here:

make[1]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/http'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/http'
make[1]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/ui'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/ui'
make[1]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf'
make -C dist all
make[2]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf/dist'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf/dist'
make -C server all
make[2]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf/server'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf/server'
make -C canned all
make[2]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf/canned'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf/canned'
make[1]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/chronograf'
make[1]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/query'
make -C promql all
make[2]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/query/promql'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/query/promql'
make[1]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/query'
make[1]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage'
make -C reads all
make[2]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage/reads'
make -C datatypes all
make[3]: Entering directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage/reads/datatypes'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage/reads/datatypes'
make[2]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage/reads'
make[1]: Leaving directory `/nfs/home/centos/go/src/github.com/influxdata/influxdb/storage'
env GO111MODULE=on go build -tags 'assets ' -o bin/linux/influx ./cmd/influx
# github.com/influxdata/flux/stdlib/runtime
/home/centos/go/pkg/mod/github.com/influxdata/flux@v0.47.0/stdlib/runtime/runtime.go:18:31: cannot use Version (type func() (values.Value, error)) as type func(context.Context, dependencies.Interface, values.Object) (values.Value, error) in argument to values.NewFunction
note: module requires Go 1.12make: *** [bin/linux/influx] Error 2

I tired “go get ./…” with a checked out v1.7.7 …

go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
	ignoring go.mod;
	see 'go help modules'
# github.com/influxdata/flux/ast/asttest/cmpgen
ast/asttest/cmpgen/main.go:25:14: undefined: importer.ForCompiler
# github.com/influxdata/flux/stdlib/runtime
stdlib/runtime/runtime.go:18:31: cannot use Version (type func() (values.Value, error)) as type func(context.Context, dependencies.Interface, values.Object) (values.Value, error) in argument to values.NewFunction
# github.com/influxdata/flux/execute/executetest
execute/executetest/dataset.go:14:37: multiple-value uuid.NewV4() in single-value context
execute/executetest/source.go:48:36: multiple-value uuid.NewV4() in single-value context

What version of flux do I need to checkout to build influxdb?And if I want to build release 1.7.7 or 1.7.8?

Hi @dataMechanic,

In-order to build InfluxDB v1.7.7 you need 2 commands:

# This is Go's first attempt at an official vendor management.
dep ensure 
# Build influxd
go build ./cmd/influxd