OpenXcom Forum

Modding => OpenXcom Extended => OXCE Builds & Ports => Topic started by: MoonKid on December 30, 2019, 03:39:49 pm

Title: [Solved] GNU/Linux Debian 10: error while loading shared libs: libSDL_gfx.so.15
Post by: MoonKid on December 30, 2019, 03:39:49 pm
Am I right here to post problems? Could not find a bugtracker or separate troblem-thread.

I downloaded the OXCE for Linux. But it is only a 7z file. No deb, install script or anything else.
But it does not run also.

See my bash output

drwxrwxr-x  7 user user 4,0K Nov 29 18:23 common/
drwxrwxr-x 43 user user 4,0K Nov 29 18:23 standard/
drwxrwxr-x  2 user user 4,0K Nov 29 18:23 TFTD/
drwxrwxr-x  2 user user 4,0K Nov 29 18:23 UFO/
-rwxrwxr-x  1 user user  13M Nov 29 18:23 OpenXcomEx*
 user  ~  Downloads  Extended-6.2-0be0cc2f8-2019-11-29-bionic-x86_64  ./OpenXcomEx
./OpenXcomEx: error while loading shared libraries: libSDL_gfx.so.15: cannot open shared object file: No such file or directory


Some packages are missing.
I installed
libsdl-gfx.1.2-5 libsdl-mixer1.2

It is working now.
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: Meridian on December 30, 2019, 03:48:32 pm
Everything as intended.

Exactly same as OpenXcom install instructions: https://www.ufopaedia.org/index.php/Installing_(OpenXcom)#Unix-like
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: MoonKid on December 30, 2019, 11:10:26 pm
I would recommand to package the install instructions with the download package instead.
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: Tchey on October 05, 2021, 11:06:27 am
Hello,

I know this was from 2019, but it’s still accurate i think.

I have the same error, i check the wiki, and read :

SDL_gfx (libsdl-gfx1.2), version 2.0.22 or later

I check my system (Manjaro) and i see i have 2.0.26-5, and all other libs related from the wiki.

I try to update (nothing, system up to date), restart my PC, and still :

Code: [Select]
./OpenXcomEx
./OpenXcomEx: error while loading shared libraries: libSDL_gfx.so.15: cannot open shared object file: No such file or directory


I play with the Windows version via WINE, as the Linux one doesn’t want to run.

What did i miss ?

Thanks
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: R1dO on October 05, 2021, 01:50:38 pm
First thing i would do is see if that lib is actually on the system using a different route (just in case there is something wrong with the package manager).

In this case the command (in terminal):
Code: [Select]
locate libSDL_gfxDepending on the manjaro design decisions it should return something like:
Quote
/usr/lib/x86_64-linux-gnu/libSDL_gfx.a
/usr/lib/x86_64-linux-gnu/libSDL_gfx.so
/usr/lib/x86_64-linux-gnu/libSDL_gfx.so.15
/usr/lib/x86_64-linux-gnu/libSDL_gfx.so.15.9.1
/usr/lib/x86_64-linux-gnu/libSDL_gfx.so.5
What does it return for you?

You also mention playing via wine.
So the question comes to mind: The error you mentioned does that happen when playing via wine or when trying the linux version (and hence the error is the reason you have to play via wine)?
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: Tchey on October 05, 2021, 03:02:01 pm
Thanks

Second one is correct : i play via WINE because i cannot launch the Linux version (libSDL_gfx.so.15: cannot open shared object file: No such file or directory)

I do this : locate libSDL_gfx, and it returns nothing at all.
My terminal is just showing the prompt again, no error, no nothing.

I check my manager, and i see sdl_gfx is already installed.
So, i remove it from the manager, reboot, reinstall, reboot, and still nothing, but show "installed" anyway in the manager.
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: ontherun on October 05, 2021, 03:03:42 pm
As i read in this thread (https://openxcom.org/forum/index.php/topic,4102.msg54640.html#msg54640) i'd advice to use the following command:

Code: [Select]
sudo apt install --no-install-recommends libsdl1.2debian libsdl-gfx1.2-5 libsdl-image1.2 libsdl-mixer1.2
use the recommend options to avoid unnecessary dependencies. Since ubuntu is a more "bleedin edge" than debian the gfx is slightly more updated than the Debian one. Please give a try and let us know  :)
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: Tchey on October 05, 2021, 03:26:44 pm
Hm, i’m on Linux Manjaro, not Debian/Ubuntu, and the manager says i have version sdl_gfx 2.0.26-5, installed.
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: R1dO on October 05, 2021, 09:48:31 pm
...
I do this : locate libSDL_gfx, and it returns nothing at all.
My terminal is just showing the prompt again, no error, no nothing.
...

No worries, that was probably a bad assumption on my part, i'm so used to that command i sometimes forget it might work different (or not at all) on other systems.

As for your problems: It seems you did nothing wrong, you are just having bad luck.

Please note that the remainder of this post is heavily based on information i found for "Arch Linux", since "Manjaro" is a derivative the results should be applicable for your system.

Turns out that "sdl_gfx" on manjaro provides "libSDL_gfx.so.16" (e.g. ABI 16), see: sdl_gfx package info (https://archlinux.org/packages/community/x86_64/sdl_gfx/). The error states that OXCE wants ABI 15.
That number is important since it indicates that the version on Manjaro is not guaranteed to be backwards compatible with the one that OXCE expects. Unfortunately for you Arch has the policy of only providing the latest version for any shared library, see: Arch FAQ (https://wiki.archlinux.org/title/Frequently_asked_questions#Why_is_there_only_a_single_version_of_each_shared_library_in_the_official_repositories?). This means that the OXCE version you downloaded will not work on your system.

So what are your options now?
* Keep using the WINE version that seems to work correctly for you
* Use the version as published on AUR (Arch User Repository).
  + It seems to be quite actively maintained, see: https://aur.archlinux.org/packages/openxcom-extended/ (https://aur.archlinux.org/packages/openxcom-extended/)
  + For instructions how to activate AUR on Manjaro see: https://wiki.manjaro.org/index.php/Arch_User_Repository (https://wiki.manjaro.org/index.php/Arch_User_Repository)
* Use a AppImage/Snap/Flatpack version of OXCE
  + If it exist, perhaps ask the devs or look for user generated versions on the respective repositories
* Ask the devs if it is possible to provide a package linked against the newest SDL_gfx library
  + It is unlikely this would become the default in the foreseeable future since it would mean that OXCE will stop working on a lot of existing systems (most do not have ABI 16 yet).
* Compile OXCE yourself on the system that is giving you problems
* Use a dirty hack where you fool your system by creating a symbolic link with the appropriate name and hope for the best.

Good Luck
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: Tchey on October 05, 2021, 10:52:29 pm
Thanks again

Not sure why but now i see this :

locate SDL_gfx
/usr/include/SDL/SDL_gfxBlitFunc.h
/usr/include/SDL/SDL_gfxPrimitives.h
/usr/include/SDL/SDL_gfxPrimitives_font.h
/usr/lib/libSDL_gfx.so
/usr/lib/libSDL_gfx.so.16
/usr/lib/libSDL_gfx.so.16.9.1
/usr/lib/pkgconfig/SDL_gfx.pc

Without rebooting or nothing, maybe i just needed to wait for some reason ?

WINE will do for now, i prefer not to mess with my system unless i have a step by step noob friendly detailled way of doing stuff.
I am a Linux user, just as any lambda Windows user i guess, not a "techy/geek/something smart".
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: ontherun on January 10, 2022, 09:37:35 pm
Well not all repositories of gnu/linux distributions use same version of certain libraries, too bad  :-\
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: Xolvix on January 11, 2022, 05:24:08 am
Has there been any thought to producing an AppImage for OpenXcom Extended? It would probably solve these library issues quite effectively, plus the standard non-Extended version of OpenXcom has Linux nightlies distributed as AppImages already, so it shouldn't be a huge leap to get them going.
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: Yankes on January 11, 2022, 04:26:22 pm
Another solution is static linking of all external libs and this probably is even simpler, only drawback is size of execute
Title: Re: GNU/Linux Debian 10: error while loading shared libraries: libSDL_gfx.so.15
Post by: ontherun on January 11, 2022, 06:10:38 pm
Has there been any thought to producing an AppImage for OpenXcom Extended? It would probably solve these library issues quite effectively, plus the standard non-Extended version of OpenXcom has Linux nightlies distributed as AppImages already, so it shouldn't be a huge leap to get them going.

I would like It a lot, provider that Meridian agrees in doin' that...