Bazel build fails inside docker

Hello guys.
I just started experimenting with Isaac SDK and I’m trying to run the examples inside a docker image.
the SDK builds successfully but when I try to run
bazel build //apps//samples//stereo_dummy
it fails with the following log

ERROR: infinite symlink expansion detected
[start of symlink chain]
/home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac
/home/username
[end of symlink chain]
ERROR: /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/toolchain/crosstool/BUILD:62:1: no such package '@com_nvidia_isaac//engine/build': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '@toolchain//crosstool:gcc_or_nvcc'
ERROR: /home/username/third_party/BUILD:13:1: error loading package '@cuda_x86_64//': Encountered error while reading extension file 'third_party/cuda.bzl': no such package '@com_nvidia_isaac//third_party': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//third_party:nppc'
ERROR: /home/username/third_party/BUILD:13:1: error loading package '@cuda_x86_64//': Encountered error while reading extension file 'third_party/cuda.bzl': no such package '@com_nvidia_isaac//third_party': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//third_party:nppitc'
ERROR: /home/username/third_party/BUILD:13:1: error loading package '@cuda_x86_64//': Encountered error while reading extension file 'third_party/cuda.bzl': no such package '@com_nvidia_isaac//third_party': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//third_party:npps'
ERROR: /home/username/third_party/BUILD:13:1: error loading package '@cuda_x86_64//': Encountered error while reading extension file 'third_party/cuda.bzl': no such package '@com_nvidia_isaac//third_party': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//third_party:nppial'
ERROR: /home/username/third_party/BUILD:13:1: error loading package '@cuda_x86_64//': Encountered error while reading extension file 'third_party/cuda.bzl': no such package '@com_nvidia_isaac//third_party': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//third_party:nppig'
ERROR: /home/username/third_party/BUILD:13:1: error loading package '@cuda_x86_64//': Encountered error while reading extension file 'third_party/cuda.bzl': no such package '@com_nvidia_isaac//third_party': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//third_party:nppif'
ERROR: /home/username/third_party/BUILD:13:1: error loading package '@cuda_x86_64//': Encountered error while reading extension file 'third_party/cuda.bzl': no such package '@com_nvidia_isaac//third_party': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//third_party:cudart'
ERROR: /home/username/third_party/BUILD:13:1: error loading package '@cuda_x86_64//': Encountered error while reading extension file 'third_party/cuda.bzl': no such package '@com_nvidia_isaac//third_party': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//third_party:nppidei'
ERROR: /home/username/engine/gems/image/BUILD:43:1: no such package '@com_nvidia_isaac//third_party': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//engine/gems/image:cuda_conversions'
ERROR: /home/username/engine/gems/image/BUILD:14:1: error loading package '@libjpeg//': Encountered error while reading extension file 'engine/build/template.bzl': no such package '@com_nvidia_isaac//engine/build': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//engine/gems/image:image'
ERROR: /home/username/third_party/BUILD:13:1: error loading package '@cuda_x86_64//': Encountered error while reading extension file 'third_party/cuda.bzl': no such package '@com_nvidia_isaac//third_party': Could not access /home/username/.cache/bazel/_bazel_username/799ab820b3e0be9b8066253adb007746/external/com_nvidia_isaac: Infinite symlink expansion and referenced by '//third_party:cuda'
WARNING: errors encountered while analyzing target '//apps/samples/stereo_dummy:stereo_dummy': it will not be built
INFO: Analysed target //apps/samples/stereo_dummy:stereo_dummy (0 packages loaded, 0 targets configured).
INFO: Found 0 targets...
ERROR: command succeeded, but there were loading phase errors
INFO: Elapsed time: 2.402s, Critical Path: 0.00s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 0 processes.
FAILED: Build did NOT complete successfully

I’m using Nvidia Cudagl as a base image for my docker.
what im doing wrong?

Hi egy.kid1,

First of all please verify that you are following the prerequisites listed here. If that is correct, please try to clean the bazel build cache by running the following command in Isaac SDK’s home folder

bazel clean

Also, check the path of the application that you are building. It should be

bazel build //apps/samples/stereo_dummy

More information on building and running an Isaac application can be found here. Hope this helps.

i’ve installed the skd in a non root user’s home folder and it’s now working.

1 Like