Issue Description: Simple app cross-compilation from a docker container to the AGX Orin.
Hello all,
I have a docker container with the DriveOS 6.0.10 installed on a x86 machine and a AGX Orin DriveKit.
I have build a small cpp code that sets up a GMSL camera and is going to send the stream to a QT app, ROS 2 node, or whatever I need. Using the driveworks libraries like dw/sensors/camera/Camera.h, Sensors.h, etc.
I want to cross-compile this simple code in my x86 docker container and copy it to my AGX Orin DriveKit, using a command like:
But all I get is /drive/toolchains/aarch64--glibc--stable-2022.03-1/bin/../lib/gcc/aarch64-buildroot-linux-gnu/9.3.0/../../../../aarch64-buildroot-linux-gnu/bin /ld: cannot find -ldriveworks
I have tried finding libdriveworks.* but that file seems to not be present in the system. Libcudart.* is present in /drive/drive-linux/filesystem/targetfs/usr/local/cuda/targets/aarch64-linux/lib/libcudart.so.
I believe I have all the cross-compile tools installed as the docker image was build with all options selected.
It is also possible (and likely) that I am not doing this correctly.
Turns out I was doing it incorrectly and I have since made a simple cmake to cross compile, however when transfered to my drivekit from the docker, it seg faults straight away.
The main code simply prints something on the screen: #include <dw/core/context/Context.h> #include <dw/core/base/Version.h> #include <iostream> int main() { dwContextHandle_t context = DW_NULL_HANDLE; dwContextParameters params{}; dwStatus status = dwInitialize(&context, DW_VERSION, ¶ms); if (status != DW_SUCCESS) { std::cout << "dwInitialize failed: " << status << std::endl; return -1; } dwVersion version{}; dwGetVersion(&version); std::cout << "Hello DriveWorks " << version.major << "." << version.minor << "." << version.patch << std::endl; dwRelease(context); return 0; }
Dear @p.ramos ,
Could you include this code in directory and keep it inside as a DW sample directory and make changes in DW make file to include your directory. This helps to build your sample along with DW sample with out any issue. Could you check that ?
I was suspecting the code itself to be fault but must be the cmake config. Is there a base cmake config or a tutorial for building and compiling smaller Cpp scripts available? If not I will adapt the sample ones.