EFDos / mupengui

Mupen64plus frontend designed based on Elementary OS guidelines.
GNU General Public License v3.0
11 stars 6 forks source link

Error: Failed to load Mupen64Plus Dynamic Library. Error code: 6 #15

Open lwturkjr opened 3 years ago

lwturkjr commented 3 years ago

mupen64pluslib_path /usr/lib/x86_64-linux-gnu/libmupen64plus.so.2M64API Error: dlopen('/usr/lib/x86_64-linux-gnu/libmupen64plus.so.2') (com.github.efdos.mupengui:219743): ERROR: Mupen64API.vala:162: Error: Failed to load Mupen64Plus Dynamic Library. Error code: 6

This error happens when running the command, using Arch 5.9.11-arch2-1, after using the AUR package to install, from what I was able to find, it is becuase the lib path is hardcoded into SettingsProfileManager.vala file. I'm not sure how the package manager for Arch missed this? unless they have has /usr/lib/x86_64-linux-gnu, setup on their build/test machine or they had profiles.cfg setup prior to testing it. The issue I identified is related to lines: 128 and 129 (Granted the aur package was last updated 2019-07-30 16:51)

key_file.set_string(name, "mupen64lib-path", "/usr/lib/x86_64-linux-gnu/libmupen64plus.so.2");
key_file.set_string(name, "plugins-dir", "/usr/lib/x86_64-linux-gnu/mupen64plus/");

changing those lines to align with my system would look like this

key_file.set_string(name, "mupen64lib-path", "/usr/lib/libmupen64plus.so.2");
key_file.set_string(name, "plugins-dir", "/usr/lib/mupen64plus/");

Making those changes allowed for building and launching of the program.

I'm not super familair with vala, or c for that matter, is there a way to get the lib and plugins-dir path from the enviroment? I'm not sure if this is something that should be patched by using the PKGBUILD script or if it should be changed in the main code, I understand most common distros use the /lib/x86_64-linux-gnu directory and i understand the difficulty of maintaining code across multiple dsitributions. The other solution that works, I suppose after installing modifying the profiles.cfg to align with the correct paths for your system so something like this (on mine).

[Global]
mupen-conf-path=/home/user/.config/mupen64plus/Global
video-plugin=mupen64plus-video-glide64mk2.so
audio-plugin=mupen64plus-audio-sdl2.so
input-plugin=mupen64plus-input-sdl.so
rsp-plugin=mupen64plus-rsp-z64.so
mupen64lib-path=/usr/lib/libmupen64plus.so.2
plugins-dir=/usr/lib/mupen64plus/

I'm also not sure if/how this would affect non-Arch distros, since Arch doesn't seem to use the /usr/lib/x86_64-linux-gnu/ directory while other distros like Debian and Ubuntu do.

Like I said I'm not super familair with vala or c, but it seems like there should be a way to not have to have it hardcoded the way it is. Anyway I Thought I'd bring it up.

Germethefurfur commented 3 years ago

Hi! Im a debian user, i got that error but i have installed libmupen64plus2 and libmupen64plus-dev and it worked without problems!

Germethefurfur commented 3 years ago

It will be nice if the README.md put the "libmupen64plus2 and libmupen64plus-dev libs are required"...

tegaidogun commented 2 years ago

Thank you lwturkjr, I didn't know what it was until I saw your report just now. I use Arch so I and also installed mupen64 using the AUR repository.