-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cc_toolchain_suite does not contain a toolchain for cpu 'k8' #2
Comments
Maybe try specifying the compiler too? bazel test --cpu=k8 --compiler=clang-6.0 //whatever:target See https://github.com/mjbots/rpi_bazel/blob/master/.bazelrc#L1 |
Thanks! That allowed it to start the build process at least, but I'm stumped again: now clang fails to compile a test program:
I can't seem to find any information about what determines the supported emulations for |
First: |
Apologies, I was thinking of a different repository w.r.t. the first point. The problem remains though that it looks like you were building with cmake/ninja, not bazel, and it was using the wrong linker. |
Hmm, so the error occurs after running |
Yep, that looks like envoy is not using bazel all throughout, but shells out to other build systems, which don't know about the bazel configured toolchain. For that, yep, you'll have to get everything else cross compiling properly using either their native build system, or by porting their build system to bazel. I've ported many things to bazel, (including zlib) at https://github.com/mjbots/bazel_deps https://github.com/mjbots/bazel_deps/tree/master/tools/workspace/zlib |
Ok, thanks for clearing that up for me. So if I were to successfully cross compile each of the dependencies that don't use bazel, then I'm assuming it would be fairly straightforward to configure the envoy build process to use my cross compiled binaries/libraries rather than trying to build them again using these scripts. I'm used to just writing application code, so this is all pretty foreign to me, but you've been a really big help so thanks again. |
It may be possible to configure envoy to use precompiled things, but is probably annoyingly difficult. I'm not familiar with envoy itself, but for some projects, the number of dependencies can be very large, and cross compiling for many things is a big project unto itself. I spent several months on the things ported to bazel_deps, and similarly projects like yocto have invested lots of development effort in making it happen. |
Good to know. Apparently someone has built envoy for for ARM solely using CMake, so I will try to follow in their footsteps to see if I can figure that out. |
I'm getting the following error when attempting to build envoy with rpi_bazel:
I verified that I could build envoy with bazel normally on my machine before attempting to cross compile for rpi. I'm guessing the error has something to do with the toolchain definitions in the BUILD or CROSSTOOL file in
tools/cc_toolchain
, but the error doesn't make much sense to me since in the CROSSTOOL file the default toolchain for k8 clearly points to the clang x86_64 toolchain. I will keep trying to figure it out, but any help would be appreciated.Some system info in case that's relevant:
Operating System: Linux Mint 19 Kernel: Linux 4.15.0-34-generic Architecture: x86-64
Bazel info:
The text was updated successfully, but these errors were encountered: