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”
- 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”.
-
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”.
-
I setup my project to find “CMakeLists.txt” in accordance to the response of Hao Tsui here: Nsight Eclipse Version 10 - compiling and build issues - DRIVE AGX General - NVIDIA Developer Forums (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))
-
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.
-
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:
-
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.
-
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