when I make dgraph with CGO_ENABLED=0,it failed as below
# github.com/dgraph-io/ristretto/z
../../ristretto/z/allocator.go:84:17: undefined: Calloc
../../ristretto/z/allocator.go:190:3: undefined: Free
../../ristretto/z/allocator.go:207:3: undefined: Free
../../ristretto/z/allocator.go:274:9: undefined: Calloc
../../ristretto/z/buffer.go:116:3: undefined: Free
../../ristretto/z/buffer.go:149:11: undefined: Calloc
../../ristretto/z/buffer.go:222:14: undefined: Calloc
../../ristretto/z/buffer.go:224:4: undefined: Free
../../ristretto/z/buffer.go:502:3: undefined: Free
Makefile:78: recipe for target 'dgraph' failed
actually, the ristretto/z/buffer.go has no problem;
i think it maybe casused by cgo, so i make dgraph with CGO_ENABLED=1,
this time, it works well; but when i copy the dgraph binary to docker container, it can’t work,
get faults:
sh: ./dgraph: not found
why?dgraph cannot compile with CGO_ENABLED=0? or i cannot use my own docker image, my docker image is alpine:3.11
Is there document about how to compile dgraph by self?i’m not found