Building Couchbase query-engine from source failed!

Hi everyone,
Today we’ve faced an issue with building query-engine from source. The version of Couchbase is 7.0.1-6102-1, after cluster upgrade, a bug was found https://issues.couchbase.com/browse/MB-48601. I tried to make a build from repo https://github.com/couchbase/query and got errors:

./build.sh
go get -d -v ./…
github.com/blevesearch/zapx (download)
package github.com/blevesearch/zapx/v11: cannot find package “github.com/blevesearch/zapx/v11” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v11 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v11 (from $GOPATH)
package github.com/blevesearch/zapx/v12: cannot find package “github.com/blevesearch/zapx/v12” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v12 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v12 (from $GOPATH)
package github.com/blevesearch/zapx/v13: cannot find package “github.com/blevesearch/zapx/v13” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v13 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v13 (from $GOPATH)
package github.com/blevesearch/zapx/v14: cannot find package “github.com/blevesearch/zapx/v14” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v14 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v14 (from $GOPATH)
package crypto/ed25519: unrecognized import path “crypto/ed25519” (import path does not begin with hostname)
github.com/couchbase/gocbcore (download)
package github.com/couchbase/gocbcore/v9: cannot find package “github.com/couchbase/gocbcore/v9” in any of:
/usr/lib/go-1.11/src/github.com/couchbase/gocbcore/v9 (from $GOROOT)
/root/query/src/github.com/couchbase/gocbcore/v9 (from $GOPATH)
package github.com/couchbase/gocbcore/v9/memd: cannot find package “github.com/couchbase/gocbcore/v9/memd” in any of:
/usr/lib/go-1.11/src/github.com/couchbase/gocbcore/v9/memd (from $GOROOT)
/root/query/src/github.com/couchbase/gocbcore/v9/memd (from $GOPATH)
package github.com/couchbase/gocbcore/v9/connstr: cannot find package “github.com/couchbase/gocbcore/v9/connstr” in any of:
/usr/lib/go-1.11/src/github.com/couchbase/gocbcore/v9/connstr (from $GOROOT)
/root/query/src/github.com/couchbase/gocbcore/v9/connstr (from $GOPATH)
cd parser/n1ql
goyacc n1ql.y
go build
go fmt ./…
cd server/cbq-engine
go build -ldflags -X github.com/couchbase/query/util.VERSION=7.1.0-local_build
…/…/…/cbgt/tls.go:15:2: cannot find package “crypto/ed25519” in any of:
/usr/lib/go-1.11/src/crypto/ed25519 (from $GOROOT)
/root/query/src/crypto/ed25519 (from $GOPATH)
…/…/…/…/blevesearch/bleve/index/scorch/segment_plugin.go:24:2: cannot find package “github.com/blevesearch/zapx/v11” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v11 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v11 (from $GOPATH)
…/…/…/…/blevesearch/bleve/index/scorch/segment_plugin.go:25:2: cannot find package “github.com/blevesearch/zapx/v12” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v12 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v12 (from $GOPATH)
…/…/…/…/blevesearch/bleve/index/scorch/segment_plugin.go:26:2: cannot find package “github.com/blevesearch/zapx/v13” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v13 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v13 (from $GOPATH)
…/…/…/…/blevesearch/bleve/index/scorch/segment_plugin.go:27:2: cannot find package “github.com/blevesearch/zapx/v14” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v14 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v14 (from $GOPATH)
…/…/…/cbgt/feed_dcp_gocbcore.go:30:2: cannot find package “github.com/couchbase/gocbcore/v9” in any of:
/usr/lib/go-1.11/src/github.com/couchbase/gocbcore/v9 (from $GOROOT)
/root/query/src/github.com/couchbase/gocbcore/v9 (from $GOPATH)
…/…/datastore/couchbase/gcagent/client.go:23:2: cannot find package “github.com/couchbase/gocbcore/v9/connstr” in any of:
/usr/lib/go-1.11/src/github.com/couchbase/gocbcore/v9/connstr (from $GOROOT)
/root/query/src/github.com/couchbase/gocbcore/v9/connstr (from $GOPATH)
…/…/…/cbgt/feed_dcp_gocbcore.go:31:2: cannot find package “github.com/couchbase/gocbcore/v9/memd” in any of:
/usr/lib/go-1.11/src/github.com/couchbase/gocbcore/v9/memd (from $GOROOT)
/root/query/src/github.com/couchbase/gocbcore/v9/memd (from $GOPATH)
cd shell/cbq
go build

github.com/couchbase/query/shell/vliner

…/vliner/vliner.go:669:29: undefined: strings.ReplaceAll
cd tutorial
go build
go install ./…
…/cbgt/tls.go:15:2: cannot find package “crypto/ed25519” in any of:
/usr/lib/go-1.11/src/crypto/ed25519 (from $GOROOT)
/root/query/src/crypto/ed25519 (from $GOPATH)
…/…/blevesearch/bleve/index/scorch/segment_plugin.go:24:2: cannot find package “github.com/blevesearch/zapx/v11” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v11 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v11 (from $GOPATH)
…/…/blevesearch/bleve/index/scorch/segment_plugin.go:25:2: cannot find package “github.com/blevesearch/zapx/v12” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v12 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v12 (from $GOPATH)
…/…/blevesearch/bleve/index/scorch/segment_plugin.go:26:2: cannot find package “github.com/blevesearch/zapx/v13” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v13 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v13 (from $GOPATH)
…/…/blevesearch/bleve/index/scorch/segment_plugin.go:27:2: cannot find package “github.com/blevesearch/zapx/v14” in any of:
/usr/lib/go-1.11/src/github.com/blevesearch/zapx/v14 (from $GOROOT)
/root/query/src/github.com/blevesearch/zapx/v14 (from $GOPATH)
…/cbgt/feed_dcp_gocbcore.go:30:2: cannot find package “github.com/couchbase/gocbcore/v9” in any of:
/usr/lib/go-1.11/src/github.com/couchbase/gocbcore/v9 (from $GOROOT)
/root/query/src/github.com/couchbase/gocbcore/v9 (from $GOPATH)
…/cbgt/feed_dcp_gocbcore.go:31:2: cannot find package “github.com/couchbase/gocbcore/v9/memd” in any of:
/usr/lib/go-1.11/src/github.com/couchbase/gocbcore/v9/memd (from $GOROOT)
/root/query/src/github.com/couchbase/gocbcore/v9/memd (from $GOPATH)
datastore/couchbase/gcagent/client.go:23:2: cannot find package “github.com/couchbase/gocbcore/v9/connstr” in any of:
/usr/lib/go-1.11/src/github.com/couchbase/gocbcore/v9/connstr (from $GOROOT)
/root/query/src/github.com/couchbase/gocbcore/v9/connstr (from $GOPATH)

Followed instruction from readme but got the erros for missing some packages on github repos. Could anybody give some advices?

You will not able to use build.sh any more (standalone build of query) because of complex dependency . Track via MB-48606. You need to use cluster couchbase build using manifest.

NOTE: You will not able to build enterprise version of the build due to some repos are closed source.