question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error : libmediapipe_c.dylib: mach-o, but wrong architecture

See original GitHub issue

Plugin Version or Commit ID

adb2d90

Unity Version

2021.3.6f1 (Apple Silicon)

Your Host OS

M1 Mac

Target Platform

iOS

[Windows Only] Visual Studio C++ and Windows SDK Version

No response

[Linux Only] GCC/G++ and GLIBC Version

No response

[Android Only] Android Build Tools and NDK Version

No response

[iOS Only] XCode Version

XCode 13.2

Command Sequences

First, DIINotFoundException: mediapipe_c assembly error occurred. so, I followed this issue(#640), but libmediapipe_c.dylib: mach-o, but wrong architecture occurs.

I entered the commands below in order

  1. python build.py build --desktop cpu --opencv cmake -vv
  2. python3 build.py build --desktop cpu --ios arm64 -vv

Pleas help me.

Log

Plugins: Couldn’t open /Users/yechanjeon/MediaPipeUnityPlugin-master/Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dylib, error: dlopen(/Users/yechanjeon/MediaPipeUnityPlugin-master/Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dylib, 2): no suitable image found. Did find: /Users/yechanjeon/MediaPipeUnityPlugin-master/Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dylib: mach-o, but wrong architecture /Users/yechanjeon/MediaPipeUnityPlugin-master/Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dylib: mach-o, but wrong architecture

Additional Context

image image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
homulercommented, Aug 1, 2022

Good. I guess the cause is one of the followings:

  • The session used to build libraries was started with Rosetta.
  • python3 is an alias to an x86-64 Python executable (and started with Rosetta).
    • lipo -archs Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dylib
  • The OpenCV linked to libmediapipe_c.dylib was broken.
  • The running UnityEditor happens to be an Intel version.
1reaction
dayowoocommented, Aug 1, 2022

The build was finally successful when i entered python3 build.py build --desktop cpu --opencv cmake --macos_universal --ios arm64 -vv! Thank you. Thank you for the pre-built package introduction.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix the "mach-o, but wrong architecture" error in ...
Run a shell, run the command file $(which python3) and make sure the result on your machine includes an arm64 executable. Here's the...
Read more >
Mac M1 Mach-o, but wrong architecture #9561
I've installed what I need to with pip (to the best of my knowledge) but keep getting the same error when trying to...
Read more >
macOS mach-o, but wrong architecture
I am getting a strange error message when trying to load a dylib I've just built. ... xxx.dylib: mach-o, but wrong architecture
Read more >
M1 mac mini: Python reports `mach-o, but wrong architecture`
We've rented a M1 Mac Mini at a Cloud provider and installed python3 via homebrew. However, when installing packages, we see many errors...
Read more >
M1 architecture issue | Apple Developer Forums
I have an M1 MacBook Air! I tried installing 'keras' and 'tensorflow' packages in Rstudio. However I got an error. Then, I tried...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found