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

bazel failed to build, not visible from target #21

Open
ahsteven opened this issue Feb 16, 2018 · 3 comments
Open

bazel failed to build, not visible from target #21

ahsteven opened this issue Feb 16, 2018 · 3 comments

Comments

@ahsteven
Copy link

I am new to bazel and am unabe to get it to build.

I added package(default_visibility = ["//visibility:public"]) to the bottom of the build file in the lab folder

I have tried building with the osmesa option as well as the glx option
Here is the output error when I run the command from the unreal folder.

teves@teves:~/RL_Codes/lab/unreal$ bazel run //unreal:train --define headless=glx
ERROR: /home/teves/RL_Codes/lab/unreal/BUILD:11:1: Target '//:deepmind_lab.so' is not visible from target '//unreal:train'. Check the visibility declaration of the former target if you think the dependency is legitimate
ERROR: Analysis of target '//unreal:train' failed; build aborted: Analysis of target '//unreal:train' failed; build aborted
INFO: Elapsed time: 0.593s
FAILED: Build did NOT complete successfully (0 packages loaded)
ERROR: Build failed. Not running target

I am in a conda environment.

What am I doing wrong?

@kkhetarpal
Copy link

kkhetarpal commented Feb 25, 2018

Any luck with this? I am using ubuntu and not in conda env and I get the same error:

ERROR: /home/lab/unreal/BUILD:11:1: Target '//:deepmind_lab.so' is not visible from target '//unreal:train'. Check the visibility declaration of the former target if you think the dependency is legitimate ERROR: Analysis of target '//unreal:train' failed; build aborted: Analysis of target '//unreal:train' failed; build aborted INFO: Elapsed time: 1.076s FAILED: Build did NOT complete successfully (1 packages loaded) ERROR: Build failed. Not running target

@kkhetarpal
Copy link

kkhetarpal commented Mar 1, 2018

Never mind, I fixed this issue by changing the visibility in lab/BUILD
underneath cc_binary(name = "deepmind_lab.so", .... visibility = ["//unreal:__subpackages__"])

apart from the //python/tests and //python/pip_package which was already there. This solved the target visibility issue. Hope this helps @ahsteven

@ahsteven
Copy link
Author

ahsteven commented Mar 1, 2018

Thanks for the help! I will try this. @kkhetarpal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants