Unable to build hello ai jetson inference project on Jetson Nano

Hi
I am following this ( jetson-inference/building-repo-2.md at master · dusty-nv/jetson-inference · GitHub ) and trying to build the project. During the cmake ../ command, I am getting below errors:

rocket@ubuntu:~/jetson-inference/build$ cmake ../
-- The C compiler identification is unknown
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

	"/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

	Change Dir: /home/rocket/jetson-inference/build/CMakeFiles/CMakeTmp

	Run Build Command:"/usr/bin/make" "cmTC_0f436/fast"
	/usr/bin/make -f CMakeFiles/cmTC_0f436.dir/build.make CMakeFiles/cmTC_0f436.dir/build
	make[1]: Entering directory '/home/rocket/jetson-inference/build/CMakeFiles/CMakeTmp'
	Building C object CMakeFiles/cmTC_0f436.dir/testCCompiler.c.o
	/usr/bin/cc    -o CMakeFiles/cmTC_0f436.dir/testCCompiler.c.o   -c /home/rocket/jetson-inference/build/CMakeFiles/CMakeTmp/testCCompiler.c
	/home/rocket/jetson-inference/build/CMakeFiles/CMakeTmp/testCCompiler.c: In function ‘main’:
	/home/rocket/jetson-inference/build/CMakeFiles/CMakeTmp/testCCompiler.c:11:1: internal compiler error: Segmentation fault
	 { (void)argv; return argc-1;}
	 ^
	Please submit a full bug report,
	with preprocessed source if appropriate.
	See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
	CMakeFiles/cmTC_0f436.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_0f436.dir/testCCompiler.c.o' failed
	make[1]: *** [CMakeFiles/cmTC_0f436.dir/testCCompiler.c.o] Error 1
	make[1]: Leaving directory '/home/rocket/jetson-inference/build/CMakeFiles/CMakeTmp'
	Makefile:126: recipe for target 'cmTC_0f436/fast' failed
	make: *** [cmTC_0f436/fast] Error 2




  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
See also "/home/rocket/jetson-inference/build/CMakeFiles/CMakeOutput.log".
See also "/home/rocket/jetson-inference/build/CMakeFiles/CMakeError.log".

Attached are the CMakeOutput.log CMakeError.log
CMakeError.log (13.2 KB)
CMakeOutput.log (1.2 KB)

Just to give a quick background. I am using the waveshare jetson nano which comes with emmc. I have installed Jetpack 4.6.1 and SDK components using SDK manager and then I have copied all the root filesystem to external usb drive so my jetson is booting up from the usb drive. Everything seems to be working fine so I think this should not create any issue with jetson inference project. Please if anyone can help me resolve this issue. Thanks

Hi @ART97, I haven’t seen this error before and I wonder if it’s somehow related to the filesystem configuration you are using. Have you been able to build any other C programs? This wouldn’t seen an error with jetson-inference persay, but rather your GCC toolchain.

Hi dusty_nv

Let me try to see if I can run and build any C program and then will get back to you.

Thanks

It looks like the c ompiler was creating issue after moving the os from internal memory to external usb drive. I have now moved it from internal to external sd card and everything is fine.

Hi @ART97, ok great - glad that you were able to get it working again!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.