Drive PX2 Cross Compile Failed using host pc

Hi,

I had followed all the instructions from the getting_started manual on how to cross compile using host. But my host does not have a graphic card so there isnt any nvidia graphic driver downloaded.

I am using ubuntu 14.04, kernel version 3.19.0.80-generic and cmake v3.8

successfully cmake file run with no problem

The following error encountered while executing “make -j”

[ 15%] Built target dw_samples_common
[ 16%] Linking CXX executable sample_egomotion_ackermann
/usr/bin/ld: warning: libcuda.so.1, needed by /usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnvcuvid.so.1, needed by /usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so, not found (try using -rpath or -rpath-link)
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidGetSourceVideoFormat'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidDestroyDecoder'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidUnmapVideoFrame64'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidDestroyVideoParser'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidMapVideoFrame64'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidParseVideoData'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidCreateVideoSource'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidDecodePicture'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidCreateDecoder'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuCtxGetCurrent'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuGetErrorString'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidCreateVideoParser'
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuvidDestroyVideoSource'
collect2: error: ld returned 1 exit status
make[2]: *** [src/egomotion/ackermann/sample_egomotion_ackermann] Error 1
make[1]: *** [src/egomotion/ackermann/CMakeFiles/sample_egomotion_ackermann.dir/all] Error 2
make: *** [all] Error 2

Please help

Hello youhong,

Could you please see “driveworks\doc\nvdwx_html\dwx_samples_section.html” like below?
So please add graphic card in your host pc and install CUDA toolkit and cuDNN, TensorRT. Thanks.
+++++++++++++++++
Linux Desktop or Linux x86/x64 Only
These are the basic preqrequisites for Linux:
• Ubuntu Linux 14.04 (out of the box installation)
• GCC >= 4.8.X && GCC <= 4.9.x
• cmake version >= 3.1.1 (if you are using Ubuntu 14.04, check this link on how to install cmake 3.x http://askubuntu.com/questions/610291/how-to-install-cmake-3-2-on-ubuntu-14-04)
• CUDA Toolkit 8.0 or higher
• cuDNN 5.1
• TensorRT 1.0
+++++++++++++++++

Hi,

I’m having a similar issue.

[ 2%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/SampleFramework.cpp.o
[ 4%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/ProgramArguments.cpp.o
[ 6%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/Grid.cpp.o
[ 8%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/Shader.cpp.o
[ 10%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/VBO.cpp.o
[ 12%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/GPUProgram.cpp.o
[ 14%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/WindowGLFW.cpp.o
[ 16%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/MathUtils.cpp.o
[ 18%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/MouseView3D.cpp.o
[ 20%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/ConsoleColor.cpp.o
[ 22%] Building CXX object src/common/CMakeFiles/dw_samples_common.dir/ProfilerCUDA.cpp.o
Linking CXX static library libdw_samples_common.a
[ 22%] Built target dw_samples_common
[ 24%] Building CXX object src/egomotion/ackermann/CMakeFiles/sample_egomotion_ackermann.dir/main.cpp.o
Linking CXX executable sample_egomotion_ackermann
/usr/local/driveworks-0.2.1/targets/x86_64-linux/lib/libdriveworks.so: undefined reference to `cuGetErrorString’
collect2: error: ld returned 1 exit status
make[2]: *** [src/egomotion/ackermann/sample_egomotion_ackermann] Error 1
make[1]: *** [src/egomotion/ackermann/CMakeFiles/sample_egomotion_ackermann.dir/all] Error 2
make: *** [all] Error 2

It should be noted that I do not have a NVIDIA GPU on the host machine.
Can the DriveWorks be cross-compiled on a host machine without a GPU?

Thanks.

Hello NipunaVega,

Please add an NVIDIA graphic card on your host machine, because the host machine need to be installed CUDA toolkit, cuDNN, TensorRT to cross-compile as I previous mentioned. Thanks.

I met the same issue, install the GPU driver will fix it.

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-375 #(depend on your GPU)

sudo reboot