TeamHypersomnia / Hypersomnia

Multiplayer top-down shooter made from scratch in C++. Play in your Browser! https://hypersomnia.io Made in 🇵🇱
https://hypersomnia.io/
GNU Affero General Public License v3.0
1.14k stars 49 forks source link

Error while loading shared libraries: libunwind.so.1 #271

Closed David-Valters closed 1 year ago

David-Valters commented 1 year ago

./Hypersomnia: error while loading shared libraries: libunwind.so.1: cannot open shared object file: No such file or directory

but libunwind-1.6.2-2 is already installed

OS: Arch Linux

release_notes.txt:

1.2.8309 fee76723859175292afc70872cdbd0fbfc36c7b1 Fix build error

geneotech commented 1 year ago

This is a known error - for now you have to symlink the libunwind library on your system to point to libunwind.so.1, e.g. sudo ln -s /usr/lib/libunwind.so.8 /usr/lib/libunwind.so.1

David-Valters commented 1 year ago

This is a known error - for now you have to symlink the libunwind library on your system to point to libunwind.so.1, e.g. sudo ln -s /usr/lib/libunwind.so.8 /usr/lib/libunwind.so.1

why does such a problem exist at all, and what is the difficulty of solving it? (interested as a developer)

geneotech commented 1 year ago

As you have noticed, Arch Linux ships its libunwind library under a different name and the executable cannot find it. The executable is built on an Ubuntu server and thus launches flawlessly on Ubuntu distros. We're working on a workflow that'll produce AppImage executables able to run on all distros out-of-the-box - see: https://github.com/TeamHypersomnia/Hypersomnia/pull/270

As for the dependency, it looks like LLVM's libc++ is using it to unwind the stack when handling exceptions. I've been trying to remove that dependency (even today actually) but have been unsuccessful so far. Surprisingly, building the same application on Arch Linux does not produce that libunwind.so.1 dependency, whereas building on Ubuntu does.

geneotech commented 1 year ago

Hey there! We're now shipping the game in the portable AppImage format. This should solve all problems you have experienced with the missing libraries:

https://hypersomnia.xyz/builds/latest/Hypersomnia.AppImage