Nsight with CUDA 10.0 (NVIDIA DRIVE™ Software 9.0 (Linux)) building issue

Hello NVIDIA Developers,

I am having issues with setting up Nsight with CUDA 10.0 (NVIDIA DRIVE™ Software 9.0 (Linux)).

DRIVE software on the target (target being the DRIVE hardware kit with two Xavier processors and all of the cameras etc.) is set up properly. I know this because all of the samples run correctly. I can verify that because I have monitors and keyboard connected to the Drive itself and can successful run the sample_lane_detection example on the DRIVE.

Now I am trying to build a solution on my host and have encountered issues. Below I wrote out all of my deviations from the official tutorial I have followed, which is https://developer.nvidia.com/drive/learn/tutorial-NsightEclipse

Opening note: I always run nsight with “sudo nsight”

  1. I have multiple versions of nsight on my host - One version I installed via “sudo apt install nsight” and under “Project type” it displays only “Makefile Project >> Empty project” and under “Toolchains” it only displays “-- Other Toolchain --”

However, if I go to “/usr/local/cuda/bin” and run nsight with “sudo ./nsight” I get all of the project options as displayed in the image in https://developer.nvidia.com/drive/learn/tutorial-NsightEclipse; only my Toolchain is “CUDA Toolkit 10.0” instead of “CUDA Toolkit 9.2”.

  1. When creating a project, I can’t click “Finish” right after I type in the “Project name” and choose a location which is “/home//samples-nsight”. I have to click “Next”, where “Whole program compilation” is selected, where “Generate PTX code:” is set to “3.5” and “Generate GPU code:” is set to “3.5” and then and only then I can press “Back” and click “Finish”.

  2. I setup my project to find “CMakeLists.txt” in accordance to the response of Hao Tsui here: https://devtalk.nvidia.com/default/topic/1056999/general/nsight-eclipse-version-10-compiling-and-build-issues/ (Right click on my project >> Properties >> C/C++ GEneral >> Paths and Symbols >> Source Location and setting it to /TestProject/samples and deleted the default entry (TestProject is my projects name))

  3. I replace the line that begins with “set” in “CMakeLists.txt” (line 68 in my case) with “set(SAMPLES framework;dnn;laneDetection)”. I don’t replace line 64, as this is not the line that contains the “set” command.

  4. I assume that by “LaneNet” you mean any project name; I treated it as such and changed my project properties. My project name is “TestProject”.

Some other differences: My CUDA toolkit is 10.0, as I already noted and I installed the NVIDIA DRIVE™ Software 9.0 via the NVIDIA SDK Manager. I was informed that this Linux PC already contained NVIDIA DRIVE™ Software 8.0. For reference, I have GeForce 940MX on my host, which should be CUDA compatible.

Errors after the setup:

I get these errors when I have “set(SAMPLES framework;dnn;laneDetection)” in my “CMakeLists.txt” and try to build my project. From what I can gather, Cmake has trouble locating a resource.

Description	Resource	Path	Location	Type
make: *** [all] Error 2	TestProject		 	C/C++ Problem
make[1]: *** [src/dnn/sample_object_detector_tracker/CMakeFiles/sample_object_detector_tracker.dir/all] Error 2	TestProject		 	C/C++ Problem
make[2]: *** [src/dnn/sample_object_detector_tracker/sample_object_detector_tracker] Error 1	TestProject		 	C/C++ Problem
recipe for target 'all' failed	Makefile	/TestProject/build-host	line 127	C/C++ Problem
recipe for target 'src/dnn/sample_object_detector_tracker/CMakeFiles/sample_object_detector_tracker.dir/all' failed	Makefile2	/TestProject/build-host/CMakeFiles	line 467	C/C++ Problem
recipe for target 'src/dnn/sample_object_detector_tracker/sample_object_detector_tracker' failed	build.make	/TestProject/build-host/src/dnn/sample_object_detector_tracker/CMakeFiles/sample_object_detector_tracker.dir	line 111	C/C++ Problem

with these Warnings:

Description	Resource	Path	Location	Type
libcuda.so.1, needed by /usr/local/driveworks-2.0/targets/x86_64-Linux/lib/libdriveworks.so, not found (try using -rpath or -rpath-link)	TestProject		 	C/C++ Problem
libnvcuvid.so.1, needed by /usr/local/driveworks-2.0/targets/x86_64-Linux/lib/libdriveworks.so, not found (try using -rpath or -rpath-link)	TestProject		 	C/C++ Problem

Warnings are expected, because I am building on my host and can’t run CUDA code on it, but I should be able to build on my host. In nsight, when I navigate (in the Project explorer) to the line which caused the bug, it is the line in “build.make” located in “TestProject >> build-host >> src >> dnn >>> sample_object_detector_tracker >> CMakeFiles >> sample_object_detector_tracker.dir”. The error is on line 111, more specifically in:

@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/mislav.juric/samples-nsight/build-host/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable sample_object_detector_tracker"

It says: “recipie for target src/dnn/sample_object_detector_tracker/sample_object_detector_tracker failed”.

An error is also showing in the “Makefile” of the “build-host” folder. It is related to the following lines of code:

# The main all target
all: cmake_check_build_system
	$(CMAKE_COMMAND) -E cmake_progress_start /home/mislav.juric/samples-nsight/build-host/CMakeFiles /home/mislav.juric/samples-nsight/build-host/CMakeFiles/progress.marks
	$(MAKE) -f CMakeFiles/Makefile2 all
	$(CMAKE_COMMAND) -E cmake_progress_start /home/mislav.juric/samples-nsight/build-host/CMakeFiles 0
.PHONY : all

Specifically to the “$(CMAKE_COMMAND) -E cmake_progress_start /home/mislav.juric/samples-nsight/build-host/CMakeFiles /home/mislav.juric/samples-nsight/build-host/CMakeFiles/progress.marks”

I also have another error in “build-host/CMakeFiles/Makefile2” which says on line 467, which says:

$(MAKE) -f src/dnn/sample_object_detector_tracker/CMakeFiles/sample_object_detector_tracker.dir/build.make src/dnn/sample_object_detector_tracker/CMakeFiles/sample_object_detector_tracker.dir/depend

Here is what is interesting - when I build the project with just “set(SAMPLES framework)” it builds without errors. As a side note, I always clean my project between two successive builds with " >> Clean Project".

When I put “set(SAMPLES framework; laneDetection)” it gives me the following errors:

Description	Resource	Path	Location	Type
make: *** [all] Error 2	TestProject		 	C/C++ Problem
make[1]: *** [src/laneDetection/CMakeFiles/sample_lane_detection.dir/all] Error 2	TestProject		 	C/C++ Problem
make[2]: *** [src/laneDetection/sample_lane_detection] Error 1	TestProject		 	C/C++ Problem
recipe for target 'all' failed	Makefile	/TestProject/build-host	line 83	C/C++ Problem
recipe for target 'src/laneDetection/CMakeFiles/sample_lane_detection.dir/all' failed	Makefile2	/TestProject/build-host/CMakeFiles	line 446	C/C++ Problem
recipe for target 'src/laneDetection/sample_lane_detection' failed	build.make	/TestProject/build-host/src/laneDetection/CMakeFiles/sample_lane_detection.dir	line 111	C/C++ Problem

and the following warnings:

Description	Resource	Path	Location	Type
libcuda.so.1, needed by /usr/local/driveworks-2.0/targets/x86_64-Linux/lib/libdriveworks.so, not found (try using -rpath or -rpath-link)	TestProject		 	C/C++ Problem
libnvcuvid.so.1, needed by /usr/local/driveworks-2.0/targets/x86_64-Linux/lib/libdriveworks.so, not found (try using -rpath or -rpath-link)	TestProject		 	C/C++ Problem

It seems as though anything other than framework sample doesn’t build normally.

I have two questions:

  1. Before I started working with Nvidia Drive and Nvidia SDK, another programmer was working on the same Linux PC I have been working. As I noted, I have two nsight versions on my host. I have updated from Drive Software 8.0 to Drive Software 9.0 and according to the Quick Start Guide that upgrade option should be supported. Should I delete everything related to Nvidia SDK and re-install it again? I don’t think it is necessary, since when I run nsight with “sudo ./nsight” from “/usr/local/cuda/bin” I have all the “correct” options displayed. If your suggestion was to delete everything due to possible multiple versions of nsight (and maybe other things) and start from scratch, please do be detailed in your explanation on how to go about it to make sure everything is properly deleted. As I stated, I am using Linux, Ubuntu Ubuntu 16.04.4 LTS.

  2. Why are the CMake errors occuring? My guess is that it is a linking issue… But I don’t understand how can I successfuly build “framework” and not anything else beside it… Are those issues related to my development environment setup or are those CMake file issues? Could I solve these issues by modifying the CMake files myself? Modifying your CMake files seems tedious and error-prone; maybe I am better off re-setuping my environment.

Thank you in advance,
Mislav

1 Like

Update:

I am able to successfully compile both for the host and for cross-compiling (from these respective guides: https://developer.nvidia.com/drive/learn/tutorial-hostcompilation and https://developer.nvidia.com/drive/learn/tutorial-xcompilation).

I tried manually running cmake after the step where I run the following commands in the NSight IDE setup tutorial:

mkdir /home/<user>/samples-nsight
cd /usr/local/driveworks
cp –r /usr/local/driveworks/samples /home/<user>/samples-nsight
cp –r /usr/local/driveworks/data /home/<user>/samples-nsight
export PATH=$PATH:/usr/local/cuda-<version>/bin

and I change the CMakeLists.txt file so that the “set” line contains the following:

set(SAMPLES framework;dnn;laneDetection)

Here I encounter the same issue - I get errors about sample_lane_detection.dir.

I tried to compile the Host compilation example with first putting

export PATH=$PATH:/usr/local/cuda-<version>/bin

in my command line before I start following the tutorial and it doesn’t make any difference.

Since cmake warns me about not being able to find libcuda.so.1, I thought that maybe I have to put the path to my CUDA 10 folder in my ~/.profile file, especially because some other users (https://devtalk.nvidia.com/default/topic/1046930/driveworks/host-compilation-error/ and https://devtalk.nvidia.com/default/topic/1037717/driveworks/-resolved-error-during-manual-compilation-of-driveworks-samples-on-host-pc-/1) seemed to have issues with the PATH variable.

I have thus configured my PATH variable. Now when I run the command:

nvcc --version

without previously explicitly setting the PATH variable to contain the CUDA folder in my current terminal window, I get:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sun_Sep_30_21:07:36_CDT_2018
Cuda compilation tools, release 10.0, V10.0.166

I also tried running:

cmake -D CUDA_TOOLKIT_ROOT_DIR=../../../../../../usr/local/cuda-10.0 .

instead of running:

cmake .

in my the folder that contains all the samples. No effect. The reason why there are so many "…/"s is because CMake seems to be looking for the CUDA_TOOLKIT_ROOT_DIR from the current directory, so I have to go “up” a few times.

I also have to report that if I run make -n right after cmake I get the following output log:

/usr/bin/cmake -H/home/mislav.juric/samples-nsight2/samples -B/home/mislav.juric/samples-nsight2/samples --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/mislav.juric/samples-nsight2/samples/CMakeFiles /home/mislav.juric/samples-nsight2/samples/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make -f CMakeFiles/update_cuda_deps.dir/build.make CMakeFiles/update_cuda_deps.dir/depend
cd /home/mislav.juric/samples-nsight2/samples && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/mislav.juric/samples-nsight2/samples /home/mislav.juric/samples-nsight2/samples /home/mislav.juric/samples-nsight2/samples /home/mislav.juric/samples-nsight2/samples /home/mislav.juric/samples-nsight2/samples/CMakeFiles/update_cuda_deps.dir/DependInfo.cmake --color=
make -f CMakeFiles/update_cuda_deps.dir/build.make CMakeFiles/update_cuda_deps.dir/build
/usr/bin/cmake -E cmake_echo_color --switch= --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num= "Built target update_cuda_deps"
make -f 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/build.make 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/depend
cd /home/mislav.juric/samples-nsight2/samples && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/mislav.juric/samples-nsight2/samples /home/mislav.juric/samples-nsight2/samples/3rdparty/src/lodepng /home/mislav.juric/samples-nsight2/samples /home/mislav.juric/samples-nsight2/samples/3rdparty/src/lodepng /home/mislav.juric/samples-nsight2/samples/3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/DependInfo.cmake --color=
make -f 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/build.make 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/build
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=21 "Building CXX object 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/src/lodepng.cpp.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/lodepng && /usr/bin/c++   -DLINUX -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/lodepng/include  -gsplit-dwarf -Wall -Wunused -Wunused-value -Wunused-parameter -Werror -O3 -DNDEBUG -fPIC   -std=gnu++14 -o CMakeFiles/lodepng-src.dir/src/lodepng.cpp.o -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/lodepng/src/lodepng.cpp
/usr/bin/cmake -E cmake_echo_color --switch= --green --bold --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=22 "Linking CXX static library liblodepng-src.a"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/lodepng && /usr/bin/cmake -P CMakeFiles/lodepng-src.dir/cmake_clean_target.cmake
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/lodepng && /usr/bin/cmake -E cmake_link_script CMakeFiles/lodepng-src.dir/link.txt --verbose=
/usr/bin/cmake -E cmake_echo_color --switch= --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=21,22 "Built target lodepng-src"
make -f 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/build.make 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/depend
cd /home/mislav.juric/samples-nsight2/samples && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/mislav.juric/samples-nsight2/samples /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw /home/mislav.juric/samples-nsight2/samples /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/DependInfo.cmake --color=
make -f 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/build.make 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/build
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=6 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/context.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/context.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/context.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=7 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/init.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/init.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/init.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=8 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/input.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/input.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/input.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=9 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/monitor.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/monitor.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/monitor.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=10 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/vulkan.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/vulkan.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/vulkan.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=11 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/window.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/window.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/window.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=12 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_init.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_init.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11_init.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=13 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_monitor.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_monitor.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11_monitor.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=14 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_window.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_window.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11_window.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=15 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/xkb_unicode.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/xkb_unicode.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/xkb_unicode.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=16 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/linux_joystick.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/linux_joystick.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/linux_joystick.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=17 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/posix_time.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/posix_time.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/posix_time.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=18 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/posix_tls.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/posix_tls.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/posix_tls.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=19 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/glx_context.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/glx_context.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/glx_context.c
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=20 "Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/egl_context.c.o"
cd /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw && /usr/bin/cc  -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda-10.0/include -I/home/mislav.juric/samples-nsight2/samples/configured -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/../include -I/home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/x11  -gsplit-dwarf -O3 -DNDEBUG -fPIC   -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/egl_context.c.o   -c /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/3.2-screen/src/egl_context.c
/usr/bin/cmake -E cmake_echo_color --switch= --progress-dir=/home/mislav.juric/samples-nsight2/samples/CMakeFiles --progress-num=6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 "Built target glfw-x11"
make -f 3rdparty/src/glfw/CMakeFiles/glfw-src.dir/build.make 3rdparty/src/glfw/CMakeFiles/glfw-src.dir/depend
cd /home/mislav.juric/samples-nsight2/samples && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/mislav.juric/samples-nsight2/samples /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw /home/mislav.juric/samples-nsight2/samples /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw /home/mislav.juric/samples-nsight2/samples/3rdparty/src/glfw/CMakeFiles/glfw-src.dir/DependInfo.cmake --color=
make -f 3rdparty/src/glfw/CMakeFiles/glfw-src.dir/build.make 3rdparty/src/glfw/CMakeFiles/glfw-src.dir/build
make[2]: *** No rule to make target '3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/context.c.o', needed by '3rdparty/src/glfw/libglfw-src.a'.  Stop.
CMakeFiles/Makefile2:181: recipe for target '3rdparty/src/glfw/CMakeFiles/glfw-src.dir/all' failed
make[1]: *** [3rdparty/src/glfw/CMakeFiles/glfw-src.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

In literally every project (no matter if it the Host Compilation project from above, or if it is the samples (NSight tutorial) project), make -n always complains about context.c.o. The only difference is that the Host compilation and Cross-compilation successfully build, as well as the NSight projects with just the framework, as I stated in my first post in this topic, if I run make -j even with the presence of these make -n error messages. However, other projects don’t build successfully - first make -j fails, then make install fails with the error messages I detailed in my first post.

So basically every time there is sample_object_detector_tracker involved (or anything else besides framework) I can’t build the project, either for my host or for cross-compilation.

Any insight into why this is happening?

Update 2:

What I have done is installed the nvidia-361-dev and copied libcuda.so.1 from:

/usr/lib/x86_64-linux-gnu/

to these three locations:

/usr/local/cuda/lib64/
/usr/local/cuda/libnsight/
/usr/local/cuda/libnvvp/

I have also copied libnvcuvid.so.1 from

/usr/lib/nvidia-361/

to the same three locations listed above. Now I get the following output when I try to build my project (either build on my host or cross-compile):

[  0%] Built target update_cuda_deps
[  2%] Building C object 3rdparty/src/glew/CMakeFiles/glew-src.dir/src/glew.c.o
[  4%] Building CXX object 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/src/lodepng.cpp.o
[  6%] Building CXX object src/framework/CMakeFiles/samples_allocator.dir/Allocator.cpp.o
[  8%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/linux_joystick.c.o
[ 10%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/glx_context.c.o
[ 23%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/xkb_unicode.c.o
[ 13%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/window.c.o
[ 15%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/context.c.o
[ 17%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_monitor.c.o
[ 19%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_window.c.o
[ 21%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/monitor.c.o
[ 32%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/posix_tls.c.o
[ 26%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/init.c.o
[ 28%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_init.c.o
[ 32%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/vulkan.c.o
[ 34%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/input.c.o
[ 36%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/posix_time.c.o
[ 39%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/egl_context.c.o
[ 41%] Linking CXX static library libsamples_allocator.a
[ 41%] Built target samples_allocator
[ 41%] Built target glfw-x11
[ 43%] Linking C static library libglfw-src.a
[ 43%] Built target glfw-src
[ 45%] Linking CXX static library liblodepng-src.a
[ 45%] Built target lodepng-src
[ 47%] Linking C static library libglew-src.a
[ 47%] Built target glew-src
[ 50%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/DriveWorksSample.cpp.o
[ 52%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/Window.cpp.o
[ 54%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/MouseView3D.cpp.o
[ 56%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/MathUtils.cpp.o
[ 58%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/ScreenshotHelper.cpp.o
[ 65%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/Grid.cpp.o
[ 60%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/ProgramArguments.cpp.o
[ 71%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/Log.cpp.o
[ 73%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/SimpleRenderer.cpp.o
[ 63%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/WindowGLFW.cpp.o
[ 67%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/SimpleRecordingPlayer.cpp.o
[ 69%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/SampleFramework.cpp.o
[ 76%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/SimpleCamera.cpp.o
[ 78%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/ProfilerCUDA.cpp.o
[ 80%] Building CXX object src/framework/CMakeFiles/samples_framework.dir/RenderUtils.cpp.o
[ 82%] Linking CXX static library libsamples_framework.a
[ 82%] Built target samples_framework
[ 86%] Building CXX object src/dnn/sample_dnn_plugin/CMakeFiles/dnn_fc_layer_plugin.dir/FCLayer.cpp.o
[ 86%] Building CXX object src/laneDetection/CMakeFiles/sample_lane_detection.dir/main.cpp.o
[ 89%] Building CXX object src/dnn/sample_object_detector_tracker/CMakeFiles/sample_object_detector_tracker.dir/main.cpp.o
[ 91%] Linking CXX shared library libdnn_fc_layer_plugin.so
[ 91%] Built target dnn_fc_layer_plugin
[ 93%] Building CXX object src/dnn/sample_dnn_plugin/CMakeFiles/sample_dnn_plugin.dir/main.cpp.o
[ 95%] Linking CXX executable sample_lane_detection
/usr/local/driveworks-2.0/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to `cuvidGetDecoderCaps'
collect2: error: ld returned 1 exit status
src/laneDetection/CMakeFiles/sample_lane_detection.dir/build.make:111: recipe for target 'src/laneDetection/sample_lane_detection' failed
make[2]: *** [src/laneDetection/sample_lane_detection] Error 1
CMakeFiles/Makefile2:628: recipe for target 'src/laneDetection/CMakeFiles/sample_lane_detection.dir/all' failed
make[1]: *** [src/laneDetection/CMakeFiles/sample_lane_detection.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 97%] Linking CXX executable sample_dnn_plugin
/usr/local/driveworks-2.0/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to `cuvidGetDecoderCaps'
collect2: error: ld returned 1 exit status
src/dnn/sample_dnn_plugin/CMakeFiles/sample_dnn_plugin.dir/build.make:111: recipe for target 'src/dnn/sample_dnn_plugin/sample_dnn_plugin' failed
make[2]: *** [src/dnn/sample_dnn_plugin/sample_dnn_plugin] Error 1
CMakeFiles/Makefile2:569: recipe for target 'src/dnn/sample_dnn_plugin/CMakeFiles/sample_dnn_plugin.dir/all' failed
make[1]: *** [src/dnn/sample_dnn_plugin/CMakeFiles/sample_dnn_plugin.dir/all] Error 2
[100%] Linking CXX executable sample_object_detector_tracker
/usr/local/driveworks-2.0/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to `cuvidGetDecoderCaps'
collect2: error: ld returned 1 exit status
src/dnn/sample_object_detector_tracker/CMakeFiles/sample_object_detector_tracker.dir/build.make:111: recipe for target 'src/dnn/sample_object_detector_tracker/sample_object_detector_tracker' failed
make[2]: *** [src/dnn/sample_object_detector_tracker/sample_object_detector_tracker] Error 1
CMakeFiles/Makefile2:467: recipe for target 'src/dnn/sample_object_detector_tracker/CMakeFiles/sample_object_detector_tracker.dir/all' failed
make[1]: *** [src/dnn/sample_object_detector_tracker/CMakeFiles/sample_object_detector_tracker.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Now it is complaining about

undefined reference to `cuvidGetDecoderCaps'

.

Any insight into what is going on here?

Thank you in advance,
Mislav

Update 3:

I think that the issue lies with the graphic card drivers or CUDA libraries. I have GeForce 940MX on my host computer and am not sure if CUDA 10.0 is compatible with this graphics card.

Hi Mislav,

  1. Please do NOT USE Nsight anymore, this is going to be deprecated. Instead use the NSight Plugin with the newest Eclipse.
    You do find more information here: /usr/local/cuda/doc/pdf

  2. GeForce 940MX is a Maxwell architecture one. You should use at least Pascal, we suggest Turing.

  3. We have seen issues with remote debugging in DRIVE SW 9.0, I am still working on that and will come back on that another time.

  4. When using Eclipse you need to use the CMAKE plugin from the Marketplace, else you run into various errors.

At this point I would suggest a call on Monday/Tuesday so that I can share you my screen to enable you asap - what do you think?

Best regards,
Fabian

Hello Fabian,

thank you for responding. Unfortunately, I was on vacation in the time of your response. I will setup the development environment anew on a new host machine which I will get.

If I encounter any further issues, I will take you up on the call offer.

Thank you in advance,
Mislav

Hi Mislav,

For sure, please let me know if you encounter any issues.

Fabian

Hi James22,

Yes remote debugging should work in Drive SW 10.0. Please check our learning page here: https://developer.nvidia.com/drive/learn/tutorial-NsightEclipse. There is also a learn section on profiling that might be of interest to you.

Hi Fabian,

Does remote-debugging work in DRIVE SW 10.0?

Thanks