Compilation issue in building Driveworks SDK sample

Hi,

We have been trying to build the sample of Driveworks 0.1.2 build but we are facing following problem in DNN SAMPLE:
cmake -DCMAKE_BUILD_TYPE=Release …/src/dnn
– The C compiler identification is GNU 4.8.4
– The CXX compiler identification is GNU 4.8.4
– 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

CMake Error at dnn_common/CMakeLists.txt:33 (CUDA_ADD_LIBRARY):
Unknown CMake command “CUDA_ADD_LIBRARY”.

CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.2)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run “cmake --help-policy CMP0000”.
This warning is for project developers. Use -Wno-dev to suppress it.

– Configuring incomplete, errors occurred!

We have picked up CMAKE 3.2.2 which has definition of CUDA_ADD_LIBRARY but it is still not picking up definition and throwing the error.

Are we missing something in our installations?

Could you please help us to resolve this issue?

Regards,
Shashank

Hi,

We have figured out issue in our build process. There were some folder which were not properly mention in some of the build files. We have changed the folder location to the place where those folder are. After that it is working fine.

Please do not reply on this query.

Thanks
Shashanl

Hi

I face the same issue. Can you please mention which folders you changed?

Thanks,
Saquib

Hello there!

I’m running into the same issue as above, and if I try compiling the hellow_world code I get the following error:

CMake Error at CMakeLists.txt:31 (sdk_add_sample)

Any help will be greatly appreciated.

Dear lgriera,

Could you check prerequisites for DW building the samples in DW doc?

•Ubuntu Linux 16.04 or 14.04 (out of the box installation)
•GCC >= 4.8.X && GCC <= 4.9.x (for 16.04, use GCC 4.9.3 or greater)
•cmake version >= 3.3

And please refer to “Building on Linux Desktop or Linux x86/x64 Only” and “Cross-Compiling for the NVIDIA DRIVE Platform” in DW doc. Thanks.

Thanks for your reply.

My system complies with the minimum requirement. I believe that what I need is to point the sdk_add_sample to the right PATH.

I try running the cmake command as following:

$cmake -DCMAKE_BUILD_TYPE=Release \
>  -DVIBRANTE_PDK:STRING=/home/<my_user>/NVIDIA/Drive/5050bL_SDK/DriveSDK/drive-t186ref-linux \
>  /usr/local/driveworks/samples/src/hello_world

However, I still get:

CMake Error at CMakeLists.txt:31 (sdk_add_sample)

Dear lgriera,

Could you please re-try to compile whole samples like below? Thanks.
/usr/local/driveworks-0.6/samples/

Thanks mate!!

So, the soft link was the issue. However, now that was available run cmake I get many failers messages when running

make -j

. i.e.

src/sensors/canbus/logger/CMakeFiles/sample_canbus_logger.dir/build.make:109: recipe for target ‘src/sensors/canbus/logger/sample_canbus_logger’ failed
CMakeFiles/Makefile2:784: recipe for target ‘src/sensors/canbus/logger/CMakeFiles/sample_canbus_logger.dir/all’ failed
//usr/lib/x86_64-linux-gnusrc/hello_world/CMakeFiles/sample_hello_world.dir/build.make:109: recipe for target ‘src/hello_world/sample_hello_world’ failed
//usr/lib/x86_64-linux-gnu/libcuda.so.1: undefined referenceCMakeFiles/Makefile2:2031: recipe for target ‘src/hello_world/CMakeFiles/sample_hello_world.dir/all’ failed
src/sensors/info/CMakeFiles/sample_sensors_info.dir/build.make:109: recipe for target ‘src/sensors/info/sample_sensors_info’ failed
CMakeFiles/Makefile2:289: recipe for target ‘src/sensors/info/CMakeFiles/sample_sensors_info.dir/all’ failed
src/mapping/occupancy_grid/CMakeFiles/sample_occupancy_grid.dir/build.make:109: recipe for target ‘src/mapping/occupancy_grid/sample_occupancy_grid’ failed
CMakeFiles/Makefile2:1208: recipe for target ‘src/mapping/occupancy_grid/CMakeFiles/sample_occupancy_grid.dir/all’ failed
src/rigconfiguration/CMakeFiles/sample_rig_configuration.dir/build.make:109: recipe for target ‘src/rigconfiguration/sample_rig_configuration’ failed
CMakeFiles/Makefile2:1263: recipe for target ‘src/rigconfiguration/CMakeFiles/sample_rig_configuration.dir/all’ failed
src/sensors/gps/CMakeFiles/sample_gps_logger.dir/build.make:109: recipe for target ‘src/sensors/gps/sample_gps_logger’ failed
CMakeFiles/Makefile2:344: recipe for target ‘src/sensors/gps/CMakeFiles/sample_gps_logger.dir/all’ failed
src/sensors/record/CMakeFiles/sample_record.dir/build.make:109: recipe for target ‘src/sensors/record/sample_record’ failed
CMakeFiles/Makefile2:729: recipe for target ‘src/sensors/record/CMakeFiles/sample_record.dir/all’ failed
src/sensors/canbus/interpreter/CMakeFiles/sample_canbus_interpreter.dir/build.make:135: recipe for target ‘src/sensors/canbus/interpreter/sample_canbus_interpreter’ failed
CMakeFiles/Makefile2:839: recipe for target ‘src/sensors/canbus/interpreter/CMakeFiles/sample_canbus_interpreter.dir/all’ failed
src/sensors/imu/CMakeFiles/sample_imu_logger.dir/build.make:109: recipe for target ‘src/sensors/imu/sample_imu_logger’ failed
CMakeFiles/Makefile2:399: recipe for target ‘src/sensors/imu/CMakeFiles/sample_imu_logger.dir/all’ failed

Dear lgriera,

Please re-try run make -j after clean like below. Thanks.

$sudo make clean
$sudo make -j

I deleted all files in the build directory and run all from the beginning. Some of the object files were created and link. However, I’m getting errors with libcuda.so.1. I checked for the location of libcuda.so.1, and it can be found at the following locations:

/usr/lib/i386-linux-gnu/libcuda.so.1
/usr/lib/x86_64-linux-gnu/libcuda.so.1
/home/<my_user>/NVIDIA/Drive/5050bL_SDK/DriveSDK/drive-t186ref-linux/lib-target/libcuda.so.1
/home/<my_user>/NVIDIA/Drive/5050bL_SDK/DriveSDK/drive-t186ref-linux/targetfs/usr/lib/libcuda.so.1

Dear lgriera,

Regarding the symptom, please refer to below link. Thanks.
https://devtalk.nvidia.com/default/topic/1014969/-resolved-make-j-fails-on-crosscompilation-drivework-sample/