Cross compiling 3rd party libraries onto target

Hardware Platform: DRIVE AGX Pegasus™ Developer Kit
Software Version: DRIVE Software 10
Host Machine Version: Ubuntu 18.04
SDK Manager Version:


I am trying to develop code with a 3rd party library and cross compile it onto the target. I successfully imported the 3rd party library into a driveworks sample, which I used as a starting point, and used the library for a self-developed application. On the host, everything works perfectly fine. I am able to run the code with the imported library. The 3rd party library I am using is darknet/yolo.

However, when I try to cross-compile the application onto the target, I get the following error when performing “make -j” after the “cmake” command:

/home/.../darknet/ error adding symbols: File in wrong format

I am not quite sure why this is happening. Is there a way to resolve this?

I would appreciate any help. Thanks in advance.

Hi @kn10,

I guess it’s due to the library isn’t for aarch64. You can run “file” commond on the library to check it.

Does this mean that libraries that are not explicitly developed for aarch64 cannot be cross compiled?

Is there any way to enable popular libraries like yolo on the target?

Below topics look other developers tried to do the same thing (cross/native compilation).
I think you can message them directly to get their help.