Error while compiling Jetson Inference

Hi, I keep getting error while building the jetson inference from source on Jetson Nano.

[ 38%] Linking CXX shared library ../aarch64/lib/libjetson-utils.so
[ 38%] Built target jetson-utils
[ 39%] Building NVCC (Device) object CMakeFiles/jetson-inference.dir/c/jetson-inference_generated_superResNet.cu.o
<command-line>:0:7: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:7: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:7: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:7: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:7: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:7: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:7: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:7: warning: ISO C++11 requires whitespace after the macro name
[ 40%] Building NVCC (Device) object CMakeFiles/jetson-inference.dir/c/jetson-inference_generated_detectNet.cu.o
<command-line>:0:7: warning: ISO C++11 requires whitespace after the macro name
In file included from /home/jiunhao/jetson-inference/c/detectNet.h:27:0,
                 from /home/jiunhao/jetson-inference/c/detectNet.cu:23:
/home/jiunhao/jetson-inference/c/tensorNet.h:32:10: fatal error: jetson-utils/cudaUtility.h: No such file or directory
 #include <jetson-utils/cudaUtility.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMake Error at jetson-inference_generated_detectNet.cu.o.cmake:219 (message):
  Error generating
  /home/jiunhao/jetson-inference/build/CMakeFiles/jetson-inference.dir/c/./jetson-inference_generated_detectNet.cu.o

CMakeFiles/jetson-inference.dir/build.make:63: recipe for target 'CMakeFiles/jetson-inference.dir/c/jetson-inference_generated_detectNet.cu.o' failed
make[2]: *** [CMakeFiles/jetson-inference.dir/c/jetson-inference_generated_detectNet.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/jetson-inference.dir/all' failed
make[1]: *** [CMakeFiles/jetson-inference.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Re-flashed the image and still getting same error. Any idea how to resolve this?

same error here! not sure where it is coming from.

https://github.com/dusty-nv/jetson-inference/issues/355#issuecomment-510067050
Jetson Developer had just updated jetson-utils submodule. Try reclone the repo and build again.

git clone --recursive https://github.com/dusty-nv/jetson-inference

Should be fixed now, sorry about that - let me know if you still have problems building.

Thanks for the update. I’ve re-cloned the repo and successfully built Jetson Inference from source.

Hello, I keep this error :/

:/media/democar/3036-3738/Instaltion File/jetson-inference/build$ make
[  1%] Building NVCC (Device) object utils/CMakeFiles/jetson-utils.dir/cuda/jetson-utils_generated_cudaYUV-YV12.cu.o
/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(40): error: identifier "uint64_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(40): error: identifier "uint64_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(41): error: identifier "uint32_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(41): error: identifier "uint32_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(42): error: identifier "uint16_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(42): error: identifier "uint16_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(50): error: identifier "uint64_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(50): error: identifier "uint64_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(51): error: identifier "uint32_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(51): error: identifier "uint32_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(52): error: identifier "uint16_t" is undefined

/media/democar/3036-3738/Instaltion File/jetson-inference/build/aarch64/include/jetson-utils/endian.h(52): error: identifier "uint16_t" is undefined

12 errors detected in the compilation of "/tmp/tmpxft_00005af8_00000000-8_cudaYUV-YV12.compute_72.cpp1.ii".
CMake Error at jetson-utils_generated_cudaYUV-YV12.cu.o.cmake:279 (message):
  Error generating file /media/democar/3036-3738/Instaltion
  File/jetson-inference/build/utils/CMakeFiles/jetson-utils.dir/cuda/./jetson-utils_generated_cudaYUV-YV12.cu.o


utils/CMakeFiles/jetson-utils.dir/build.make:168: recipe for target 'utils/CMakeFiles/jetson-utils.dir/cuda/jetson-utils_generated_cudaYUV-YV12.cu.o' failed
make[2]: *** [utils/CMakeFiles/jetson-utils.dir/cuda/jetson-utils_generated_cudaYUV-YV12.cu.o] Error 1
CMakeFiles/Makefile2:713: recipe for target 'utils/CMakeFiles/jetson-utils.dir/all' failed
make[1]: *** [utils/CMakeFiles/jetson-utils.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Hi @zvonikmartincz, is your mounted drive formated as EXT3/EXT4 or is it NTFS/FAT? You should try EXT3/EXT4.

If you continue to have problems, you can try the pre-build container image for jetson-inference: