フィルターのクリア

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

3 ビュー (過去 30 日間)
DaHoon Jeong
DaHoon Jeong 2020 年 4 月 29 日
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 Center および File ExchangeMATLAB Coder についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by