unreal icon indicating copy to clipboard operation
unreal copied to clipboard

bazel failed to build, not visible from target

Open ahsteven opened this issue 7 years ago • 3 comments

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?

ahsteven avatar Feb 16 '18 21:02 ahsteven

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 avatar Feb 25 '18 06:02 kkhetarpal

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

kkhetarpal avatar Mar 01 '18 05:03 kkhetarpal

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

ahsteven avatar Mar 01 '18 12:03 ahsteven