I wanted to cross compile some code and samples onto the target but I get the following error when executing “make -j”:
/home/.../nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/7.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libEGL.so.1, needed by /usr/local/driveworks-2.2/targets/aarch64-Linux/lib/libnvinfer.so.5, not found (try using -rpath or -rpath-link)
Last week, however, everything was still working fine. How can I fix this now?
Dear @kn10,
Few questions, do you see libEGL.so.1 in the same path as mentioned in error. Did you select both host and target components while installing DRIVE SW 10 via sdkmanager?
Dear @kn10,
Please empty the build folder and check the steps Could you please provide complete cmake and make logs. Also check if you see any issue with host compilation?
Because I cannot find the file in your current path (~/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/drive-t186ref-linux/lib-target), could you try with including below as your library searching path?
Now, I am able to cross compile my code again. However, I still get the following warning:
/home/.../nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/7.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libEGL.so.1, needed by /usr/local/driveworks-2.2/targets/aarch64-Linux/lib/libnvinfer.so.5, not found (try using -rpath or -rpath-link)
Despite receiving the warning, the compilation does not throw an error. Should we be worried about this warning or can we ignore it in the future?
Yes, I can find it there in the path you mentioned. But how can I include this correctly as a library searching path in the DRIVE software framework? In which file do I have to specify the searching path? In CMakeLists.txt? And how? That is what I am struggling with at the moment since the cmake structure is quite complex.
I tried setting the library search path you mentioned above by adding the following to the Toolchain-V5L.cmake file (which is the file I assign to -DCMAKE_TOOLCHAIN_FILE):
However, I still get the warning above regarding libEGL.so.1. Did I set the library search path correctly? I just can’t seem to figure out how to set it and how to get rid of the warning. Could you maybe post how it is correctly set?
Then refer to /usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake and then update below lines of it with the path you figured out previously (e.g. change targetfs to targetfs_a).
You need to understand how /usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake uses LD_PATH and LD_PATH_EXTRA to find the libEGL.so.1 and then you can manipulate your toolchain file accordingly. For example, you see “libEGL.so.1, needed by /usr/local/driveworks-2.2/targets/aarch64-Linux/lib/libnvinfer.so.5, not found (try using -rpath or -rpath-link)” so you should set CMAKE_SHARED_LINKER_FLAGS / CMAKE_MODULE_LINKER_FLAGS / CMAKE_EXE_LINKER_FLAGS with the paths.
If you can provide the package for my reproducing here, I can help you further.
yes, the Toolchain-V5L.cmake file is very complex and I am having a hard time completely understanding it. Therefore, I am extremely glad that you are helping me.
What do you mean by package? I am basically compiling the default samples with the default Toolchain-V5L.cmake file. I did not change anything. I am using it out-of-the-box. If you want, I can send you the Toolchain-V5L.cmake file.
Sorry that I didn’t know you are compling the default samples. If that’s the case, after installing DRIVE Software 10.0 you can browse file:///home/$USER/Documents/DRIVE_SW_10.0_References/DRIVE_Software/DRIVE_AV_doxy_files/dwx_samples_building_V5L.html and follow the steps there to cross compile the samples.
Below commands should work:
$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake -DVIBRANTE_PDK:STRING=$HOME/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/drive-t186ref-linux /usr/local/driveworks/samples
$ make -j