Skip to content
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

error loading package 'bazel-rdx-code/external/bazel_tools/tools/android' #11606

Open
crorvick opened this issue Jun 17, 2020 · 9 comments
Open
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-Python Native rules for Python type: bug

Comments

@crorvick
Copy link

Description of the problem:

We recently upgraded from Bazel 0.23 to 3.2 and now occasionally run into the following error:

ERROR: error loading package 'bazel-rdx-code/external/bazel_tools/tools/android': Label '//tools/python:private/defs.bzl' is invalid because 'tools/python' is not a package; perhaps you meant to put the colon here: '//:tools/python/private/defs.bzl'?

We are using Bazel to build and test a C++ codebase along with supporting Python scripts.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

It is not 100% reproducible for us and I have no idea how to isolate the problem.

What operating system are you running Bazel on?

CentOS 7.5

What's the output of bazel info release?

release 3.2.0

Have you found anything relevant by searching the web?

Not really.

@crorvick
Copy link
Author

Also, reportedly restarting the build without cleaning the cache or other intervention does succeed.

@razeh
Copy link

razeh commented Jun 18, 2020

One other note: our ~/.cache directory is setup as a symbolic link to local storage.

@razeh
Copy link

razeh commented Jun 18, 2020

We are also seeing spurious errors on directory permissions for our toolset.
We use devtoolset8 to build, and we are occasionally seeing:
ERROR: /home/blah/bazel-code/external/devtoolset8/var/lib/stap-server (Permission denied)

Which is correct, because under external/devtoolset8:
var -> /opt/rh/devtoolset-8/root/var

And indeed, ordinary users do not have permission to read step-server:

drwxr-x--- 3 stap-server stap-server 4096 Nov 8 2018 bazel-code/external/devtoolset8/var/lib/stap-server//

@crorvick
Copy link
Author

Also worth noting: we are using --incompatible_merge_genfiles_directory=false because we have a dependency on the bazel-genfiles/ link that is not trivial to resolve.

@crorvick
Copy link
Author

Another transient error. This one looks particularly odd.

ERROR: <workspace path>/bazel-asdf/external/bazel_tools/tools/python/python_version.bzl:60:13: Traceback (most recent call last):
        File "<workspace path>/bazel-asdf/external/bazel_tools/tools/python/BUILD", line 102
                define_python_version_flag(<1 more arguments>)
        File "<workspace path>/bazel-asdf/external/bazel_tools/tools/python/python_version.bzl", line 60, in define_python_version_flag
                fail(<1 more arguments>)
define_python_version_flag() is private to @bazel_tools//tools/python
Loading: 254 packages loaded

@aiuto aiuto added team-Rules-Python Native rules for Python untriaged labels Jun 22, 2020
@omathias
Copy link

I am getting similar error when I am build a java project using bazel 3.2. I have updated the $TEST_TMPDIR env variable that changes the output root. Please advice

@limdor
Copy link
Contributor

limdor commented Aug 8, 2020

I have a similar issue with a quite simple example: https://github.com/limdor/bazel-examples/tree/dd9fb62aef08ff7db5757c6a6c9fbbc2b493f2a5/third_party_dependencies
In my case using bazel 3.4.1. Cleaning the cache made it worked. Because bazel version is not pinged, could be that the cache was build with a previous bazel version, I kept a copy of the old cache in case someone wants to investigate.
The part that I am a bit concern is that in my example there is not python at all, only c++. However I use http_archive and rules_cc, not sure if internally they use some python.

@lberki lberki added P3 We're not considering working on this, but happy to review a PR. (No assignee) P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) and removed untriaged P3 We're not considering working on this, but happy to review a PR. (No assignee) labels Nov 18, 2020
@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 2+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Apr 12, 2023
@crorvick
Copy link
Author

bump

@github-actions github-actions bot removed the stale Issues or PRs that are stale (no activity for 30 days) label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-Python Native rules for Python type: bug
Projects
None yet
Development

No branches or pull requests

6 participants