Borrar filtros
Borrar filtros

I try to cross compile host computer and Jetson Xavier, made by matlab coder

3 visualizaciones (últimos 30 días)
I try to compile c++ code generated by matlab coder on Jetson Xavier, ROS, using cmake.
I success generating c++ code without ploblem.
but I got a ploblem when compilingg on Xavier. I think error occured beacause of cross compile.
when I generate c++ code by matlab coder, select option nvidia jetson and GNU linux64bit and static library (.a)
I need your help
Thanks.
below is error code
/usr/bin/ld: /home/nvidia/catkin_ws/src/realtime_inpainting/src/wrapper/wrapper.a(wrapper.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /home/nvidia/catkin_ws/src/realtime_inpainting/src/wrapper/wrapper.a(wrapper.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /home/nvidia/catkin_ws/src/realtime_inpainting/src/wrapper/wrapper.a(wrapper.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /home/nvidia/catkin_ws/src/realtime_inpainting/src/wrapper/wrapper.a(wrapper.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /home/nvidia/catkin_ws/src/realtime_inpainting/src/wrapper/wrapper.a(wrapper.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /home/nvidia/catkin_ws/src/realtime_inpainting/src/wrapper/wrapper.a(wrapper.o): Relocations in generic ELF (EM: 62)
/home/nvidia/catkin_ws/src/realtime_inpainting/src/wrapper/wrapper.a: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
realtime_inpainting/CMakeFiles/inpainting_cuda.dir/build.make:131: recipe for target '/home/nvidia/catkin_ws/devel/lib/realtime_inpainting/inpainting_cuda' failed
make[2]: *** [/home/nvidia/catkin_ws/devel/lib/realtime_inpainting/inpainting_cuda] Error 1
CMakeFiles/Makefile2:7310: recipe for target 'realtime_inpainting/CMakeFiles/inpainting_cuda.dir/all' failed
make[1]: *** [realtime_inpainting/CMakeFiles/inpainting_cuda.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
  2 comentarios
David Fink
David Fink el 4 de Mayo de 2020
Based on some forums with the same error, it seems like the compiler and linker are building for different architectures, so the linker isn't very happy with the object files the compiler produced.
If you're building for Jetson, don't you need to use nvcc as the linker instead of usr/bin/ld?
Ramakrishna Mandalapu
Ramakrishna Mandalapu el 19 de Jul. de 2021
Hi DaHoon,
Could you please give some more info on the settings you did in the model? I am little confused about the option GNU linux64bit, where did you set this option?
Thanks,
Ramakrishna

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB Coder en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by