Comments (8)
Sorry.
Yes, this is a bug with rules_foreign_cc to not provide the default toolchain implementation.
I just added default toolchain in #213, with "linux" be assumed to be a os name to be passed to CMake. (I.e. that is what is recorded into CMake's crosstool file.
If the platform name should be different, it can be overridden with passing correct CMAKE_SYSTEM_NAME, but as we better try to pass the correct name, I will try to improve on that)
I will continue to check it with amd64/aarch64 later today in a Docker container. Are there more speicfic details to take into account?
Sorry again.
from rules_foreign_cc.
Thanks. I can confirm that if I modify the following Envoy will build on aarch64.
diff --git a/~/Library/rules_foreign_cc/tools/build_defs/shell_toolchain//toolchains/toolchain_mappings.bzl b/~/Library/envoyproxy/moderation/rules_foreign_cc/tools/build_defs/shell_toolchain/toolchains/toolchain_mappings.bzl
index af9647e..42fa81a 100644
--- a/~/Library/rules_foreign_cc/tools/build_defs/shell_toolchain//toolchains/toolchain_mappings.bzl
+++ b/~/Library/envoyproxy/moderation/rules_foreign_cc/tools/build_defs/shell_toolchain/toolchains/toolchain_mappings.bzl
@@ -11,7 +11,7 @@ TOOLCHAIN_MAPPINGS = [
_ToolchainMapping(
exec_compatible_with = [
"@bazel_tools//platforms:linux",
- "@bazel_tools//platforms:x86_64",
+ "@bazel_tools//platforms:aarch64",
],
file = "@rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains/impl:linux_commands.bzl",
),
I'll try using CMAKE_SYSTEM_NAME
. I did have a couple of tries at adding a new ToolchainMapping
section but ran into errors. So hopefully it won't be too hard to add aarch64
in addition to x86_64
. There are teams building Envoy for the IBM ppc64le
architecture as well so I expect there will be several architectures that need to be added.
from rules_foreign_cc.
I just provided the possibility to introduce custom ToolchainMappings: #214.
Please refer to example there.
I will make it now that CMAKE_SYSTEM_NAME comes from os_name() function, if it is not windows-linux-osx.
Currently I am experimenting with the amd64/alpine container, should I select some better variant?
from rules_foreign_cc.
I just tested the latest commit and it works on aarch64
. Thanks for the quick turnaround.
from rules_foreign_cc.
I will make it now that CMAKE_SYSTEM_NAME comes from os_name() function
Done in #215.
from rules_foreign_cc.
I just tested the latest commit and it works on aarch64. Thanks for the quick turnaround.
Cool, thank you!
from rules_foreign_cc.
Can I close the issue then?
from rules_foreign_cc.
Yes - thanks again for the quick turnaround.
from rules_foreign_cc.
Related Issues (20)
- Add a `setup_args` argument to the meson rule
- 'apple_cc_toolchain' is not defined in CI at Bazel@HEAD
- Error: apple_binary has to declare 'j2objc' as a required fragment in order to access it HOT 1
- EXT_BUILD_ROOT contains BUILD_TMPDIR will lead to an issue in configure_make rule HOT 2
- Generate granular Bazel targets using module extension HOT 2
- Feature Request: How can I add a include path of a deps library in rule cmake?
- add object files export
- [Bazel CI] Fix(build): Declare 'j2objc' as a required fragment for 'apple_binary' in 'rules_foreign_cc_examples_third_party//cares' HOT 5
- Redundant builds of dependencies due to shared objects in runfiles HOT 3
- Recent build broken on macos with xcode 15.3 HOT 2
- CMake build script always sets `CMAKE_RANLIB` to an empty string.
- no such package '@[unknown repo 'gettext_runtime' requested from @rules_foreign_cc HOT 1
- Copy the CMake export files if they exist in the install folder. [Feature Request] HOT 5
- How to get the output lib directory to set an environment variable
- could not be resolved: No repository visible as '@glib_dev' from repository '@@rules_foreign_cc~'
- pkg-config build broken on clang 15+ and gcc 14+ HOT 4
- [Bazel CI] [ IOException]no such package '@@glib//' error with Bazel@HEAD HOT 9
- [Bazel CI] Error name 'aar_import' is not defined with Bazel@HEAD HOT 1
- cmake copy wrong files to folder EXT_BUILD_DEPS
- Would it make sense to have a rule that exports a `cc_library()` into a UNIX-style lib/include directory? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_foreign_cc.