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

Ubuntu 18.04, failed to open ppsspp core (cannot open shared library libGLEW.so.2.0) #41

Open
exerf opened this issue Jan 20, 2021 · 4 comments

Comments

@exerf
Copy link

exerf commented Jan 20, 2021

I've installed the retroarch snap (1.9.0) on Ubuntu 18.04 and so far I've been pleased with how I can use the in-app core updater to update cores (unlike the version of retroarch in the Ubuntu repository that disables that feature).

Unfortunately, the latest version of the ppsspp core that retroarch fetches (533a133) exhibits some glitchy graphics behavior in the game I'm trying to run, and so my goal is to try out different versions of the ppsspp core in hopes of finding a version that fixes the glitchy-ness.

I've built a fresh ppsspp core (v1.10.3) from source (via ./b.sh --libretro) and I'm trying to use that core with my existing retroarch snap setup. I've copied the new core to the appropriate location, which in my case is ~/snap/retroarch/423/.config/retroarch/cores/. However, whenever I try to load my built-from-source ppsspp core from within retroarch, I get the following error message in my retroarch log:

[ERROR] Failed to open libretro core: "/home/user/snap/retroarch/423/.config/retroarch/cores/ppsspp_libretro.so"
[ERROR] Error(s): libGLEW.so.2.0: cannot open shared object file: No such file or directory

Now, I know that I have libGLEW.so.2.0:

$ ls -l /usr/lib/x86_64-linux-gnu/libGLEW*      
lrwxrwxrwx 1 root root     16 Aug 24  2017 /usr/lib/x86_64-linux-gnu/libGLEW.so -> libGLEW.so.2.0.0
lrwxrwxrwx 1 root root     16 Aug 24  2017 /usr/lib/x86_64-linux-gnu/libGLEW.so.2.0 -> libGLEW.so.2.0.0
-rw-r--r-- 1 root root 587816 Aug 24  2017 /usr/lib/x86_64-linux-gnu/libGLEW.so.2.0.0

And furthermore, I would think that this is not a library path issue given that ldd seems to be able to find the library:

$ ldd snap/retroarch/423/.config/retroarch/cores/ppsspp_libretro.so   # This is for ppsspp v1.10.3
	linux-vdso.so.1 (0x00007fff1bffa000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3369ef7000)
	libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f3369cc5000)
	libGLEW.so.2.0 => /usr/lib/x86_64-linux-gnu/libGLEW.so.2.0 (0x00007f3369a30000)
	libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f33697a4000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f33695a0000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f3369383000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3368ffa000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3368c5c000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3368a44000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3368653000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f336b2f2000)
	libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f3368422000)
	libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f336816c000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f3367e34000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f3367c0c000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f3367a08000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f3367802000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f33675ed000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f33673e5000)

I found a similar issue on this topic, though I'm not sure if the underlying cause is the same in this case.

I've tried building several different versions of the ppsspp core, ranging from very recent to about 18 months old, and they all seem to fail to load in the same way as above.

Any help would be appreciated. Thank you!

@hizzlekizzle
Copy link
Collaborator

If a core has additional, external dependencies that aren't statically linked / baked-in, those libs have to be linked into the snap at compile time. That is, it won't gracefully fall back to your system libs. So, we'll have to add libglew2.1 to the staging packages in the snap to have it included.

@exerf
Copy link
Author

exerf commented Jan 20, 2021

Thanks so much, @hizzlekizzle! When you get around to this, let me know and I'll happily test out the changes locally.

@exerf
Copy link
Author

exerf commented Jan 23, 2021

@hizzlekizzle Just in case this matters, I thought I'd mention that there are two other library dependencies in the latest ppsspp core that are not present in the latest version (533a133) fetched by snap. You already know about libGLEW, but it appears that we also have libpng16 and libz, which are not present in the ldd output for 533a133:

$ ldd ppsspp_libretro.so    # This is for ppsspp 533a133
	linux-vdso.so.1 (0x00007ffe6bd80000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5ecd044000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5ecce40000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5eccc21000)
	libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f5ecc995000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5ecc60c000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5ecc26e000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5ecc056000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5ecbc65000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f5ece27f000)
	libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f5ecba34000)
	libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f5ecb77e000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f5ecb446000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f5ecb21e000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f5ecb01a000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f5ecae14000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f5ecabff000)

@exerf
Copy link
Author

exerf commented Jul 17, 2021

@hizzlekizzle FYI, I have since moved on to a newer system with Ubuntu 20.04 (where ppsspp works fine), so I'll leave it up to you as to whether you want to leave this issue open. Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants