smartmicro / smartmicro_ros2_radars

ROS2 support for smartmicro radars.
Apache License 2.0
41 stars 19 forks source link

Building for arm64 architecture #7

Closed mad0x60 closed 2 years ago

mad0x60 commented 2 years ago

I am trying to cross-build the docker container on an amd64 machine for an arm64 target. The build fails when calling the colcon build command and I get the following error:

Starting >>> umrr_ros2_driver [Processing: umrr_ros2_driver]

--- stderr: umrr_ros2_driver
/usr/bin/ld: ../../smartmicro/lib/libsmart_access.so: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/smartmicro_radar_node.dir/build.make:156: libsmartmicro_radar_node.so] Error 1 make[1]: [CMakeFiles/Makefile2:329: CMakeFiles/smartmicro_radar_node.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... /usr/bin/ld: ../../../smartmicro/lib/libsmart_access.so: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status make[2]: [smartmicro/CMakeFiles/osal.dir/build.make:191: smartmicro/libosal.so] Error 1 make[1]: [CMakeFiles/Makefile2:1040: smartmicro/CMakeFiles/osal.dir/all] Error 2 make: [Makefile:141: all] Error 2

Failed <<< umrr_ros2_driver [6min 15s, exited with code 2]

Summary: 0 packages finished [6min 16s] 1 package failed: umrr_ros2_driver 1 package had stderr output: umrr_ros2_driver root@c1e8a1839cff:/colcon_ws#

My build command is as follows: docker build --platform=arm64 . -t umrr-ros:latest And My run command is as follows: docker run -it --rm --platform linux/arm64 umrr-ros:latest sh

Both the host and the target run Ubuntu.

smartSRA commented 2 years ago

This would not work as the libs for smart access do not support arm64 architecture. This has been explained also per our email correspondence through our support team. Will keep you updated with the upcoming developments. :)

I am closing this and the issue #2 is already tracking this.