Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In mac platform, not used universal archtecture in makefile. #264

Closed
RajeshMGit opened this issue Oct 17, 2024 · 7 comments · Fixed by #262
Closed

In mac platform, not used universal archtecture in makefile. #264

RajeshMGit opened this issue Oct 17, 2024 · 7 comments · Fixed by #262
Labels
bug Something isn't working

Comments

@RajeshMGit
Copy link

RajeshMGit commented Oct 17, 2024

Describe the bug
In mac platform, not used universal archtecture in makefile.
opencv_dart/macos/Makefile
in above directory, that makefile contains below lines
LIB_NAME := "libopencv_dart-macos-$(OPENCV_DART_ARCH).tar.gz"
CVD_LIB_URL := "https://github.com/rainyl/opencv_dart/releases/download/v${VERSION}/$(LIB_NAME)"
so it seems like not using universal binary..
so if i build and run in apple chip mac device it not work in intel based mac devices..

To Reproduce
Steps to reproduce the behavior:

  1. combile and run in apple chip mac device
  2. copy and transfer that .app file to intel mac device
  3. click that .app file and install app
  4. it not working in intel mac devices.

Expected behavior
It should work both apple and intel based mac devices.

Desktop (please complete the following information):

  • OS: Macos
@RajeshMGit RajeshMGit added the bug Something isn't working label Oct 17, 2024
@rainyl
Copy link
Owner

rainyl commented Oct 17, 2024

@RajeshMGit This will be resolved in #262

@RajeshMGit
Copy link
Author

RajeshMGit commented Oct 17, 2024

i changed makefile to point to universal binary but still it not work for intel based devices any option to fix this issue.. or can you provide a updated makefile for mac platform to use universal binary

@rainyl
Copy link
Owner

rainyl commented Oct 18, 2024

Like I said before, this will be solved in #262 , but if you are urgent to make it work, try the following steps:

  1. export OPENCV_DART_DISABLE_AUTO_BUILD=1
  2. run dart run opencv_dart:setup macos -a os64 -f in the root directory of your project.
  3. build your app as normal

@RajeshMGit
Copy link
Author

It worked fine on an Apple M1 chip device. But after sending it through TestFlight and testing it on an Intel Mac, I got the following error.

Termination Reason: Namespace DYLD, Code 1 Library missing
Library not loaded: /usr/local/opt/ffmpeg@6/lib/libavcodec.60.dylib
Reason: tried: '/usr/local/opt/ffmpeg@6/lib/libavcodec.60.dylib' (no such file), '/usr/local/lib/libavcodec.60.dylib' (no such file), '/usr/lib/libavcodec.60.dylib' (no such file)
(terminated at launch; ignore backtrace)

@rainyl
Copy link
Owner

rainyl commented Oct 19, 2024

As it says, you need to install ffmpeg@6

If your app doesn't use ffmpeg, you may need the incoming opencv_core package.

@RajeshMGit
Copy link
Author

My document scanner app processes images for auto-cropping and applies filters like grayscale and black-and-white. I believe FFmpeg is not needed for this. Then how i get opencv_dart.dylib only for opencv_core

@rainyl
Copy link
Owner

rainyl commented Oct 25, 2024

opencv_core and opencv_dart version v1.3.0 have been published, you can now replace opencv_dart with opencv_core to avoid introducing ffmpeg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants