MATLAB Answers

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

19 views (last 30 days)
DaHoon Jeong
DaHoon Jeong on 29 Apr 2020
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 Comments
Ramakrishna Mandalapu
Ramakrishna Mandalapu on 19 Jul 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

Sign in to comment.

Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!