The first obvious question would be what is your reason for compiling Sync Gateway from source? This isn’t supported, and you should really be running the binaries we release which have been extensively vetted by QE and performance tested before being released.
As noted on the Couchbase downloads page, the Enterprise Edition of Sync Gateway is available for free for the purposes of evaluation and testing on non-production environments.
It is available free of charge for unlimited pre-production development and testing
Generally speaking, the head of the release branch will be the commit that went GA, but it’s unlikely your build environment will be the same as ours, and you’ll end up with a binary which will be slightly different.