I build envoy on macos, the environment is
the macos is Mojave
the clang is
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I follow the step of the document ,but i got the error message
bazel build //source/exe:envoy-static --action_env=PATH="/usr/local/bin:/opt/local/bin:/usr/bin:/bin"
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/Users/gaoshunli/istio/envoy/tools/bazel.rc
INFO: Analysed target //source/exe:envoy-static (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_me/fc6a1d1d534a8bf28e7e8f49e9a412dc/external/envoy/bazel/BUILD:25:1: Executing genrule @envoy//bazel:raw_build_id failed (Exit 1) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
Target //source/exe:envoy-static failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.802s, Critical Path: 0.44s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
Can you give me some advice for build envoy, How can i fix the error?
I followed the steps documented here: https://github.com/envoyproxy/envoy/tree/master/bazel. And yes, I too have not been able to compile Envoy on my Mac (MacOS: 10.14.5) or Ubuntu (16.04). FYI, I am using bazel 0.26 on both OS.
Error on my Mac:

Error on my Ubuntu:

And here is the error that I tried running bazel build with the CI docker image:

I would really, _really_ like to compile Envoy using the source.
Any help would be much appreciated.
You'll need to checkout the source code from git, the build process depending on git version info and they are failing on that. Also for 1.10.0 you'll need bazel 0.22, which is baked into the docker image for building v1.10.0 so docker build should be fine.
You'll need to checkout the source code from git, the build process depending on git version info and they are failing on that.
Yup, thanks for that tip. That said, I was able to get around it by using the hack documented in Step 1
Also for 1.10.0 you'll need bazel 0.22, which is baked into the docker image for building v1.10.0 so docker build should be fine.
Ugh. Sure wish this was clearly called out in this document
I was finally able to make things work on my end. I have documented it all here: Envoy on Ubuntu Xenial and macOS Mojave: The Hard Way.
Hope this helps.
Anand
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.
Most helpful comment
Yup, thanks for that tip. That said, I was able to get around it by using the hack documented in Step 1
Ugh. Sure wish this was clearly called out in this document
I was finally able to make things work on my end. I have documented it all here: Envoy on Ubuntu Xenial and macOS Mojave: The Hard Way.
Hope this helps.
Anand