Facing build issue while building cockroach.
Error:
make[1]: Entering directory '/hab/cache/src/cockroach-v19.1.3/src/github.com/cockroachdb/cockroach'
GOPATH set to /hab/cache/src/cockroach-v19.1.3
Cleaning old generated files.
rm: missing operand
Try 'rm --help' for more information.
fatal: not a git repository (or any of the parent directories): .git
Special case for 'prefix' variable, which is required by Homebrew.
Running make with -j8
GOPATH set to /hab/cache/src/cockroach-v19.1.3
Cleaning old generated files.
rm: missing operand
Try 'rm --help' for more information.
Detected change in build system. Rebooting Make.
fatal: not a git repository (or any of the parent directories): .git
Special case for 'prefix' variable, which is required by Homebrew.
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
Running make with -j8
GOPATH set to /hab/cache/src/cockroach-v19.1.3
Cleaning old generated files.
rm: missing operand
Try 'rm --help' for more information.
cd /hab/cache/src/cockroach-v19.1.3/src/github.com/cockroachdb/cockroach/c-deps/jemalloc && autoconf
mkdir -p bin
go install -v ./pkg/cmd/prereqs
touch bin/.submodules-initialized
go: cannot find main module, but found Gopkg.lock in /hab/cache/src/cockroach-v19.1.3/src/github.com/cockroachdb/cockroach
to create a module there, run:
go mod init
make[1]: [Makefile:1555: bin/prereqs] Error 1
make[1]: Waiting for unfinished jobs....
make[1]: Leaving directory '/hab/cache/src/cockroach-v19.1.3/src/github.com/cockroachdb/cockroach'
make: *** [Makefile:6: buildoss] Error 2
cockroach: Build time: 0m17s
cockroach: Exiting on error
Have also tried downloading source and building from source.
From source it clones other subprojects and builds. still facing same error:
Error:
GOPATH set to /root/go
Cleaning old generated files.
Special case for 'prefix' variable, which is required by Homebrew.
GOPATH set to /root/go
Cleaning old generated files.
Detected change in build system. Rebooting Make.
Special case for 'prefix' variable, which is required by Homebrew.
GOPATH set to /root/go
Cleaning old generated files.
cd /root/go/src/github.com/cockroachdb/cockroach/c-deps/jemalloc && autoconf
git submodule update --init --recursive
go install -v ./pkg/cmd/prereqs
installing githooks/commit-msg
installing githooks/post-checkout
installing githooks/post-merge
go: cannot find main module, but found Gopkg.lock in /root/go/src/github.com/cockroachdb/cockroach
to create a module there, run:
go mod init
installing githooks/post-rewrite
installing githooks/prepare-commit-msg
make: [Makefile:1652: bin/prereqs] Error 1
make: Waiting for unfinished jobs....
mkdir -p bin
touch bin/.submodules-initialized
cockroach: Build time: 27m25s
cockroach: Exiting on error
Facing build issue while building cockroach. Error:
make[1]: Entering directory '/hab/cache/src/cockroach-v19.1.3/src/github.com/cockroachdb/cockroach' GOPATH set to /hab/cache/src/cockroach-v19.1.3 Cleaning old generated files. rm: missing operand Try 'rm --help' for more information. fatal: not a git repository (or any of the parent directories): .git
Special case for 'prefix' variable, which is required by Homebrew.
Running make with -j8 GOPATH set to /hab/cache/src/cockroach-v19.1.3 Cleaning old generated files. rm: missing operand Try 'rm --help' for more information. Detected change in build system. Rebooting Make. fatal: not a git repository (or any of the parent directories): .git
Special case for 'prefix' variable, which is required by Homebrew.
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. Running make with -j8 GOPATH set to /hab/cache/src/cockroach-v19.1.3 Cleaning old generated files. rm: missing operand Try 'rm --help' for more information. cd /hab/cache/src/cockroach-v19.1.3/src/github.com/cockroachdb/cockroach/c-deps/jemalloc && autoconf mkdir -p bin go install -v ./pkg/cmd/prereqs touch bin/.submodules-initialized go: cannot find main module, but found Gopkg.lock in /hab/cache/src/cockroach-v19.1.3/src/github.com/cockroachdb/cockroach to create a module there, run: go mod init make[1]: [Makefile:1555: bin/prereqs] Error 1 make[1]: Waiting for unfinished jobs.... make[1]: Leaving directory '/hab/cache/src/cockroach-v19.1.3/src/github.com/cockroachdb/cockroach' make: *** [Makefile:6: buildoss] Error 2 cockroach: Build time: 0m17s cockroach: Exiting on error
Have also tried downloading source and building from source. From source it clones other subprojects and builds. still facing same error:
Error:
GOPATH set to /root/go Cleaning old generated files.
Special case for 'prefix' variable, which is required by Homebrew.
GOPATH set to /root/go Cleaning old generated files. Detected change in build system. Rebooting Make.
Special case for 'prefix' variable, which is required by Homebrew.
GOPATH set to /root/go Cleaning old generated files. cd /root/go/src/github.com/cockroachdb/cockroach/c-deps/jemalloc && autoconf git submodule update --init --recursive go install -v ./pkg/cmd/prereqs installing githooks/commit-msg installing githooks/post-checkout installing githooks/post-merge go: cannot find main module, but found Gopkg.lock in /root/go/src/github.com/cockroachdb/cockroach to create a module there, run: go mod init installing githooks/post-rewrite installing githooks/prepare-commit-msg
make: [Makefile:1652: bin/prereqs] Error 1 make: Waiting for unfinished jobs.... mkdir -p bin touch bin/.submodules-initialized cockroach: Build time: 27m25s cockroach: Exiting on error