Runtime error due to cross comiplation error of driveworks sample

Hi,

I cross compiled according to doc “dwx_samples_building.html#cross-compilation”, with following script
But I get the following error.

Script

mkdir build
cd build (“/usr/local/driveworks/sample/build”)
sudo cmake -DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V4L.cmake
-DVIBRANTE_PDK:STRING=/home/wu/Downloads/driveinstall/VibranteSDK/vibrante-t186ref-linux
/usr/local/driveworks/samples

Error

CMake Error at cmake/Samples3rdparty.cmake:9 (find_package):
Could not find a package configuration file provided by “glfw3” with any of
the following names:

glfw3Config.cmake
glfw3-config.cmake

Add the installation prefix of “glfw3” to CMAKE_PREFIX_PATH or set
“glfw3_DIR” to a directory containing one of the above files. If “glfw3”
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:31 (include)

– Configuring incomplete, errors occurred!

If I try to cross compile driveworks sample code in “samples” folder with above script, I can compile
but when I try to run the output binary on drive px2 target, I get error like “Format Error”.
So I think this might be cross compilation error due to settings.

Regards,
Leo

Hello kakpple,

Could you please check your host system environment?
Please see file:///usr/local/driveworks-0.3/doc/nvdwx_html/dwx_samples_building.html on DrivePX2. Thanks.

Hi,

I already checked and followed the docs you mentioned.

While I try to build inside ‘/samples’ folder, I can compile and make.
but when I try to build inside ‘build’ folder as in the docs rather than ‘samples’ folder, I get the above error.

But when I compile inside ‘samples’ folder with cross compile cmake option, it still compiles in x64 mode.

Hi, this issue is solved,
the problem was drivewors lib for drivepx2 was not installed,
So I re-installed the driveworks again, and the compilation works.