Cross compile failure

Having followed the instructions in “building the samples” in the driveWorks SDK reference document,
I have used the following cross compile:

/usr/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V4L.cmake -DVIBRANTE_PDK:STRING=~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux \ -DCMAKE_INSTALL_PREFIX=/usr/local/driveworks/bin/ /usr/local/driveworks/samples

This gives the following error:

– VIBRANTE_PDK = ~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux
CMake Error at cmake/Toolchain-V4L.cmake:94 (message):
Can’t open
~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux/lib-target/version-nv-(pdk/sdk).txt
for PDK branch detection
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt:17 (project)

– Configuring incomplete, errors occurred!
See also “/home/adrian/nvidia/di418/build/CMakeFiles/CMakeOutput.log”.
See also “/home/adrian/nvidia/di418/build/CMakeFiles/CMakeError.log”.

What is the solution?

Hi amb2,
Can you please re-check the prerequisites and environment variables given in driveWorks SDK reference document. Also, please check if the ~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux/lib-target/version-nv-(pdk/sdk).txt files exists.

Hi Siva,

Environment variable:
I have written the following in the terminal:

export VIBRANTE_PDK_FILE=~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux/lib-target/version-nv-sdk.txt

export VIBRANTE_PDK=~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux

And added them to the command to cmake:

sudo /usr/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V4L.cmake -DVIBRANTE_PDK_FILE:STRING=~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux/lib-target/version-nv-sdk.txt -DVIBRANTE_PDK:STRING=~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux \ -DCMAKE_INSTALL_PREFIX=/usr/local/driveworks/bin/ /usr/local/driveworks/samples

The file does exist, ls produces:
/home/adrian/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux/lib-target/version-nv-sdk.txt

Adrian

Dear amb2,
Can you check if the build folder has write permissions. Please post cmake error log.

Hi Siva,

I cannot see where the error log is in the following output:

adrian@adrian-Dell-System-XPS-L702X:/usr/local/driveworks/build$ sudo /usr/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V4L.cmake -DVIBRANTE_PDK_FILE:STRING=~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux/lib-target/version-nv-sdk.txt -DVIBRANTE_PDK:STRING=~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux \ -DCMAKE_INSTALL_PREFIX=/usr/local/driveworks/bin/ /usr/local/driveworks/samples
– VIBRANTE_PDK = ~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux
– VIBRANTE_PDK_FILE = ~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux/lib-target/version-nv-sdk.txt
CMake Error at cmake/Toolchain-V4L.cmake:88 (file):
file failed to open for reading (No such file or directory):

~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux/lib-target/version-nv-sdk.txt

Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt:17 (project)

CMake Error at cmake/Toolchain-V4L.cmake:93 (message):
Can’t determine PDK branch for PDK
~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt:17 (project)

– Configuring incomplete, errors occurred!
adrian@adrian-Dell-System-XPS-L702X:/usr/local/driveworks/build$

Adrian.

ls -al in /usr/local/driveworks/ produces:
drwxrw-rw- 3 adrian root 4096 Nov 8 14:58 build

and within build:
-rwxrw-rw- 1 adrian root 3286 Nov 8 13:48 CMakeCache.txt
drwxrw-rw- 2 adrian root 4096 Nov 8 13:48 CMakeFiles

Dear amb2,

I successfully cross-compiled with below my case.
Could you please try to change Toolchain directory like below? Thanks.

$sudo mkdir build
$cd build
sudo cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_TOOLCHAIN_FILE=/[b]usr/local/driveworks-0.3/samples/cmake/Toolchain-V4L.cmake[/b] \ -DVIBRANTE_PDK:STRING=/home/steve/Beta20/Output/VibranteSDK/vibrante-t186ref-linux \ /usr/local/driveworks-0.3/samples/ make -j
$ make install

Hi Steve,
still the same problem:

adrian@adrian-Dell-System-XPS-L702X:/usr/local/driveworks-0.3/samples/build$ sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks-0.3/samples/cmake/Toolchain-V4L.cmake -DVIBRANTE_PDK:STRING=~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux /usr/local/driveworks-0.3/samples/
– VIBRANTE_PDK = ~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux
– VIBRANTE_PDK_FILE = ~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux/lib-target/version-nv-sdk.txt
CMake Error at cmake/Toolchain-V4L.cmake:88 (file):
file failed to open for reading (No such file or directory):

~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux/lib-target/version-nv-sdk.txt

Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt:17 (project)

CMake Error at cmake/Toolchain-V4L.cmake:93 (message):
Can’t determine PDK branch for PDK
~/nvidia/di418/i/VibranteSDK/vibrante-t186ref-linux
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt:17 (project)

– Configuring incomplete, errors occurred!

Hi amb2,
I had the same problem. Try ‘sudo make -j’ and ‘sudo make install’.
This worked in my case. Thanks

Facing the same problem. Is there any update?

I got it. We should use /home/{user} instead of ~/