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 Beetle PSX HW core (version `GLIBCXX_3.4.26' not found) #43

Closed
exerf opened this issue Feb 27, 2021 · 10 comments

Comments

@exerf
Copy link

exerf commented Feb 27, 2021

I have retroarch snap (1.9.0) installed on Ubuntu 18.04.

I recently installed the Beetle PSX HW core from within retroarch. However, the core fails to load. The retroarch log contains the following:

[ERROR] Failed to open libretro core: "/home/user/snap/retroarch/423/.config/retroarch/cores/mednafen_psx_hw_libretro.so"
[ERROR] Error(s): /snap/retroarch/423/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/user/snap/retroarch/423/.config/retroarch/cores/mednafen_psx_hw_libretro.so)

Using the locate utility, I'm able to find various installations of libstdc++.so.6, including:

/snap/core/10583/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/snap/core/10583/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
/snap/core/10823/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/snap/core/10823/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
/snap/core18/1944/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/snap/core18/1944/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25
/snap/core18/1988/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/snap/core18/1988/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25
/snap/retroarch/418/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/snap/retroarch/418/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25
/snap/retroarch/423/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/snap/retroarch/423/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25

I'm assuming that, similar to what @hizzlekizzle explained in issue #41, the problem is that the version of libstdc++ compiled/linked into snap is too old. Running the strings utility on these libraries suggests that the latest supported version is GLIBCXX_3.4.25:

$ strings /snap/core18/1988/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_DEBUG_MESSAGE_LENGTH

(The output is the same for /snap/retroarch/423/usr/lib/x86_64-linux-gnu/libstdc++.so.6.)

Is it possible for me to upgrade libstdc++ in snap?

Would upgrading to Ubuntu 20.04 help? I'd prefer not to do this yet, but if it is beginning to get in the way of running retroarch, then I may do that sooner rather than later.

For the record, the Beetle PSX core runs fine.

@hizzlekizzle
Copy link
Collaborator

yes, this is a known mismatch between the system building the snaps (based on xenial) and the one in our infrastructure that's building the libs (based on bionic). It will resolve itself relatively soon, once the snapcraft infrastructure dumps xenial for bionic (I believe this is supposed to happen in April?)

We had discussed trying to configure an older VM for building cores, but I believe that plan was discarded (some combination of difficulty/hassle and the also being used to build some things that require the newer version, IIRC).

@exerf
Copy link
Author

exerf commented Feb 27, 2021

Thanks for that update, @hizzlekizzle. So if I understand correctly, snapd will automatically update libstdc++ within the next couple months, and at that point the new libstdc++ library should satisfy the GLIBCXX_3.4.26 requirement of the Beetle PSX HW core?

As a separate question, why are there so many copies of libstdc++ in the snap layout? I assume that the 10583 and 10823 represent the current and previous versions of the /snap/core install, but what is the difference between the one(s) in /snap/core/ and /snap/core18/? And how are those different from the one(s) in /snap/retroarch/ (which, again, I assume 423 is the latest version and 418 is the previous)?

Thanks for your help!

@hizzlekizzle
Copy link
Collaborator

I don't really know, tbh. I just know they purposely build everything on the oldest LTS they can, for maximum compatibility with whichever random distro someone might be using, but it bites us in this case because our cores are built against something newer. It's admittedly a niche use-case, so I can't really blame the snap folks for the problem (it happens with centrally-built flatpak and appimage packages, too). You might try our official appimage package to see if that treats you any better, though.

@inactive123
Copy link
Contributor

Hi @exerf ,

I just pushed this -

libretro/beetle-psx-libretro@4d97452

after the buildbot is done with this, I will give you a link to an artifact (basically the core with these changes), and you can check then if it works on your RetroArch Snap version.

@inactive123
Copy link
Contributor

Try these - this is the x64 beetle psx hw version -

https://git.libretro.com/libretro/beetle-psx-libretro/-/jobs/183529/artifacts/download

This is the x86 beetle psx hw version -

https://git.libretro.com/libretro/beetle-psx-libretro/-/jobs/183530/artifacts/download

@hizzlekizzle
Copy link
Collaborator

works for me, yeah

@exerf
Copy link
Author

exerf commented Mar 1, 2021

Oh wow, thank you @twinaphex! I'll try this out shortly.

@exerf
Copy link
Author

exerf commented Mar 1, 2021

Yay, it works! Thank you SO MUCH, @twinaphex! 🎮 🎉

@gouchi
Copy link
Member

gouchi commented Apr 25, 2021

@exerf please close this issue.

@exerf exerf closed this as completed Jul 17, 2021
@exerf
Copy link
Author

exerf commented Jul 17, 2021

Sorry for the delay, @gouchi. I didn't see your message until now.

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

4 participants