Build type for production binaries

After building from source using the documented procedure, cockroach version gives output like the following:

Build Tag:    v1.0.2
Build Time:   2017/06/17 21:04:58
Distribution: OSS
Platform:     linux amd64
Go Version:   go1.8.3
C Compiler:   gcc 5.4.0
Build SHA-1:  9e3606bd2863ce7a460fd0c842414673d62f0533
Build Type:   development

I’m concerned that Build Type says development. Is this binary recommended for production? If not, what do I need to pass to make to build a binary optimized to run in production?

Our release binaries are built with this command

build/ make TYPE=release-linux-gnu

The resulting binary has only two differences from the development binary you built: it links against a very old version of glibc to be compatible with distributions as old as ~CentOS 5, rather than whatever glibc is installed on your system, and it has its debug symbols stripped. There should be no meaningful speed difference between the two.

Due to limitations in our build process, it’s not possible to build release binaries (TYPE=release-blah) outside of our Docker builder container (build/, but we’re working on it for 1.1.

1 Like