Snaipe / Mimick

A KISS, cross-platform C mocking library
MIT License
152 stars 43 forks source link

Architecture 'armv7l' is not supported. / Raspberry PI OS Buster #17

Open karel-ok opened 4 years ago

karel-ok commented 4 years ago

Hello, when I build the ROS2, I get the error message: Architecture 'armv7l' is not supported.

HW:

  Raspberry PI 4

OS:

  PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"   NAME="Raspbian GNU/Linux"   VERSION="10 (buster)"

mimick version:

$ git describe --tags
0.2.2-1-g06f4b3f
$ git rev-parse HEAD
06f4b3f3f98db1446c8751f27ff1b25bb73e4d8f

Issue:

Getting build error when building ROS2 on Raspberry OS Buster. I follow tutorial Foxy/Linux-Development-Setup/.

[Processing: mimick_vendor, orocos_kdl, rviz_ogre_vendor, urdfdom]                  
--- stderr: mimick_vendor                                                           
CMake Error at CMakeLists.txt:88 (message):
  Architecture 'armv7l' is not supported.

make[2]: *** [CMakeFiles/mimick-ext.dir/build.make:106: mimick-ext-prefix/src/mimick-ext-stamp/mimick-ext-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/mimick-ext.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< mimick_vendor [57.1s, exited with code 2]

Workaround:

Adapt CMakeLists.txt line 62 to 89 to accept armv7l like:

     82   elseif (_ARCH MATCHES "armv7l")
     83      set (MMK_ARCH "arm")
     84      set (MMK_ABI "arm")
     85      set (MMK_BITS 32)
     86      set (MMK_ARCH_ARM 1)
rydb commented 4 years ago

Workaround:

Adapt CMakeLists.txt line 62 to 89 to accept armv7l like:

     82   elseif (_ARCH MATCHES "armv7l")
     83      set (MMK_ARCH "arm")
     84      set (MMK_ABI "arm")
     85      set (MMK_BITS 32)
     86      set (MMK_ARCH_ARM 1)

The issue https://github.com/ros2/mimick_vendor/issues/11 is open and we're trying to work on the issue. How do you apply the work around so that mimick_vendor uses your modified Mimick when building from its CMake file?

Snaipe commented 4 years ago

From the above discussion, it seems that ros has its own vendoring of Mimick, so it'll have to be fixed there. I'm open to PRs to add the relevant pattern matching.