Difficulties building istio/proxy

Hi,

I’m attempting to build a custom sidecar image, but so far I’ve been unable to build even a stock copy of istio/proxy. I’ve tried the following tags/branches, each errors out, often for differing reasons:

  • 1.5.4
  • release-1.5
  • release-1.6
  • master

I suspect my development environment, which I built from a stock Ubuntu Bionic image, and followed the sequence of dependency installation documented here: https://medium.com/@nadundesilva/building-istio-from-source-on-linux-be860d660aa7

Just to give a taste of my pain, here’s what I’m seeing on master:

root@af8fdf91d4e6:/usr/local/go/src/istio.io/proxy# make
Building with your local toolchain.
export PATH=/usr/lib/llvm-9/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/usr/local/llvm/bin:/root/go/bin CC=clang CXX=clang++ && bazel  build  --config=libc++ //...
...
ERROR: /root/.cache/bazel/_bazel_root/7addcad33983dcfc374c6f8f60774bde/external/envoy/source/extensions/filters/http/common/compressor/BUILD:11:1: C++ compilation of rule '@envoy//source/extensions/filters/http/common/compressor:compressor_lib' failed (Exit 1) clang failed: error executing command /usr/local/llvm/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer '-stdlib=libc++' -MD -MF ... (remaining 311 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
external/envoy/source/extensions/filters/http/common/compressor/compressor.cc:245:19: error: loop variable 'pair' of type 'const std::__1::pair<absl::string_view, float>' creates a copy from type 'const std::__1::pair<absl::string_view, float>' [-Werror,-Wrange-loop-construct]
  for (const auto pair : pairs) {
                         ^
external/envoy/source/extensions/filters/http/common/compressor/compressor.cc:245:8: note: use reference type 'const std::__1::pair<absl::string_view, float> &' to prevent copying
  for (const auto pair : pairs) {
       ^~~~~~~~~~~~~~~~~
                  &
1 error generated.

Any help getting unstuck would be greatly appreciated.

Thanks,
-Jon