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

AppImage on Gentoo - Cannot find libmpv at the usual places #643

Closed
1 task done
patomas opened this issue Aug 21, 2023 · 13 comments
Closed
1 task done

AppImage on Gentoo - Cannot find libmpv at the usual places #643

patomas opened this issue Aug 21, 2023 · 13 comments
Labels
bug Something isn't working wontfix / Alternatively patched This will not be worked on or it's already patched using an alternative method

Comments

@patomas
Copy link

patomas commented Aug 21, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

After attempting to launch the AppImage file, it outputs the following message:

`package:media_kit_libs_linux registered.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Cannot find libmpv at the usual places. Depending upon your distribution, you can install the libmpv package to make shared library available globally. On Debian or Ubuntu based systems, you can install it with: apt install libmpv-dev.

#0 NativeLibrary.ensureInitialized (package:media_kit/src/player/native/core/native_library.dart:73)
#1 nativeEnsureInitialized (package:media_kit/src/player/native/player/real.dart:48)
#2 MediaKit.ensureInitialized (package:media_kit/src/media_kit.dart:25)
#3 main (package:spotube/main.dart:80)
#4 _runMain. (dart:ui/hooks.dart:129)
#5 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:296)
#6 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189)

`

Expected Behavior

The app should open

Steps to reproduce

  1. Downloaded the AppImage from the link on github ( https://github.com/KRTirtho/spotube/releases/latest/download/Spotube-linux-x86_64.AppImage )
  2. Made the image executable with chmod +x
  3. On the console, on the same folder as the appimage file, as a normal user executed ./Spotube-linux-x86_64.AppImage
  4. Got the error posted before
  5. (just for testing) As a root got the same message

Operating System

Linux 6.1.28-gentoo #6 SMP PREEMPT_DYNAMIC Fri Aug 11 09:39:20 +08 2023 x86_64 12th Gen Intel(R) Core(TM) i5-12600K GenuineIntel GNU/Linux

Spotube version

3.1.0

Installation source

GitHub Releases (Binary)

Additional information

Packages installed related to this software:

  1. mpv
    • mpv 0.35.1 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
  2. fuse
    • 2.9.9-r2
  3. libmpv locations
    • /usr/lib64/libmpv.so
    • /usr/lib64/libmpv.so.2
    • /usr/lib64/libmpv.so.2.0.0

Other appimage files work fine.

There seems to be a similar situation with Fedora reported, Can't install on Feodra 38 but since it is a different OS with some differences to Gentoo, I'm making a new report.

I tried the solution mentioned by RTTEXFile about a symbolic link but it didn't work. I tried copying the files to other common library folders, but that didn't work either.

@patomas patomas added the bug Something isn't working label Aug 21, 2023
@servusdei2018
Copy link

servusdei2018 commented Aug 21, 2023

@patomas

Upon inspection, the spotube AppImage appears to overwrite LD_LIBRARY_PATH with usr/lib. I'm not sure about the specifics of your system, however regardless of whether usr/lib exists or not, usr/lib/libmpv.so definitely doesn't.

  1. Extract the AppImage: ./Spotube-linux-x86_64.AppImage --appimage-extract (extracts contents into squashfs-root)
  2. Edit squashfs-root/AppRun and change export LD_LIBRARY_PATH=usr/lib to export LD_LIBRARY_PATH=usr/lib64
  3. Launch spotube by executing ./squashfs-root/AppRun

Edit: This issue has been generalized and filed upstream at leanflutter/flutter_distributor#139

@KRTirtho
Copy link
Owner

Oops sorry, I wrote that part of code & made that mistake 😅. But usr/lib is inside AppImage which isn't equivalent of /usr/lib if I'm not wrong

So how does /usr/lib64 affect AppImage? Also libmpv is shipped with the AppImage including many other shared objects (.so) so it shouldn't even require one to install libmpv or mpv at all

@patomas
Copy link
Author

patomas commented Aug 23, 2023

I still have to try the extract option to test it but will do as soon as possible.

I tried a couple of locations copying libmpv.so but none worked.

Reading about the overwriting, I'll keep an eye on the referenced report to see how this evolves.

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 2, 2023

Weird thing is libmpv.so & libmpv.so.2 is already embedded in the appimage

@duckwoqei
Copy link

Same error here:
Spotube 3.1.1
Linux tux 5.15.52-gentoo-dist #1 SMP Sun Jul 3 05:21:48 -00 2022 x86_64 AMD Phenom(tm) II X4 965 Processor AuthenticAMD GNU/Linux

SOLVED:
Following suggestion by @servusdei2018:

  1. Extract the AppImage: ./Spotube-linux-x86_64.AppImage --appimage-extract (extracts contents into squashfs-root)
  2. Edit squashfs-root/AppRun and change export LD_LIBRARY_PATH=usr/lib to export LD_LIBRARY_PATH=usr/lib64
  3. Emerging dev-libs/libappindicator
  4. Launch spotube by executing ./squashfs-root/AppRun

is now working for me

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 2, 2023

Btw there's a .tar.xz available which you use to manually install the app

@patomas
Copy link
Author

patomas commented Sep 3, 2023

I tried the unpacking option suggested before and the I had another problem, delated to libappindicator, which I solved installing that package ( emerge libappindicator ) since I'm in Gentoo.

Then I had the following error message
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPlatformDirectoryException(Unable to get application documents directory), I followed the answer from orange-kao and installed ( emerge xdg-user-dir ) and then the program started.

Then I got a message about encryption but that seems to be another issue.

So for now, I believe there is a path that you can follow to add the mentioned libraries to have a full appimage.

Thanks for the help and effort with this nice package

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 3, 2023

These are the AUR dependencies 'mpv' 'libappindicator-gtk3' 'libsecret' 'jsoncpp' 'libnotify'
Make sure to include Gentoo equivalent of these deps

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 3, 2023

Can anyone contribute with a ebuild script for Spotube? It'll be better than AppImage

The aur PKGBUILD can followed https://github.com/KRTirtho/spotube/blob/master/aur-struct/PKGBUILD

@patomas
Copy link
Author

patomas commented Sep 3, 2023

I can try to do it, but I haven't done it before. It may be a good excercise for me. I'll try this week

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 3, 2023

Yea sure give it a try. It'll be a helpful for a lot of users & kind of a milestone for this app 💪

I mean how many flutter apps are there that are installable on Gentoo without manual work?! 😄

@xAlpharax
Copy link

xAlpharax commented Oct 16, 2023

I encountered this problem as well:

This indicates that one or more required dependencies could not be located.

Refer to "Installation" section of the README for further details:
GitHub  : https://github.com/media-kit/media-kit#installation
pub.dev : https://pub.dev/packages/media_kit#installation

TIP: Copy-paste required packages from the above link to your pubspec.yaml.

If you recently added the packages, make sure to re-run the project ("hot-restart" & "hot-reload" is not sufficient for native plugins).
--------------------------------------------------------------------------------

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Cannot find libmpv at the usual places. Depending upon your distribution, you can install the libmpv package to make shared library available globally. On Debian or Ubuntu based systems, you can install it with: apt install libmpv-dev.
#0      NativeLibrary.ensureInitialized (package:media_kit/src/player/native/core/native_library.dart:78)
#1      nativeEnsureInitialized (package:media_kit/src/player/native/player/real.dart:47)
#2      MediaKit.ensureInitialized (package:media_kit/src/media_kit.dart:26)
#3      main (package:spotube/main.dart:43)
<asynchronous suspension>

I have yet to try the guide from @servusdei2018.

Updated: The guide didn t work for me

@KRTirtho KRTirtho mentioned this issue Dec 2, 2023
1 task
@KRTirtho
Copy link
Owner

KRTirtho commented Aug 13, 2024

We dropped support for AppImage as it has become a burden for us to maintain both the AppImage packager and format for flutter_distributor which hinders the actual development of the app.

Spotube is available for all Linux distro through Flathub (flatpak)

@KRTirtho KRTirtho closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2024
@KRTirtho KRTirtho added the wontfix / Alternatively patched This will not be worked on or it's already patched using an alternative method label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix / Alternatively patched This will not be worked on or it's already patched using an alternative method
Projects
None yet
Development

No branches or pull requests

5 participants