rainyl / opencv_dart

OpenCV bindings for Dart language and Flutter. Support Asynchronous Now!
https://pub.dev/packages/opencv_dart
Apache License 2.0
112 stars 14 forks source link

Cannot run macOS app because of ffmpeg version mismatch #31

Closed azlekov closed 5 months ago

azlekov commented 5 months ago

Describe the bug Recently homebrew updates my ffmpeg to version 7, while it looks like the project is searching for version 6

To Reproduce Steps to reproduce the behavior:

  1. Have a working project
  2. Execute brew update which will update ffmpeg
  3. Try running the app
  4. See error:
dyld[58652]: Library not loaded: /opt/homebrew/opt/ffmpeg/lib/libavcodec.60.dylib
  Referenced from: <292CC2EA-6E11-35F9-B2DF-1DF95AE7FE94> /Users/azlekov/Workspace/biokom-flow/build/macos/Build/Products/Debug/Biokom Flow.app/Contents/Frameworks/libopencv_dart.dylib
  Reason: tried: '/opt/homebrew/opt/ffmpeg/lib/libavcodec.60.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/ffmpeg/lib/libavcodec.60.dylib' (no such file), '/opt/homebrew/opt/ffmpeg/lib/libavcodec.60.dylib' (no such file)

Expected behavior It should work as before

Desktop (please complete the following information):

Additional context I tried:

brew uninstall ffmpeg
brew install ffmpeg@6
flutter clean
flutter run

Still without success. Looks like the lib is located into /opt/homebrew/opt/ffmpeg@6/ instead of /opt/homebrew/opt/ffmpeg/

azlekov commented 5 months ago

Workaround:

ln -s /opt/homebrew/opt/ffmpeg@6 /opt/homebrew/opt/ffmpeg
rainyl commented 5 months ago

Yes, this package was compiled with ffmpeg@6, after you install ffmpeg@6 with brew, it will tell you to link, you can use brew link --overwrite ffmpeg@6 to link it

rainyl commented 5 months ago

Wait, I double checked CI of Macos, It seems ffmpeg is not correctly configured, I am working on it. https://github.com/rainyl/opencv.full/actions/runs/8722998969/job/23930165038

azlekov commented 5 months ago

Yes, this package was compiled with ffmpeg@6, after you install ffmpeg@6 with brew, it will tell you to link, you can use brew link --overwrite ffmpeg@6 to link it

I already tried, but unfortunately seems not to be working:

brew unlink ffmpeg@6 && brew link --force ffmpeg@6
Unlinking /opt/homebrew/Cellar/ffmpeg@6/6.1.1... 111 symlinks removed.
Linking /opt/homebrew/Cellar/ffmpeg@6/6.1.1... 111 symlinks created.
rainyl commented 5 months ago

Which version? I tested the example with v1.0.1 and it worked. Could you please paste the full log?

azlekov commented 5 months ago

Yes, with v1.0.1 is working fine! Thanks! What was the issue?

rainyl commented 5 months ago

You are welcome, if no further problems please close this issue.

azlekov commented 5 months ago

Tested on another machine, where I have faced same issue. Not seems to be resolved! Thanks again!