media-kit / media-kit

A cross-platform video player & audio player for Flutter & Dart.
https://github.com/media-kit/media-kit
MIT License
916 stars 132 forks source link

mpv not found on fedora linux #594

Closed wolf-coder closed 6 months ago

wolf-coder commented 6 months ago
CMake Error at flutter/ephemeral/.plugin_symlinks/media_kit_video/linux/CMakeLists.txt:16 (add_library):
  Target "media_kit_video_plugin" links to target "PkgConfig::mpv" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
alexmercerind commented 6 months ago

Feel free to share any workarounds/details you find. We don't provide binaries for GNU/Linux, because packages from distribution are used, which is responsibility of developers or users.

wolf-coder commented 6 months ago

Can I have guidance on resolving this issue. Could you please provide details on any specific modifications to the building process or additional steps that might be necessary to ensure the correct dependencies are detected during the build?

alexmercerind commented 6 months ago

I don't know unfortunately; never used Fedora.

alexmercerind commented 6 months ago

Also: #595.

Velosofy commented 6 months ago

Have you install mpv-libs ? not mpv-libs-devel

zyrouge commented 6 months ago

Have you install mpv-libs ? not mpv-libs-devel

I'm on Fedora and only installed mpv and mpv-devel. Afaik, mpv-libs was pulled by mpv-devel as a dependency.

andrey-utkin commented 6 months ago

On Fedora, the package needed is mpv-devel. It has pkg-config file /usr/lib64/pkgconfig/mpv.pc, and pkg-config util can find it, but cmake somehow can't. My workaround is to specify PKG_CONFIG_PATH.

export PKG_CONFIG_PATH=/usr/lib64/pkgconfig; flutter build linux

But I suspect I was unexpectedly using a flutter from snap. When I really removed it, I seemingly don't need this workaround.

wolf-coder commented 6 months ago

@andrey-utkin Which fedora version are you using?

andrey-utkin commented 6 months ago

I'm on Fedora 37.

JGNS commented 5 months ago

The same problem occurs on embedded devices. Does anyone have such experience? I have no way to use flutter to play videos in embedded linux. #638

fabioselau077 commented 5 months ago

The same problem occurs on embedded devices. Does anyone have such experience? I have no way to use flutter to play videos in embedded linux. #638

resolved? same here in in Ubuntu

hauserx commented 5 months ago

@fabioselau077 For Ubuntu you need sudo apt install libmpv-dev mpv as described on: https://github.com/media-kit/media-kit?tab=readme-ov-file#ubuntudebian

Later you may also face collect2: error: ld returned 1 exit status issue with solution described here (install media-kit manually instead of snap + install libstdc++-12-dev): https://github.com/media-kit/media-kit/issues/550

JGNS commented 5 months ago

@fabioselau077 For Ubuntu you need sudo apt install libmpv-dev mpv as described on: https://github.com/media-kit/media-kit?tab=readme-ov-file#ubuntudebian

Later you may also face collect2: error: ld returned 1 exit status issue with solution described here (install media-kit manually instead of snap + install libstdc++-12-dev): #550

I know this instruction, I have executed it。The special thing is that my ubuntu is not desktop ubuntu, but runs on an embedded device。see: #638 ,can you help me? thanks.

VShaikh commented 3 weeks ago

I am using Fedora 40, are below installations sufficient ? sudo dnf install mpv-devel-0.37.0-4.fc40.x86_64 sudo dnf install mpv-libs-0.37.0-4.fc40.i686 sudo dnf install mpv-0.37.0-4.fc40.x86_64

I installed all of above packages , I am still facing below error: CMake Error at flutter/ephemeral/.plugin_symlinks/media_kit_video/linux/CMakeLists.txt:16 (add_library): Target "media_kit_video_plugin" links to target "PkgConfig::mpv" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?