ares-emulator / ares

ares is a cross-platform, open source, multi-system emulator, focusing on accuracy and preservation.
https://ares-emu.net
Other
989 stars 121 forks source link

Flatpak not picking up Librashader files #1608

Open ghost opened 2 months ago

ghost commented 2 months ago

Describe the bug Hiya, I created a PR to add Librashader to the Flatpak here: https://github.com/flathub/dev.ares.ares/pull/39 which installs the Librashader files to the Flatpak equivalent of the /usr/lib folder. However, the Flatpak doesn't seem to be picking up on these files.

If I compile ares and place the Librashader files in /usr/lib, Librashader works fine. I understand the Flatpak is unofficial and I tried to do as much as possible without seeking official support, but I'm not sure what's causing the Flatpak to not identify the Librashader files.

If this issue is outside the scope of ares (due to the unofficial packaging), I apologize and please feel free to close the issue!

To Reproduce

  1. Install the Flatpak with Librashader support here: https://github.com/flathub/dev.ares.ares/pull/39#issuecomment-2313715357
  2. Run it in a terminal, flatpak run dev.ares.ares
  3. The terminal will state: Failed to load librashader: shaders will be disabled

If you are interested in locating the actual Flatpak folders, you can find them at one of the below two locations (depending on how you installed ares):

Expected behavior

For ares to detect and load the Librashader files.

Screenshots N/A

Additional context N/A

remutro commented 2 months ago

Not sure if this is helpful or not, but I've run into issues with ares trying to find librashader.so on different Linux distributions as they have different lib directories. I've determined where it was looking by running "ldd ares" which lists out where the executable is looking for shared object files. It quickly became obvious what the expected lib directory was just by looking at all the entries in the output. And sure enough copying the librashader.so file into that lib directory worked as expected. So it seems to be distribution dependent. I have no how to deal with that in flatpak however, I was just manually compiling/installing.

Went back and looked, it was Ubuntu 24.04 and the correct lib directory for that distro was: /lib/x86_64-linux-gnu/ which was obvious from running 'ldd ares'