Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Albion Online and libsdl2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1554
Location: /mnt/Gentoo/Europe

PostPosted: Wed Mar 28, 2018 8:26 pm    Post subject: Albion Online and libsdl2 Reply with quote

Hi,

When I run launcher I have:
Code:
Unable to preload the following plugins:
        libSDL2-2.0.so.0


But I got this:
Code:
*  media-libs/libsdl
      Latest version available: 1.2.15-r9
      Latest version installed: 1.2.15-r9
      Size of files: 3,829 KiB
      Homepage:      http://www.libsdl.org/
      Description:   Simple Direct Media Layer
      License:       LGPL-2.1

*  media-libs/libsdl2
      Latest version available: 2.0.4
      Latest version installed: 2.0.4
      Size of files: 4,040 KiB
      Homepage:      http://www.libsdl.org
      Description:   Simple Direct Media Layer
      License:       ZLIB
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19231
Location: here

PostPosted: Thu Mar 29, 2018 5:49 am    Post subject: Reply with quote

The game have proper libSDL2-2.0.so.0 or use system wide library?
You can see with ldd to executable game command
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
slowdive
n00b
n00b


Joined: 01 May 2005
Posts: 40

PostPosted: Fri Apr 06, 2018 10:54 pm    Post subject: You need to install dependencies of *their* SDL2 Reply with quote

I poked around a little.
They have something for SDL2 in their plugins directory at ./game_x64/Albion-Online_Data/Plugins/x86_64/libSDL2-2.0.so.0, and on my system, it is missing a few things (e.g. libpulse.so).

Code:

$ ldd ./game_x64/Albion-Online_Data/Plugins/x86_64/libSDL2-2.0.so.0
   linux-vdso.so.1 (0x00007fffcf7ee000)
   libasound.so.2 => /usr/lib64/libasound.so.2 (0x00007f7205107000)
   libm.so.6 => /lib64/libm.so.6 (0x00007f7204dc4000)
   libdl.so.2 => /lib64/libdl.so.2 (0x00007f7204bc0000)
   libpulse.so.0 => not found
   libsndio.so.6.1 => not found
   libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f7204883000)
   libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f720466f000)
   libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007f7204464000)
   libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007f7204261000)
   libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f7204051000)
   libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007f7203e46000)
   libXss.so.1 => /usr/lib64/libXss.so.1 (0x00007f7203c42000)
   libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 (0x00007f7203a3a000)
   libwayland-egl.so.1 => not found
   libwayland-client.so.0 => not found
   libwayland-cursor.so.0 => not found
   libxkbcommon.so.0 => /usr/lib64/libxkbcommon.so.0 (0x00007f72037fa000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f72035da000)
   librt.so.1 => /lib64/librt.so.1 (0x00007f72033d0000)
   libc.so.6 => /lib64/libc.so.6 (0x00007f720300e000)
   /lib64/ld-linux-x86-64.so.2 (0x000056159d002000)
   libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f7202de5000)
   libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f7202bdb000)
   libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f72029d5000)
   libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f72027cf000)
   libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007f72025c9000)
   libbsd.so.0 => /usr/lib64/libbsd.so.0 (0x00007f72023b4000)


So maybe some of those missing dependencies of their SDL2 is the problem. By comparison, my machine's SDL2 has these deps:
Code:

$ ldd /usr/lib64/libSDL2-2.0.so.0
   linux-vdso.so.1 (0x00007ffc0a9a6000)
   libasound.so.2 => /usr/lib64/libasound.so.2 (0x00007f0310e82000)
   libm.so.6 => /lib64/libm.so.6 (0x00007f0310b3f000)
   libdl.so.2 => /lib64/libdl.so.2 (0x00007f031093b000)
   libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f03105fe000)
   libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f03103ec000)
   libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007f03101e1000)
   libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007f030ffdc000)
   libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f030fdcc000)
   libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007f030fbc1000)
   libXss.so.1 => /usr/lib64/libXss.so.1 (0x00007f030f9bd000)
   libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 (0x00007f030f7b7000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f030f597000)
   librt.so.1 => /lib64/librt.so.1 (0x00007f030f38d000)
   libc.so.6 => /lib64/libc.so.6 (0x00007f030efcb000)
   /lib64/ld-linux-x86-64.so.2 (0x00005649d3eeb000)
   libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f030eda2000)
   libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f030eb98000)
   libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f030e992000)
   libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f030e78c000)
   libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007f030e586000)
   libbsd.so.0 => /usr/lib64/libbsd.so.0 (0x00007f030e371000)


From watching the strace, I see them stat (look at, mostly) their version of SDL2, then open mine, then open theirs. After they open theirs, they attempt to find libpulse. They fail, then they quit. Here's the relevant part of the trace:

Code:

16851 openat(AT_FDCWD, "/usr/lib64/libSDL2-2.0.so.0", O_RDONLY|O_CLOEXEC) = 15
16851 read(15, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340b\1\0\0\0\0\0"..., 832) = 832
16851 fstat(15, {st_mode=S_IFREG|0755, st_size=971656, ...}) = 0
16851 mmap(NULL, 3078704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 15, 0) = 0x7fcf5d9f1000
16851 mprotect(0x7fcf5dad8000, 2093056, PROT_NONE) = 0
16851 mmap(0x7fcf5dcd7000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 15, 0xe6000) = 0x7fcf5dcd7000
16851 mmap(0x7fcf5dcde000, 10800, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fcf5dcde000
16851 close(15)                         = 0

^^ loaded mine

16851 openat(AT_FDCWD, "/usr/lib64/libasound.so.2", O_RDONLY|O_CLOEXEC) = 15
16851 read(15, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\355\2\0\0\0\0\0"..., 832) = 832
16851 fstat(15, {st_mode=S_IFREG|0755, st_size=917296, ...}) = 0
16851 mmap(NULL, 3012880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 15, 0) = 0x7fcf5d711000
16851 mprotect(0x7fcf5d7e9000, 2093056, PROT_NONE) = 0
16851 mmap(0x7fcf5d9e8000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 15, 0xd7000) = 0x7fcf5d9e8000
16851 close(15)                         = 0
16851 openat(AT_FDCWD, "/usr/lib64/libXss.so.1", O_RDONLY|O_CLOEXEC) = 15
16851 read(15, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\r\0\0\0\0\0\0"..., 832) = 832
16851 fstat(15, {st_mode=S_IFREG|0755, st_size=14488, ...}) = 0
16851 mmap(NULL, 2109768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 15, 0) = 0x7fcf5d50d000
16851 mprotect(0x7fcf5d50f000, 2097152, PROT_NONE) = 0
16851 mmap(0x7fcf5d70f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 15, 0x2000) = 0x7fcf5d70f000
16851 close(15)                         = 0

^^ loaded some of my version's dependencies

16851 openat(AT_FDCWD, "/home/brho/albiononline/game_x64/Albion-Online_Data/Plugins/x86_64/libSDL2-2.0.so.0", O_RDONLY|O_CLOEXEC) = 15
16851 read(15, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\322\1\0\0\0\0\0"..., 832) = 832
16851 fstat(15, {st_mode=S_IFREG|0777, st_size=1170048, ...}) = 0
16851 mmap(NULL, 3278728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 15, 0) = 0x7fcf5d1ec000
16851 mprotect(0x7fcf5d300000, 2093056, PROT_NONE) = 0
16851 mmap(0x7fcf5d4ff000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 15, 0x113000) = 0x7fcf5d4ff000
16851 mmap(0x7fcf5d50a000, 10120, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fcf5d50a000
16851 close(15)                         = 0

^^^ load theirs

16851 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 15
16851 fstat(15, {st_mode=S_IFREG|0644, st_size=295842, ...}) = 0
16851 mmap(NULL, 295842, PROT_READ, MAP_PRIVATE, 15, 0) = 0x7fcf66f70000
16851 close(15)                         = 0
16851 openat(AT_FDCWD, "/lib64/tls/haswell/x86_64/libpulse.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
16851 stat("/lib64/tls/haswell/x86_64", 0x7ffc113c7690) = -1 ENOENT (No such file or directory)

^^^ attempt to load libpulse (i removed the 20x other places they looked)

16851 openat(AT_FDCWD, "/home/brho/albiononline/game_x64/Albion-Online_Data/Plugins/x86_64/libSDL2-2.0.so.0", O_RDONLY|O_CLOEXEC) = 15
16851 read(15, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\322\1\0\0\0\0\0"..., 832) = 832
16851 fstat(15, {st_mode=S_IFREG|0777, st_size=1170048, ...}) = 0
16851 mmap(NULL, 3278728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 15, 0) = 0x7fcf5d1ec000
16851 mprotect(0x7fcf5d300000, 2093056, PROT_NONE) = 0
16851 mmap(0x7fcf5d4ff000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 15, 0x113000) = 0x7fcf5d4ff000
16851 mmap(0x7fcf5d50a000, 10120, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fcf5d50a000
16851 close(15)                         = 0
16851 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 15
16851 fstat(15, {st_mode=S_IFREG|0644, st_size=295842, ...}) = 0
16851 mmap(NULL, 295842, PROT_READ, MAP_PRIVATE, 15, 0) = 0x7fcf66f70000
16851 close(15)                         = 0
16851 openat(AT_FDCWD, "/lib64/libpulse.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
16851 openat(AT_FDCWD, "/usr/lib64/libpulse.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
16851 munmap(0x7fcf66f70000, 295842)    = 0
16851 munmap(0x7fcf5d1ec000, 3278728)   = 0

^^ not sure why, but it looks like they try again, and still fail.

16851 write(1, "Unable to preload the following "..., 41) = 41
16851 write(1, "\tlibSDL2-2.0.so.0\n", 18) = 18

^^ then they quit


from looking at the two files, their version doesn't have certain functions. For instance, I compared the symbol tables, and I have SDL_LoadFile_RW, but they don't. That's just an example. There are about 40 functions in my version that theirs is missing. Perhaps they expected an older version of SDL2. Mine is actually libSDL2-2.0.so.0.7.0.

I also noticed that you can't just change their game_x64/Albion-Online_Data/Plugins/x86_64/libSDL2-2.0.so.0. When you start the launcher, but before you hit play, they reinstall all of their .sos in that Plugins directory. However, you *can* wait til the launcher starts, then copy in your own version, and then hit Play.

That gets past the 'preload' complaints, but there's a huge caveat: perhaps they had a good reason for using their own library. Not sure, and I don't recommend doing that.

Anyway the game just locks up its window and does nothing. I can see it's spending its time here:

Code:

    79.05%  Albion-Online  libSDL2-2.0.so.0.7.0  [.] SDL_AtomicLock_REAL
    13.88%  Albion-Online  libSDL2-2.0.so.0.7.0  [.] SDL_InitDynamicAPI
     3.62%  Albion-Online  libSDL2-2.0.so.0.7.0  [.] SDL_AtomicUnlock_REAL
     3.22%  Albion-Online  libSDL2-2.0.so.0.7.0  [.] SDL_WasInit_DEFAULT


So it's not happy about something SDL is doing. Probably due to my nasty hack.

The right answer probably is to install libpulse, libsndio, and libwayland. I'm not going to install pulseaudio just for this game.

Incidentally, here are a few related posts:

https://forum.albiononline.com/index.php/Thread/76824-Linux-Mint-SOLVED-Can-t-load-libSDL2/
https://forum.albiononline.com/index.php/Thread/55320-Linux-Error-with-SDL2-while-launch-the-game/

One quote from those posts was interesting:

Quote:
(w0lfwood)
The crux of this problem is that Albion includes its own version of libSDL2, which is linked against wayland (which itself requires mesa to be built with egl support) and a BSD derived sound library, sndio, both of which are unlikely to be available on a default install of any distro. Furthermore, Albion ONLY works with SDL 2.0.4. whereas .5 or .6 is now standard on most distros, but it will not satisfy Albion.

To the extend that installing SDL has ever fixed anyone's issues with Albion, it has been because it brought in some missing dependency, not because the game actually uses the system's library.


That sounds pretty accurate given what I'm seeing.
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1554
Location: /mnt/Gentoo/Europe

PostPosted: Mon Apr 09, 2018 3:57 pm    Post subject: Reply with quote

Should be soon in Steam, I bet will be working fine like other 2500 linux games :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum