Crt/host_defines.h: No such file or directory

• Hardware Platform (Jetson / GPU) Orin
• DeepStream Version 7.0
**• JetPack Version (valid for Jetson only)**6.0+b106
• TensorRT Version8.6.2.3-1+cuda12.2
Following instructions to run this deepstream_parallel_inference_app, running build.sh

cd tritonclient/sample/
source build.sh

I have this errors.

make[1]: Entering directory '/opt/nvidia/deepstream/deepstream-7.0/sources/apps/sample_apps/deepstream_parallel_inference_app/tritonclient/sample/apps/deepstream-parallel-infer'
cc -c -o /opt/nvidia/deepstream/deepstream/sources/apps/apps-common/src/deepstream_sink_bin.o -DPLATFORM_TEGRA -g -I./ -I/opt/nvidia/deepstream/deepstream/sources/apps/apps-common/includes -I/opt/nvidia/deepstream/deepstream/sources/includes -I /usr/local/cuda/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/aarch64-linux-gnu -I/usr/include/json-glib-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include /opt/nvidia/deepstream/deepstream/sources/apps/apps-common/src/deepstream_sink_bin.c
In file included from /opt/nvidia/deepstream/deepstream/sources/apps/apps-common/src/deepstream_sink_bin.c:22:
/usr/local/cuda/include/cuda_runtime_api.h:148:10: fatal error: crt/host_defines.h: No such file or directory
  148 | #include "crt/host_defines.h"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:65: /opt/nvidia/deepstream/deepstream/sources/apps/apps-common/src/deepstream_sink_bin.o] Error 1
make[1]: Leaving directory '/opt/nvidia/deepstream/deepstream-7.0/sources/apps/sample_apps/deepstream_parallel_inference_app/tritonclient/sample/apps/deepstream-parallel-infer'
make: *** [Makefile:23: all] Error 2

Searching host_defines.h, sudo find / -name "host_defines.*" gave me
usr/local/cuda-12.2/targets/aarch64-linux/include/host_defines.h
So my system has no crt folder.
How to fix?

This is caused by Jetpack not being installed correctly. CUDA is missing some header files. If it is installed correctly, you should be able to find the following two files

/usr/local/cuda-12.2/targets/aarch64-linux/include/host_defines.h
/usr/local/cuda-12.2/targets/aarch64-linux/include/crt/host_defines.h

The header files under the crt directory are missing. Please re-burn Jetpack

Two times ald. I had no errors in installing jet pack using sdk manager

I did one more time installation of jetpack and crt folder is not there.
You can see screenshot in the folder

The problem is solved. crt folder is copied from my another ORIN device with same jetpack version.
Old ORIN device was installed with SDKManager before updated to JetPack 6.1 (rev1).
So update SDKManager to JetPack 6.1 (rev1) has bug to fix in SDKManager.
Even though I don’t use JetPack 6.1 (rev1), I have issue at Jetpack 6.0 (rev2)