필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
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
David Fink
David Fink 2020년 5월 4일
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 2021년 7월 19일
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

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by