Fail to build label_image example using bazel on Jetson TX2

Hi,

I am trying to compile an example label_image which is used to recognize objects in images in C++.\

But the build fails.

I am getting the following error on TX2 :

’ with regcount of 92
nvlink error : entry function ‘_Z24ncclReduceKernel_max_u328ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z24ncclReduceKernel_max_f328ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z24ncclReduceKernel_max_u648ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z23ncclReduceKernel_max_u88ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z26ncclReduceLLKernel_max_i648ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z26ncclReduceLLKernel_max_f648ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z25ncclReduceLLKernel_max_i88ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z26ncclReduceLLKernel_max_i328ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z26ncclReduceLLKernel_max_f168ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z26ncclReduceLLKernel_max_u328ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z26ncclReduceLLKernel_max_f328ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z26ncclReduceLLKernel_max_u648ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
nvlink error : entry function ‘_Z25ncclReduceLLKernel_max_u88ncclColl’ with max regcount of 80 calls function ‘_Z27ncclReduceScatterLL_sum_f64P14CollectiveArgs’ with regcount of 92
INFO: Elapsed time: 304.214s, Critical Path: 67.11s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 487 processes: 487 local.
FAILED: Build did NOT complete successfully

Hi,

NCCL is not available on Jetson.
Please turn it off and recompile the package again.

bazel build --config=nonccl ...

Thanks.

Hi,

Thank you for the answer. I tried recompling the package again by turning the nccl off, it gave me the folloing error.

ERROR: /home/nvidia/Documents/tensorflow/tensorflow/cc/BUILD:477:1: Executing genrule //tensorflow/cc:candidate_sampling_ops_genrule failed (Exit 127)
bazel-out/host/bin/tensorflow/cc/ops/candidate_sampling_ops_gen_cc: symbol lookup error: bazel-out/host/bin/tensorflow/cc/ops/candidate_sampling_ops_gen_cc: undefined symbol: _ZN6google8protobuf8internal26fixed_address_empty_stringB5cxx11E
INFO: Elapsed time: 68.614s, Critical Path: 5.77s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 1 process: 1 local.
FAILED: Build did NOT complete successfully

Thanks.

Hi,

Here is a tutorial of building TensorFlow from source:
[url]https://devtalk.nvidia.com/default/topic/1055131/jetson-agx-xavier/building-tensorflow-1-13-on-jetson-xavier/[/url]

Please follow the steps and try it again.
Thanks.

Hi,

Thank you for the answer.
I was succesfully able to compile the code on Jetson TX2 with Jetpack 4.2
I created a swapfile and then recompiled the code and it worked!!!

Thanks.