Building bazel yielded errors since commit cd9691d. The first commit fixes the build for older bazel versions, the second commit adds new versions and ports the patches to these versions.
cd9691d