[RESOLVED] Error during manual compilation of DriveWorks samples on host PC

Hello,

I am following the content at https://devblogs.nvidia.com/drivepx-application-development-using-nsight-eclipse-edition/. I am stuck at manual host compilation step in the ‘Preliminary Steps’ section.

sagar@Sagar: cd /usr/local/driveworks
sagar@Sagar: sudo cp -r samples samples-original
sagar@Sagar: cd samples-original
sagar@Sagar: sudo mkdir build-host
sagar@Sagar: cd build-host
sagar@Sagar: sudo cmake …
CMake Warning at cmake/SamplesSetBuildType.cmake:19 (message):
CMAKE_BUILD_TYPE not defined. Using Release as default.
Call Stack (most recent call first):
CMakeLists.txt:9 (include)

– The C compiler identification is GNU 4.8.5
– The CXX compiler identification is GNU 4.8.5
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found CUDA: /usr (found version “7.5”)
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found TensorRT:
– - Includes: /usr/local/nvidia/tensorrt/targets/x86_64-linux-gnu/include
– - Libraries: /usr/local/nvidia/tensorrt/targets/x86_64-linux-gnu/lib/libnvinfer.so;/usr/local/nvidia/tensorrt/targets/x86_64-linux-gnu/lib/libnvcaffe_parser.so
– Found libcudnn:
– - Includes: /usr/include
– - Libraries: /usr/lib/x86_64-linux-gnu/libcudnn.so
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
– Looking for gethostbyname
– Looking for gethostbyname - found
– Looking for connect
– Looking for connect - found
– Looking for remove
– Looking for remove - found
– Looking for shmat
– Looking for shmat - found
– Looking for IceConnectionNumber in ICE
– Looking for IceConnectionNumber in ICE - found
– Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
– Driveworks Samples install dir: /usr/local/driveworks-0.6/samples-original/build-host/install
– Driveworks found at: /usr/local/driveworks-0.6/targets/x86_64-linux
– Found Driveworks
– Configuring done
– Generating done
– Build files have been written to: /usr/local/driveworks-0.6/samples-original/build-host

sagar@Sagar: sudo make
Scanning dependencies of target update_cuda_deps
[ 1%] Dependencies for /usr/local/driveworks-0.6/samples-original/build-host/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.stamp
[ 2%] Dependencies for /usr/local/driveworks-0.6/samples-original/build-host/src/stereo/stereo_common/CMakeFiles/dw_samples_stereo_common.dir//gen_utils.cu.o.depend.stamp
[ 2%] Built target update_cuda_deps
Scanning dependencies of target dw_samples_framework
[ 3%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/SampleFramework.cpp.o
[ 4%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/DriveWorksSample.cpp.o
[ 4%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/ProgramArguments.cpp.o
[ 5%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/Grid.cpp.o
[ 6%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/WindowGLFW.cpp.o
[ 7%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/MathUtils.cpp.o
[ 7%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/MouseView3D.cpp.o
[ 8%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/Log.cpp.o
[ 9%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/ProfilerCUDA.cpp.o
[ 10%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/GenericImage.cpp.o
[ 10%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/SimpleCamera.cpp.o
[ 11%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/SimpleRenderer.cpp.o
[ 12%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/SimpleRecordingPlayer.cpp.o
[ 13%] Linking CXX static library libdw_samples_framework.a
[ 13%] Built target dw_samples_framework
Scanning dependencies of target sample_egomotion
[ 14%] Building CXX object src/egomotion/CMakeFiles/sample_egomotion.dir/main.cpp.o
[ 15%] Linking CXX executable sample_egomotion
[ 15%] Built target sample_egomotion
Scanning dependencies of target sample_sensors_info
[ 16%] Building CXX object src/sensors/info/CMakeFiles/sample_sensors_info.dir/main.cpp.o
[ 17%] Linking CXX executable sample_sensors_info
[ 17%] Built target sample_sensors_info
Scanning dependencies of target sample_gps_logger
[ 18%] Building CXX object src/sensors/gps/CMakeFiles/sample_gps_logger.dir/main.cpp.o
[ 19%] Linking CXX executable sample_gps_logger
[ 19%] Built target sample_gps_logger
Scanning dependencies of target sample_imu_logger
[ 19%] Building CXX object src/sensors/imu/CMakeFiles/sample_imu_logger.dir/main.cpp.o
[ 20%] Linking CXX executable sample_imu_logger
[ 20%] Built target sample_imu_logger
Scanning dependencies of target sample_camera_replay
[ 21%] Building CXX object src/sensors/camera_replay/CMakeFiles/sample_camera_replay.dir/main.cpp.o
[ 22%] Linking CXX executable sample_camera_replay
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 22%] Built target sample_camera_replay
Scanning dependencies of target sample_camera_seek
[ 23%] Building CXX object src/sensors/camera_seek/CMakeFiles/sample_camera_seek.dir/main.cpp.o
[ 24%] Linking CXX executable sample_camera_seek
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 24%] Built target sample_camera_seek
Scanning dependencies of target sample_camera_multiple_replay
[ 25%] Building CXX object src/sensors/camera_multiple_replay/CMakeFiles/sample_camera_multiple_replay.dir/main.cpp.o
[ 26%] Linking CXX executable sample_camera_multiple_replay
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 26%] Built target sample_camera_multiple_replay
Scanning dependencies of target sample_camera_usb
[ 27%] Building CXX object src/sensors/camera_usb/CMakeFiles/sample_camera_usb.dir/main.cpp.o
[ 28%] Building CXX object src/sensors/camera_usb/CMakeFiles/sample_camera_usb.dir/ResourceManager.cpp.o
[ 28%] Linking CXX executable sample_camera_usb
[ 28%] Built target sample_camera_usb
Scanning dependencies of target sample_camera_pointgrey
[ 29%] Building CXX object src/sensors/camera_pointgrey/CMakeFiles/sample_camera_pointgrey.dir/main.cpp.o
[ 29%] Building CXX object src/sensors/camera_pointgrey/CMakeFiles/sample_camera_pointgrey.dir/ResourceManager.cpp.o
[ 30%] Linking CXX executable sample_camera_pointgrey
[ 30%] Built target sample_camera_pointgrey
Scanning dependencies of target sample_record
[ 31%] Building CXX object src/sensors/record/CMakeFiles/sample_record.dir/main.cpp.o
[ 31%] Linking CXX executable sample_record
[ 31%] Built target sample_record
Scanning dependencies of target sample_canbus_logger
[ 31%] Building CXX object src/sensors/canbus/logger/CMakeFiles/sample_canbus_logger.dir/main.cpp.o
[ 32%] Linking CXX executable sample_canbus_logger
[ 32%] Built target sample_canbus_logger
Scanning dependencies of target sample_canbus_interpreter
[ 33%] Building CXX object src/sensors/canbus/interpreter/CMakeFiles/sample_canbus_interpreter.dir/main.cpp.o
[ 34%] Building CXX object src/sensors/canbus/interpreter/CMakeFiles/sample_canbus_interpreter.dir/interpreter.cpp.o
[ 35%] Linking CXX executable sample_canbus_interpreter
[ 35%] Built target sample_canbus_interpreter
Scanning dependencies of target sample_lidar_replay
[ 36%] Building CXX object src/sensors/lidar/lidar_replay/CMakeFiles/sample_lidar_replay.dir/main.cpp.o
[ 36%] Building CXX object src/sensors/lidar/lidar_replay/CMakeFiles/sample_lidar_replay.dir/userInput.cpp.o
[ 37%] Linking CXX executable sample_lidar_replay
[ 37%] Built target sample_lidar_replay
Scanning dependencies of target sample_radar_replay
[ 37%] Building CXX object src/sensors/radar/radar_replay/CMakeFiles/sample_radar_replay.dir/main.cpp.o
[ 38%] Building CXX object src/sensors/radar/radar_replay/CMakeFiles/sample_radar_replay.dir/radarDynamics.cpp.o
[ 39%] Linking CXX executable sample_radar_replay
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 39%] Built target sample_radar_replay
Scanning dependencies of target sample_third_party_camera
[ 40%] Building CXX object src/sensors/third_party_camera/CMakeFiles/sample_third_party_camera.dir/main.cpp.o
[ 41%] Linking CXX executable sample_third_party_camera
[ 41%] Built target sample_third_party_camera
Scanning dependencies of target sample_camera_tracker
[ 42%] Building CXX object src/features/camera_tracker/CMakeFiles/sample_camera_tracker.dir/main.cpp.o
[ 42%] Building CXX object src/features/camera_tracker/CMakeFiles/sample_camera_tracker.dir/SensorIOCuda.cpp.o
[ 43%] Linking CXX executable sample_camera_tracker
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 43%] Built target sample_camera_tracker
Scanning dependencies of target sample_camera_scaling_tracker
[ 44%] Building CXX object src/features/camera_scaling_tracker/CMakeFiles/sample_camera_scaling_tracker.dir/main.cpp.o
[ 44%] Linking CXX executable sample_camera_scaling_tracker
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 44%] Built target sample_camera_scaling_tracker
Scanning dependencies of target sample_occupancy_grid
[ 45%] Building CXX object src/mapping/occupancy_grid/CMakeFiles/sample_occupancy_grid.dir/main.cpp.o
[ 46%] Linking CXX executable sample_occupancy_grid
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 46%] Built target sample_occupancy_grid
Scanning dependencies of target sample_rig_configuration
[ 47%] Building CXX object src/rigconfiguration/CMakeFiles/sample_rig_configuration.dir/main.cpp.o
[ 47%] Linking CXX executable sample_rig_configuration
[ 47%] Built target sample_rig_configuration
Scanning dependencies of target sample_renderer
[ 48%] Building CXX object src/renderer/CMakeFiles/sample_renderer.dir/main.cpp.o
[ 49%] Linking CXX executable sample_renderer
[ 49%] Built target sample_renderer
Scanning dependencies of target sample_sfm
[ 50%] Building CXX object src/sfm/CMakeFiles/sample_sfm.dir/main.cpp.o
[ 51%] Building CXX object src/sfm/CMakeFiles/sample_sfm.dir/SensorIOCuda.cpp.o
[ 51%] Linking CXX executable sample_sfm
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 51%] Built target sample_sfm
Scanning dependencies of target dw_samples_dnn_common
[ 51%] Building CXX object src/dnn/dnn_common/CMakeFiles/dw_samples_dnn_common.dir/DNNInference.cpp.o
[ 52%] Building CXX object src/dnn/dnn_common/CMakeFiles/dw_samples_dnn_common.dir/SensorIOCuda.cpp.o
[ 53%] Linking CXX static library libdw_samples_dnn_common.a
[ 53%] Built target dw_samples_dnn_common
Scanning dependencies of target sample_object_detector
[ 53%] Building CXX object src/dnn/sample_object_detector/CMakeFiles/sample_object_detector.dir/main.cpp.o
[ 54%] Linking CXX executable sample_object_detector
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 54%] Built target sample_object_detector
Scanning dependencies of target sample_object_tracker
[ 55%] Building CXX object src/dnn/sample_object_tracker/CMakeFiles/sample_object_tracker.dir/main.cpp.o
[ 55%] Building CXX object src/dnn/sample_object_tracker/CMakeFiles/sample_object_tracker.dir/FeatureTracker2D.cpp.o
[ 56%] Linking CXX executable sample_object_tracker
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 56%] Built target sample_object_tracker
Scanning dependencies of target sample_object_dwdetector
[ 57%] Building CXX object src/dnn/sample_object_dwdetector/CMakeFiles/sample_object_dwdetector.dir/main.cpp.o
[ 58%] Linking CXX executable sample_object_dwdetector
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 58%] Built target sample_object_dwdetector
Scanning dependencies of target dw_samples_laneDetection_common
[ 59%] Building CXX object src/laneDetection/laneDetection_common/CMakeFiles/dw_samples_laneDetection_common.dir/LaneDetectionCommon.cpp.o
[ 60%] Linking CXX static library libdw_samples_laneDetection_common.a
[ 60%] Built target dw_samples_laneDetection_common
Scanning dependencies of target sample_lane_detection
[ 61%] Building CXX object src/laneDetection/laneDetection/CMakeFiles/sample_lane_detection.dir/main.cpp.o
[ 62%] Linking CXX executable sample_lane_detection
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 62%] Built target sample_lane_detection
Scanning dependencies of target sample_color_correction
[ 63%] Building CXX object src/colorcorrection/CMakeFiles/sample_color_correction.dir/main.cpp.o
[ 64%] Linking CXX executable sample_color_correction
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 64%] Built target sample_color_correction
Scanning dependencies of target sample_isp
[ 64%] Building CXX object src/isp/CMakeFiles/sample_isp.dir/main.cpp.o
[ 65%] Linking CXX executable sample_isp
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 65%] Built target sample_isp
Scanning dependencies of target sample_video_rectifier
[ 66%] Building CXX object src/rectifier/CMakeFiles/sample_video_rectifier.dir/main.cpp.o
[ 67%] Linking CXX executable sample_video_rectifier
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 67%] Built target sample_video_rectifier
Scanning dependencies of target sample_ipc_socketclientserver
[ 68%] Building CXX object src/ipc/CMakeFiles/sample_ipc_socketclientserver.dir/sample_ipc_socketclientserver.cpp.o
[ 69%] Linking CXX executable sample_ipc_socketclientserver
[ 69%] Built target sample_ipc_socketclientserver
Scanning dependencies of target sample_hello_world
[ 70%] Building CXX object src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o
/usr/local/driveworks-0.6/samples-original/src/hello_world/main.cpp: In function ‘void printProperties(cudaDeviceProp*)’:
/usr/local/driveworks-0.6/samples-original/src/hello_world/main.cpp:134:50: error: ‘cudaDeviceProp’ has no member named ‘concurrentManagedAccess’
<< "Concurrent memory: " << props->concurrentManagedAccess
^
src/hello_world/CMakeFiles/sample_hello_world.dir/build.make:62: recipe for target ‘src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o’ failed
make[2]: *** [src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:2031: recipe for target ‘src/hello_world/CMakeFiles/sample_hello_world.dir/all’ failed
make[1]: *** [src/hello_world/CMakeFiles/sample_hello_world.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2

I checked the environment variables and here is the output:
sagar@Sagar: echo $PATH
/usr/local/cuda-9.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
sagar@Sagar: echo $LD_LIBRARY_PATH
/usr/local/cuda-9.0/lib64:

I am most likely missing something, but I cannot figure out what it is. Can anyone help?

Thanks and Regards,
Sagar

Ideas, anyone?

Dear sagar,
Referring to warning /usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5, Do you have CUDA 7.5 installed on machine? Double check if you have selected cuda 9.0 toolkit while configuring Nsight.

Dear Siva,

I searched for “cudart” in Synaptic Package Manager. It shows that the following components are installed:
cuda-cudart-9-0
cuda-cudart-cross-aarch64-9-0:arm64
cuda-cudart-dev-9-0
libcudart7.5

So it looks like CUDA Runtime 7.5 is installed on my PC. This is really surprising, since CUDA Toolkit was installed as part of DriveInstall.

I have not yet jumped on to Nsight. That is the next step according to the dev blog I am following.

Also got the following…

sagar@Sagar:~$ nvcc --version
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2017 NVIDIA Corporation
Built on Sun_Oct_22_03:08:45_CDT_2017
Cuda compilation tools, release 9.0, V9.0.225

Dear sagar,
On my machine, Drive installer installed CUDA 9.0 not CUDA 7.5. Can you check libcudart.so.9.0 in /usr/local/cuda-9.0/lib64/ folder. It looks like you have /usr/local/CUDA-7.5 too.

Dear Siva,

I checked. I have libcudart.so.9.0 in /usr/local/cuda-9.0/lib64/ folder. And I do not have /usr/local/CUDA-7.5 folder.

Dear sagar,
Can you follow the build instructions given at /usr/local/driveworks-0.6/doc/nvdwx_html/dwx_samples_building.html

Dear Siva,

I followed the DW build instructions from the path you provided. Thing is, the dev blog also uses the same instructions. To be sure, I re-checked all prerequisites and found everything OK. But I am getting the same compilation errors as before. I have pasted the latest console output for your reference.

sagar@Sagar:/usr/local/driveworks/samples-original$ gcc --version
gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5
Copyright © 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

sagar@Sagar:/usr/local/driveworks/samples-original$ cmake --version
cmake version 3.5.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).

sagar@Sagar:/usr/local/driveworks/samples-original/build-host$ sudo cmake -DCMAKE_BUILD_TYPE=Release /usr/local/driveworks/samples-original
– The C compiler identification is GNU 4.8.5
– The CXX compiler identification is GNU 4.8.5
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found CUDA: /usr (found version “7.5”)
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found TensorRT:
– - Includes: /usr/local/nvidia/tensorrt/targets/x86_64-linux-gnu/include
– - Libraries: /usr/local/nvidia/tensorrt/targets/x86_64-linux-gnu/lib/libnvinfer.so;/usr/local/nvidia/tensorrt/targets/x86_64-linux-gnu/lib/libnvcaffe_parser.so
– Found libcudnn:
– - Includes: /usr/include
– - Libraries: /usr/lib/x86_64-linux-gnu/libcudnn.so
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
– Looking for gethostbyname
– Looking for gethostbyname - found
– Looking for connect
– Looking for connect - found
– Looking for remove
– Looking for remove - found
– Looking for shmat
– Looking for shmat - found
– Looking for IceConnectionNumber in ICE
– Looking for IceConnectionNumber in ICE - found
– Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
– Driveworks Samples install dir: /usr/local/driveworks-0.6/samples-original/build-host/install
– Driveworks found at: /usr/local/driveworks-0.6/targets/x86_64-linux
– Found Driveworks
– Configuring done
– Generating done
– Build files have been written to: /usr/local/driveworks-0.6/samples-original/build-host

sagar@Sagar:/usr/local/driveworks/samples-original/build-host$ sudo make
Scanning dependencies of target update_cuda_deps
[ 1%] Dependencies for /usr/local/driveworks-0.6/samples-original/build-host/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.stamp
[ 2%] Dependencies for /usr/local/driveworks-0.6/samples-original/build-host/src/stereo/stereo_common/CMakeFiles/dw_samples_stereo_common.dir//gen_utils.cu.o.depend.stamp
[ 2%] Built target update_cuda_deps
Scanning dependencies of target dw_samples_framework
[ 3%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/SampleFramework.cpp.o
[ 4%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/DriveWorksSample.cpp.o
[ 4%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/ProgramArguments.cpp.o
[ 5%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/Grid.cpp.o
[ 6%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/WindowGLFW.cpp.o
[ 7%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/MathUtils.cpp.o
[ 7%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/MouseView3D.cpp.o
[ 8%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/Log.cpp.o
[ 9%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/ProfilerCUDA.cpp.o
[ 10%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/GenericImage.cpp.o
[ 10%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/SimpleCamera.cpp.o
[ 11%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/SimpleRenderer.cpp.o
[ 12%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/SimpleRecordingPlayer.cpp.o
[ 13%] Linking CXX static library libdw_samples_framework.a
[ 13%] Built target dw_samples_framework
Scanning dependencies of target sample_egomotion
[ 14%] Building CXX object src/egomotion/CMakeFiles/sample_egomotion.dir/main.cpp.o
[ 15%] Linking CXX executable sample_egomotion
[ 15%] Built target sample_egomotion
Scanning dependencies of target sample_sensors_info
[ 16%] Building CXX object src/sensors/info/CMakeFiles/sample_sensors_info.dir/main.cpp.o
[ 17%] Linking CXX executable sample_sensors_info
[ 17%] Built target sample_sensors_info
Scanning dependencies of target sample_gps_logger
[ 18%] Building CXX object src/sensors/gps/CMakeFiles/sample_gps_logger.dir/main.cpp.o
[ 19%] Linking CXX executable sample_gps_logger
[ 19%] Built target sample_gps_logger
Scanning dependencies of target sample_imu_logger
[ 19%] Building CXX object src/sensors/imu/CMakeFiles/sample_imu_logger.dir/main.cpp.o
[ 20%] Linking CXX executable sample_imu_logger
[ 20%] Built target sample_imu_logger
Scanning dependencies of target sample_camera_replay
[ 21%] Building CXX object src/sensors/camera_replay/CMakeFiles/sample_camera_replay.dir/main.cpp.o
[ 22%] Linking CXX executable sample_camera_replay
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 22%] Built target sample_camera_replay
Scanning dependencies of target sample_camera_seek
[ 23%] Building CXX object src/sensors/camera_seek/CMakeFiles/sample_camera_seek.dir/main.cpp.o
[ 24%] Linking CXX executable sample_camera_seek
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 24%] Built target sample_camera_seek
Scanning dependencies of target sample_camera_multiple_replay
[ 25%] Building CXX object src/sensors/camera_multiple_replay/CMakeFiles/sample_camera_multiple_replay.dir/main.cpp.o
[ 26%] Linking CXX executable sample_camera_multiple_replay
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 26%] Built target sample_camera_multiple_replay
Scanning dependencies of target sample_camera_usb
[ 27%] Building CXX object src/sensors/camera_usb/CMakeFiles/sample_camera_usb.dir/main.cpp.o
[ 28%] Building CXX object src/sensors/camera_usb/CMakeFiles/sample_camera_usb.dir/ResourceManager.cpp.o
[ 28%] Linking CXX executable sample_camera_usb
[ 28%] Built target sample_camera_usb
Scanning dependencies of target sample_camera_pointgrey
[ 29%] Building CXX object src/sensors/camera_pointgrey/CMakeFiles/sample_camera_pointgrey.dir/main.cpp.o
[ 29%] Building CXX object src/sensors/camera_pointgrey/CMakeFiles/sample_camera_pointgrey.dir/ResourceManager.cpp.o
[ 30%] Linking CXX executable sample_camera_pointgrey
[ 30%] Built target sample_camera_pointgrey
Scanning dependencies of target sample_record
[ 31%] Building CXX object src/sensors/record/CMakeFiles/sample_record.dir/main.cpp.o
[ 31%] Linking CXX executable sample_record
[ 31%] Built target sample_record
Scanning dependencies of target sample_canbus_logger
[ 31%] Building CXX object src/sensors/canbus/logger/CMakeFiles/sample_canbus_logger.dir/main.cpp.o
[ 32%] Linking CXX executable sample_canbus_logger
[ 32%] Built target sample_canbus_logger
Scanning dependencies of target sample_canbus_interpreter
[ 33%] Building CXX object src/sensors/canbus/interpreter/CMakeFiles/sample_canbus_interpreter.dir/main.cpp.o
[ 34%] Building CXX object src/sensors/canbus/interpreter/CMakeFiles/sample_canbus_interpreter.dir/interpreter.cpp.o
[ 35%] Linking CXX executable sample_canbus_interpreter
[ 35%] Built target sample_canbus_interpreter
Scanning dependencies of target sample_lidar_replay
[ 36%] Building CXX object src/sensors/lidar/lidar_replay/CMakeFiles/sample_lidar_replay.dir/main.cpp.o
[ 36%] Building CXX object src/sensors/lidar/lidar_replay/CMakeFiles/sample_lidar_replay.dir/userInput.cpp.o
[ 37%] Linking CXX executable sample_lidar_replay
[ 37%] Built target sample_lidar_replay
Scanning dependencies of target sample_radar_replay
[ 37%] Building CXX object src/sensors/radar/radar_replay/CMakeFiles/sample_radar_replay.dir/main.cpp.o
[ 38%] Building CXX object src/sensors/radar/radar_replay/CMakeFiles/sample_radar_replay.dir/radarDynamics.cpp.o
[ 39%] Linking CXX executable sample_radar_replay
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 39%] Built target sample_radar_replay
Scanning dependencies of target sample_third_party_camera
[ 40%] Building CXX object src/sensors/third_party_camera/CMakeFiles/sample_third_party_camera.dir/main.cpp.o
[ 41%] Linking CXX executable sample_third_party_camera
[ 41%] Built target sample_third_party_camera
Scanning dependencies of target sample_camera_tracker
[ 42%] Building CXX object src/features/camera_tracker/CMakeFiles/sample_camera_tracker.dir/main.cpp.o
[ 42%] Building CXX object src/features/camera_tracker/CMakeFiles/sample_camera_tracker.dir/SensorIOCuda.cpp.o
[ 43%] Linking CXX executable sample_camera_tracker
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 43%] Built target sample_camera_tracker
Scanning dependencies of target sample_camera_scaling_tracker
[ 44%] Building CXX object src/features/camera_scaling_tracker/CMakeFiles/sample_camera_scaling_tracker.dir/main.cpp.o
[ 44%] Linking CXX executable sample_camera_scaling_tracker
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 44%] Built target sample_camera_scaling_tracker
Scanning dependencies of target sample_occupancy_grid
[ 45%] Building CXX object src/mapping/occupancy_grid/CMakeFiles/sample_occupancy_grid.dir/main.cpp.o
[ 46%] Linking CXX executable sample_occupancy_grid
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 46%] Built target sample_occupancy_grid
Scanning dependencies of target sample_rig_configuration
[ 47%] Building CXX object src/rigconfiguration/CMakeFiles/sample_rig_configuration.dir/main.cpp.o
[ 47%] Linking CXX executable sample_rig_configuration
[ 47%] Built target sample_rig_configuration
Scanning dependencies of target sample_renderer
[ 48%] Building CXX object src/renderer/CMakeFiles/sample_renderer.dir/main.cpp.o
[ 49%] Linking CXX executable sample_renderer
[ 49%] Built target sample_renderer
Scanning dependencies of target sample_sfm
[ 50%] Building CXX object src/sfm/CMakeFiles/sample_sfm.dir/main.cpp.o
[ 51%] Building CXX object src/sfm/CMakeFiles/sample_sfm.dir/SensorIOCuda.cpp.o
[ 51%] Linking CXX executable sample_sfm
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 51%] Built target sample_sfm
Scanning dependencies of target dw_samples_dnn_common
[ 51%] Building CXX object src/dnn/dnn_common/CMakeFiles/dw_samples_dnn_common.dir/DNNInference.cpp.o
[ 52%] Building CXX object src/dnn/dnn_common/CMakeFiles/dw_samples_dnn_common.dir/SensorIOCuda.cpp.o
[ 53%] Linking CXX static library libdw_samples_dnn_common.a
[ 53%] Built target dw_samples_dnn_common
Scanning dependencies of target sample_object_detector
[ 53%] Building CXX object src/dnn/sample_object_detector/CMakeFiles/sample_object_detector.dir/main.cpp.o
[ 54%] Linking CXX executable sample_object_detector
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 54%] Built target sample_object_detector
Scanning dependencies of target sample_object_tracker
[ 55%] Building CXX object src/dnn/sample_object_tracker/CMakeFiles/sample_object_tracker.dir/main.cpp.o
[ 55%] Building CXX object src/dnn/sample_object_tracker/CMakeFiles/sample_object_tracker.dir/FeatureTracker2D.cpp.o
[ 56%] Linking CXX executable sample_object_tracker
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 56%] Built target sample_object_tracker
Scanning dependencies of target sample_object_dwdetector
[ 57%] Building CXX object src/dnn/sample_object_dwdetector/CMakeFiles/sample_object_dwdetector.dir/main.cpp.o
[ 58%] Linking CXX executable sample_object_dwdetector
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 58%] Built target sample_object_dwdetector
Scanning dependencies of target dw_samples_laneDetection_common
[ 59%] Building CXX object src/laneDetection/laneDetection_common/CMakeFiles/dw_samples_laneDetection_common.dir/LaneDetectionCommon.cpp.o
[ 60%] Linking CXX static library libdw_samples_laneDetection_common.a
[ 60%] Built target dw_samples_laneDetection_common
Scanning dependencies of target sample_lane_detection
[ 61%] Building CXX object src/laneDetection/laneDetection/CMakeFiles/sample_lane_detection.dir/main.cpp.o
[ 62%] Linking CXX executable sample_lane_detection
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 62%] Built target sample_lane_detection
Scanning dependencies of target sample_color_correction
[ 63%] Building CXX object src/colorcorrection/CMakeFiles/sample_color_correction.dir/main.cpp.o
[ 64%] Linking CXX executable sample_color_correction
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 64%] Built target sample_color_correction
Scanning dependencies of target sample_isp
[ 64%] Building CXX object src/isp/CMakeFiles/sample_isp.dir/main.cpp.o
[ 65%] Linking CXX executable sample_isp
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 65%] Built target sample_isp
Scanning dependencies of target sample_video_rectifier
[ 66%] Building CXX object src/rectifier/CMakeFiles/sample_video_rectifier.dir/main.cpp.o
[ 67%] Linking CXX executable sample_video_rectifier
/usr/bin/ld: warning: libcudart.so.9.0, needed by /usr/local/driveworks-0.6/targets/x86_64-linux/lib/libdriveworks.so, may conflict with libcudart.so.7.5
[ 67%] Built target sample_video_rectifier
Scanning dependencies of target sample_ipc_socketclientserver
[ 68%] Building CXX object src/ipc/CMakeFiles/sample_ipc_socketclientserver.dir/sample_ipc_socketclientserver.cpp.o
[ 69%] Linking CXX executable sample_ipc_socketclientserver
[ 69%] Built target sample_ipc_socketclientserver
Scanning dependencies of target sample_hello_world
[ 70%] Building CXX object src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o
/usr/local/driveworks/samples-original/src/hello_world/main.cpp: In function ‘void printProperties(cudaDeviceProp*)’:
/usr/local/driveworks/samples-original/src/hello_world/main.cpp:134:50: error: ‘cudaDeviceProp’ has no member named ‘concurrentManagedAccess’
<< "Concurrent memory: " << props->concurrentManagedAccess
^
src/hello_world/CMakeFiles/sample_hello_world.dir/build.make:62: recipe for target ‘src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o’ failed
make[2]: *** [src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:2031: recipe for target ‘src/hello_world/CMakeFiles/sample_hello_world.dir/all’ failed
make[1]: *** [src/hello_world/CMakeFiles/sample_hello_world.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2

sagar@Sagar:

Dear sagar,
From the log I can see, CUDA 7.5 is installed at /usr (Found CUDA: /usr (found version “7.5”) ). It should point to /usr/local/cuda-9.0. Please update environment variables to pick up CUDA 9.0

OK, it looks like there is a libcudart.so.7.5 in the path /usr/lib/x86_64-linux-gnu/. But like I said, I have set up the environment vars properly (see below).

What am I missing here?

Dear sagar,
have you deleted the old build? Cmake cache might be picking up old libcudart.so.7.5 instead of new libcudart.so.9.0

Can you please guide me on how to delete the old build? Thank you.

Update – the link libcudart.so in /usr/lib/x86_64-linux-gnu/ is somehow pointing to libcudart.so.7.5. Do you think this may be the cause?

Do you think this may be the cause?

Yes. The error is due to linking of libcudart.so.7.5 instead of lincudart.so.9.0. Please update that symbolic linkand check. If sudo cmake is successful. You should see Found CUDA: /usr/local/cuda (found version “9.0”) in the cMake log.

Can you please guide me on how to delete the old build

Please delete the build folder samples-original/build-host and create a new one.

Dear Siva,

I deleted the old build. I also changed the symlink libudart.so as below.
sagar@Sagar:/usr/lib/x86_64-linux-gnu$ ls -lrta libcudart.so
lrwxrwxrwx 1 root root 34 Jul 24 17:17 libcudart.so -> /usr/local/cuda/lib64/libcudart.so

But the cmake log still shows that CUDA version 7.5 is being picked up.

For some reason, there are many v7.5 files in that path, whose origin is unknown to me.
sagar@Sagar:/usr/lib/x86_64-linux-gnu$ ls -lrta libcu*..7
-rw-r–r-- 1 root root 36816424 Sep 19 2015 libcusparse.so.7.5.18
-rw-r–r-- 1 root root 51765952 Sep 19 2015 libcurand.so.7.5.18
-rw-r–r-- 1 root root 23938736 Sep 19 2015 libcublas.so.7.5.18
-rw-r–r-- 1 root root 37034328 Sep 19 2015 libcusolver.so.7.5.18
-rw-r–r-- 1 root root 447664 Sep 19 2015 libcufftw.so.7.5.18
-rw-r–r-- 1 root root 383336 Sep 19 2015 libcudart.so.7.5.18
-rw-r–r-- 1 root root 5751400 Sep 19 2015 libcuinj64.so.7.5.18
-rw-r–r-- 1 root root 111231960 Sep 19 2015 libcufft.so.7.5.18
lrwxrwxrwx 1 root root 21 Mar 30 2016 libcusparse.so.7.5 -> libcusparse.so.7.5.18
lrwxrwxrwx 1 root root 19 Mar 30 2016 libcurand.so.7.5 -> libcurand.so.7.5.18
lrwxrwxrwx 1 root root 19 Mar 30 2016 libcufftw.so.7.5 -> libcufftw.so.7.5.18
lrwxrwxrwx 1 root root 18 Mar 30 2016 libcufft.so.7.5 -> libcufft.so.7.5.18
lrwxrwxrwx 1 root root 19 Mar 30 2016 libcublas.so.7.5 -> libcublas.so.7.5.18
lrwxrwxrwx 1 root root 21 Mar 30 2016 libcusolver.so.7.5 -> libcusolver.so.7.5.18
lrwxrwxrwx 1 root root 20 Mar 30 2016 libcuinj64.so.7.5 -> libcuinj64.so.7.5.18
-rw-r–r-- 1 root root 287624224 Nov 17 2017 libcudnn.so.7.0.5
lrwxrwxrwx 1 root root 17 Nov 17 2017 libcudnn.so.7 -> libcudnn.so.7.0.5
lrwxrwxrwx 1 root root 34 Jul 24 17:24 libcudart.so.7.5 -> /usr/local/cuda/lib64/libcudart.so

What more can I try?

I am not sure why CUDA 7.5 is being picked up. Please check creating build folder in your home directory and build without sudo. If that does not work, locate CUDA 7.5 files and delete, so that build may pick up CUDA 9.0

Dear Siva,

I am planning to perform this exercise on a clean development machine. I have a query open on https://devtalk.nvidia.com/default/topic/1037869/general/driveinstall-5-0-5-0b-prerequisites-for-host-pc/. Once that is resolved, I will make progress for this thread too. Hope you can help…

Thank you.

Dear Siva,

I prepared a clean host environment by re-installing the OS, and was able to finish the manual compilation procedures for host and target as per the developer blog.

I still do not understand where the conflicting CUDA 7.5 components came from, but since my issue is resolved for now, I am just going to close this thread.

Thank you for your help.