Build fails on aarch64 based devices (Jetson AGX Orin)
Closed this issue · 3 comments
Hey!
I am trying to build this project on an Nvidia Jetson AGX Orin which has an aarch64
based CPU. I am facing the following errors when I try to build it using cmake/make.
marmot@yunax:~/hebi-cpp-examples/build$ make
[ 14%] Built target _hebic++-obj
[ 14%] Linking CXX shared library libhebic++.so
/usr/bin/ld: /home/marmot/hebi-cpp-examples/hebi-cpp/hebi/lib/linux_x86_64/libhebi.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [hebi-cpp-debug/CMakeFiles/hebic++.dir/build.make:104: hebi-cpp-debug/libhebic++.so.3.5.1] Error 1
make[1]: *** [CMakeFiles/Makefile2:1702: hebi-cpp-debug/CMakeFiles/hebic++.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Additionally, I also tried to build only one part of this project which is kits/daisy
but still I face a similar error.
marmot@yunax:~/hebi-cpp-examples/kits/daisy/build$ make
[ 1%] Automatic MOC for target hebic++
[ 1%] Built target hebic++_autogen
[ 3%] Automatic MOC for target _hebic++-obj
[ 3%] Built target _hebic++-obj_autogen
[ 35%] Built target _hebic++-obj
[ 37%] Linking CXX shared library libhebic++.so
/usr/bin/ld: /home/marmot/hebi-cpp-examples/hebi-cpp/hebi/lib/linux_x86_64/libhebi.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [hebi-cpp-/CMakeFiles/hebic++.dir/build.make:121: hebi-cpp-/libhebic++.so.3.5.1] Error 1
make[1]: *** [CMakeFiles/Makefile2:383: hebi-cpp-/CMakeFiles/hebic++.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Please let me know if anyone needs any more information from my side.
Any guidelines to help resolve these errors are highly appreciated! :)
Thanks,
Aditya
Thanks for the report! It looks like the documentation was out of date here; sorry about that.
I've opened a PR to update the README here: #80
Can you let me know if this helps solve the problem? Basically, just add
-DLIBHEBI_TARGET_ARCHITECTURE=aarch64
to the cmake
command.
Awesome! I'm checking to see when this regression happened; I'll either push a fix that allows the -DARCH to work as listed, or merge the PR with the updated docs indicating -DLIBHEBI_TARGET_ARCHITECTURE.
Thanks for confirming, and sorry again for the issue!