Error: this rule is missing dependency declarations for the following files included by

  1. Host PC (ubuntu 18.04): bazel build //apps/myapp, everything is working.

  2. deploy the same myapp to jetpack42, it will fail with following error:

ERROR: /home/nvidia/isaac/k-robot/packages/scout/scout_sdk/BUILD:13:1: Couldn’t build file packages/scout/scout_sdk/_objs/scout/scout_base.pic.o: undeclared inclusion(s) in rule ‘//packages/scout/scout_sdk:scout’:
this rule is missing dependency declarations for the following files included by ‘packages/scout/scout_sdk/src/scout_base.cpp’:
‘/usr/include/boost/config.hpp’
‘/usr/include/boost/config/user.hpp’
‘/usr/include/boost/config/detail/select_compiler_config.hpp’
‘/usr/include/boost/config/compiler/gcc.hpp’
‘/usr/include/boost/config/detail/select_stdlib_config.hpp’
‘/usr/include/boost/config/stdlib/libstdcpp3.hpp’
‘/usr/include/boost/config/detail/select_platform_config.hpp’
‘/usr/include/boost/config/platform/linux.hpp’
‘/usr/include/boost/config/detail/posix_features.hpp’
‘/usr/include/boost/config/detail/suffix.hpp’
‘/usr/include/boost/version.hpp’

Usually, this type of error means you are not including some dependency in the “deps” of your module/component.
Can you share your BUILD file? How are you including the boost library in your dependencies?

Also, in this case looks like in your host the boost library is a system lib locally installed under /usr/include/boost but that is probably not the case in Jetson.
Can you try using the boost library loaded within Isaac (loaded in the WORKSPACE folder)?
You should change your includes to

#include “boost/config.hpp”
#include “boost/config/user.hpp”

In your BUILD file add the required dependencies. Possibly something like:

deps=[
@boost//:config”
]

Let me know how it goes

after add the following includes in the CROSSTOOL.tpl file, it works.

cxx_builtin_include_directory: “/usr/include”