Comments (10)
(Edit: same setup worked fine on ubuntu. Seems to be a mac env related issue.)
Did a bit digging into this issue.
Environment:
OS: Mac OS Catalina 10.15.5
Bazel version 3.1.0
.bazelrc
and WORKSPACE
from current README.md @ HEAD (3245b6f)
Error occurred when trying to build bzl
(bazel build @dbx_build_tools//build_tools:bzl
):
ERROR: While resolving toolchains for target @dbx_build_tools//build_tools/py:check_conflicts: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.
Adding --toolchain_resolution_debug
to the build command gives more details:
INFO: ToolchainResolution: Toolchain constraint @platforms//os:os has value @platforms//os:ios, which does not match value @platforms//os:linux from the target platform @dbx_build_tools//build_tools/cc:linux-x64-drte-off
INFO: ToolchainResolution: Rejected toolchain @local_config_cc//:cc-compiler-watchos_x86_64, because of target platform mismatch
INFO: ToolchainResolution: No toolchains found
It seems that the error has something to do with execution platform. I commented out build --host_platform @dbx_build_tools//build_tools/cc:linux-x64-drte-off
line in .bazelrc
file and this time it gave a different error:
ERROR: .../dbx_build_tools/build_tools/BUILD:68:1: in dbx_py_binary rule @dbx_build_tools//build_tools:bzl:
Traceback (most recent call last):
File ".../dbx_build_tools/build_tools/BUILD", line 68
dbx_py_binary(name = 'bzl')
File ".../dbx_build_tools/build_tools/py/py.bzl", line 610, in _dbx_py_binary_impl
dbx_py_binary_base_impl(ctx, <1 more arguments>)
File ".../dbx_build_tools/build_tools/py/py.bzl", line 659, in dbx_py_binary_base_impl
emit_py_binary(ctx, main = main, <10 more arguments>)
File ".../dbx_build_tools/build_tools/py/common.bzl", line 416, in emit_py_binary
conflict_args.add_all(<2 more arguments>)
map_each must be a function that accepts a single positional argument
from dbx_build_tools.
I think part of the problem could be the README.md pinning a version from Dec 11 but was updated to use python38. What version of dbx_build_tools and bazel are you using?
from dbx_build_tools.
I was following the README here https://github.com/dropbox/dbx_build_tools/blob/master/README.md
I tried both latest Bazel (3.5.1) and 1.1.0, both returned similar errors.
from dbx_build_tools.
Can you give this WORKSPACE a try? If it works I will make sure to update the README.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "dbx_build_tools",
urls = ["https://github.com/dropbox/dbx_build_tools/archive/master.tar.gz"],
strip_prefix = "dbx_build_tools-master",
)
load('@dbx_build_tools//build_tools/bazel:external_workspace.bzl', 'drte_deps')
drte_deps()
register_toolchains(
"@dbx_build_tools//thirdparty/cpython:drte-off-27-toolchain",
"@dbx_build_tools//thirdparty/cpython:drte-off-38-toolchain",
)
from dbx_build_tools.
No luck :( still hitting the first error I mentioned above. Tried on both Bazel 1.1.0 and 3.5.1. Guess I'll just input my issue to bazelbuild/bazel#10134. Thanks for looking though!
from dbx_build_tools.
I think we would have to know all the Bazel options in play to debug this.
from dbx_build_tools.
I switched to a different environment (with Bazel 1.1.0) and with @armooo 's suggested WORKSPACE it now emits a different error:
ERROR: .../dbx_build_tools/build_tools/bzl_lib/itest/BUILD:27:1: in dbx_sh_binary rule @dbx_build_tools//build_tools/bzl_lib/itest:bzl-itest-init:
Traceback (most recent call last):
File ".../dbx_build_tools/build_tools/bzl_lib/itest/BUILD", line 27
dbx_sh_binary(name = 'bzl-itest-init')
File ".../dbx_build_tools/build_tools/sh/sh.bzl", line 9, in dbx_sh_binary_impl
write_runfiles_tmpl(ctx, <2 more arguments>)
File ".../dbx_build_tools/build_tools/bazel/runfiles.bzl", line 50, in write_runfiles_tmpl
is_windows(ctx)
File ".../dbx_build_tools/build_tools/windows/windows.bzl", line 2, in is_windows
ctx.target_platform_has_constraint(<1 more arguments>)
File ".../dbx_build_tools/build_tools/windows/windows.bzl", line 2, in ctx.target_platform_has_constraint
platform_common.ConstraintValueInfo
object of type 'platform_common' has no field 'ConstraintValueInfo'
ERROR: Analysis of target '@dbx_build_tools//build_tools:bzl' failed; build aborted: Analysis of target '@dbx_build_tools//build_tools/bzl_lib/itest:bzl-itest-init' failed; build aborted
For last week's experiment I was basically trying with a fresh Bazel (3.5.1) installation from brew
. Not sure what other Bazel options you might need to debug this issue.
from dbx_build_tools.
1.1.0 is really old and definitely will not work.
from dbx_build_tools.
I should have mentioned earlier that various things like our CPython are Linux-specific today. So, even if this immediate toolchain problem is overcome, there will be more failures.
from dbx_build_tools.
Thanks, yes I've since switched to a Ubuntu image running in a containerized env and it works fine now.
I did run into an issue though with latest master head, I've attached details in #11.
from dbx_build_tools.
Related Issues (20)
- map_each must be a function that accepts a single positional argument HOT 1
- Building python for aarch64 / ppc64le HOT 2
- Question: Using dbx_service_task to generate data for dbx_services_test HOT 2
- How to get boto3 modules in dbx_py_pytest_test HOT 3
- Question: Support for macOS? HOT 3
- action_env not propagated to pypi build actions
- Rationale for not propagating -shared HOT 5
- Support test_suite for dbx_services_test HOT 6
- A need for more Documentation HOT 12
- Tagged versions HOT 3
- Hermeticity bug: Package setup can find host libraries (leading to import failures) HOT 6
- Go builds fail on filesystems that require UTF-8 filenames HOT 1
- using dbx_build_tools with Docker HOT 1
- How do I build a distribution archive (archive/master.tar.gz)? HOT 1
- Error downloading [http://zlib.net/zlib-1.2.11.tar.gz]
- Is this still active? HOT 1
- Can you please open-source the svcctl protos?
- mypy bazel rules appear to be missing some dependencies HOT 1
- openssl download url breaks when new version is released HOT 2
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 dbx_build_tools.