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

Can't load local_repository #25001

Open
jspkay opened this issue Jan 21, 2025 · 3 comments
Open

Can't load local_repository #25001

jspkay opened this issue Jan 21, 2025 · 3 comments
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug untriaged

Comments

@jspkay
Copy link

jspkay commented Jan 21, 2025

Description of the bug:

I'm working on tensorflow and I want to compile it using a customized version of XNNPACK.
To do so, I wanted ot load the external repository as a local one, as indicated in the documentation.

In brief, I cloned the XNNPACK repo in my laptop and I added the following line to the WORKSPACE:

load("@bazel_tools//tools/build_defs/repo:local.bzl", "local_repository")

Nevertheless, when I try to compile with bazel build, I have the following error message:

ERROR: error loading package '': cannot load '@bazel_tools//tools/build_defs/repo:local.bzl': no such file

I am a noob with bazel, and compilation in general... Sorry if the question is out of place. Do you have any suggestion?

Which category does this issue belong to?

Configurability

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

No response

Which operating system are you running Bazel on?

Debian 11

What is the output of bazel info release?

release 5.3.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

https://github.com/tensorflow/tensorflow.git
a3e2c692c18649329c4210cf8df2487d2028e267

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

I couldn't find anything anywhere, nor with a google search, nor on the issues of the repos.
I though it could be a version problem, but the docs don't say anything regarding it...

Any other information, logs, or outputs that you want to share?

No response

@github-actions github-actions bot added the team-Configurability platforms, toolchains, cquery, select(), config transitions label Jan 21, 2025
@fmeum
Copy link
Collaborator

fmeum commented Jan 21, 2025

Bazel 5.3.0 doesn't provide a Starlark implementation of local_repository yet. You can refer to it without a load in your WORKSPACE file. The docs page lacks the version indicator, which is definitely a bug.

@jspkay
Copy link
Author

jspkay commented Jan 21, 2025

I am sorry to ask this question... But how would I do that then ?
How do I refer to it in my WORKSPACE ?

I tried putting it in the dependencies of my target but it did not work.
I figured bazel need to know that that path contains another repository. Am I wrong?

@fmeum
Copy link
Collaborator

fmeum commented Jan 21, 2025

@meteorcloudy Do you know whether tensorflow supports being loaded as a dep in this way?

@meisterT meisterT added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. and removed team-Configurability platforms, toolchains, cquery, select(), config transitions labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug untriaged
Projects
None yet
Development

No branches or pull requests

6 participants