after setting these up, I tried compiling dgraphloader using
gox --ldflags '-extldflags "-static"' -os "linux"
it results in
Number of parallel builds: 1
--> linux/ppc64le: github.com/dgraph-io/dgraph/cmd/dgraphloader
--> linux/arm: github.com/dgraph-io/dgraph/cmd/dgraphloader
--> linux/386: github.com/dgraph-io/dgraph/cmd/dgraphloader
--> linux/amd64: github.com/dgraph-io/dgraph/cmd/dgraphloader
--> linux/arm64: github.com/dgraph-io/dgraph/cmd/dgraphloader
--> linux/ppc64: github.com/dgraph-io/dgraph/cmd/dgraphloader
5 errors occurred:
--> linux/ppc64le error: exit status 1
Stderr: ../../store/store.go:23:2: C source files not allowed when not using cgo or SWIG: gorocksdb.c
--> linux/arm error: exit status 1
Stderr: ../../store/store.go:23:2: C source files not allowed when not using cgo or SWIG: gorocksdb.c
--> linux/386 error: exit status 1
Stderr: ../../store/store.go:23:2: C source files not allowed when not using cgo or SWIG: gorocksdb.c
--> linux/arm64 error: exit status 1
Stderr: ../../store/store.go:23:2: C source files not allowed when not using cgo or SWIG: gorocksdb.c
--> linux/ppc64 error: exit status 1
Stderr: ../../store/store.go:23:2: C source files not allowed when not using cgo or SWIG: gorocksdb.c
it successfully builds the binary dgraphloader_linux_amd64
but gives error for other platforms. It is because of rocksDB, since it has only been installed for linux amd64. Any comments or suggestions on how to cross-compile static binaries for different platforms are welcome @everyone.