aliens

Author Topic: [Solved] GNU/Linux Debian 10: error while loading shared libs: libSDL_gfx.so.15  (Read 4896 times)

Offline MoonKid

  • Captain
  • ***
  • Posts: 55
    • View Profile
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.
« Last Edit: February 06, 2023, 12:22:49 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Everything as intended.

Exactly same as OpenXcom install instructions: https://www.ufopaedia.org/index.php/Installing_(OpenXcom)#Unix-like

Offline MoonKid

  • Captain
  • ***
  • Posts: 55
    • View Profile
I would recommand to package the install instructions with the download package instead.

Offline Tchey

  • Sergeant
  • **
  • Posts: 32
    • View Profile
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

Offline R1dO

  • Colonel
  • ****
  • Posts: 436
    • View Profile
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)?

Offline Tchey

  • Sergeant
  • **
  • Posts: 32
    • View Profile
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.

Offline ontherun

  • Colonel
  • ****
  • Posts: 296
  • Lazy-ass captain
    • View Profile
As i read in this thread 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  :)

Offline Tchey

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Hm, i’m on Linux Manjaro, not Debian/Ubuntu, and the manager says i have version sdl_gfx 2.0.26-5, installed.

Offline R1dO

  • Colonel
  • ****
  • Posts: 436
    • View Profile
...
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. 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. 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/
  + For instructions how to activate AUR on Manjaro see: 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

Offline Tchey

  • Sergeant
  • **
  • Posts: 32
    • View Profile
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".
« Last Edit: October 05, 2021, 10:54:21 pm by Tchey »

Offline ontherun

  • Colonel
  • ****
  • Posts: 296
  • Lazy-ass captain
    • View Profile
Well not all repositories of gnu/linux distributions use same version of certain libraries, too bad  :-\

Offline Xolvix

  • Sergeant
  • **
  • Posts: 24
    • View Profile
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.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Another solution is static linking of all external libs and this probably is even simpler, only drawback is size of execute

Offline ontherun

  • Colonel
  • ****
  • Posts: 296
  • Lazy-ass captain
    • View Profile
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...
« Last Edit: January 11, 2022, 08:13:23 pm by ontherun »