ValveSoftware / Dota-2

Tracker for issues specific to Linux and Mac in the Reborn client. If you have a general issue or non-system-specific feature request please go to dev.dota2.com
469 stars 38 forks source link

[LINUX] Client fails to load bundled libpangoft-1.0.so #35

Closed DarkDefender closed 9 years ago

DarkDefender commented 9 years ago

When I try to start the new reborn client it errors out with: Plat_GetProcAddresses: unable to load 'libpangoft2-1.0.so'

I have pango version 1.36.8 installed on my system (both 32 and 64 bit versions) so I thought I might be able to workaround this by simply renaming the bundled lib. It worked in somewhat because it now successfully loads the system pango libs. However it segfaults now instead.

I don't really know why it doesn't manage to load the bundled lib but I guess there is something special with it? Otherwise you wouldn't have bundled it with the client, right? And yes, I have tried to validate the game cache to see if there were any corrupt files.

This is the (some what useless?) gdb output:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe19fe88e in ?? () from /home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/librendersystemempty.so
Argument list to give program being debugged when it is started is "-novid".
(gdb) bt
#0  0x00007fffe19fe88e in ?? () from /home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/librendersystemempty.so
#1  0x00007fffe19f00e2 in ?? () from /home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/librendersystemempty.so
#2  0x00007fffe0eb1826 in ?? () from /home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/libmaterialsystem2.so
#3  0x00007ffff1976a85 in ?? () from /home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/libengine2.so
#4  0x00007ffff197707e in ?? () from /home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/libengine2.so
#5  0x00007ffff1977bfe in ?? () from /home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/libengine2.so
#6  0x00007ffff19dab04 in ?? () from /home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/libengine2.so
#7  0x00007ffff19dadda in Source2Main () from /home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/libengine2.so
#8  0x00005555555550c1 in ?? ()
#9  0x00007ffff70c8f90 in __libc_start_main () from /lib64/libc.so.6
#10 0x00005555555551bd in _start ()

uname -a: Linux DarkRain 4.1.0-gentoo #1 SMP PREEMPT Tue Jun 23 01:35:02 CEST 2015 x86_64 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux

I can upload the .dmp files also but I don't know where I should upload them.

I should also mention that I'm using the radeon drivers for my 290x (mesa, xorg, etc from git). But I think I should at least be able start the game as it seem others have been able to judging from issue #1

jomihaka commented 9 years ago

Bundled libpangoft2-1.0.so is linked against libpng12.so.0. You probably don't have that old version in your system and steam doesn't ship 64-bit runtime, so it can't load.

Edit: the 64-bit runtime is actually in ubuntu12_32/steam-runtime/amd64, my bad.

jomihaka commented 9 years ago

The segfault issue is because librendersystemgl.so is linked against libudev.so.0 and your system probably has libudev.so.1 if any, so it doesn't load. Librendersystemempty shouldn't probably segfault, but it's not to meant to be used in the first place, I guess.

DarkDefender commented 9 years ago

@jomihaka thank you for pointing those out! I thought the missing libs would be printed out. But I guess it doesn't if the libs it's trying to load needs missing libs.

I installed libpng 1.2.52 and, as you said, the bundled pango lib now loads. However because libudev.so.0 still is missing, the same segfault occurs.

I symlinked libudev.so.0 to libudev.so.1 (seems like this is the only thing I can do when binaries needs the older version?) and now I get to the main menu screen! :)

There are some graphical errors, but I guess that's because of the missing ARB_viewport_arrays extension in the radeon driver.

If I then try to use the system pango lib instead, the text won't render and it prints out:

(process:27112): Pango-CRITICAL **: No modules found:
No builtin or dynamically loaded modules were found.
PangoFc will not work correctly.
This probably means there was an error in the creation of:
  '/home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/pango/pango.modules'
You should create this file by running:
  pango-querymodules > '/home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/pango/pango.modules'

(process:27112): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'

(process:27112): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'

(process:27112): Pango-CRITICAL **: pango_ft2_render_transformed: assertion 'PANGO_FT2_IS_FONT (font)' failed

(process:27112): Pango-CRITICAL **: pango_ft2_render_transformed: assertion 'PANGO_FT2_IS_FONT (font)' failed

But I guess that is expected because this is probably the reason why it was bundled in the first place. :P

EDIT: Never mind, if I do what the console output tells me to, it runs as before with text. So if I create the directory pango and run: pango-querymodules > '/home/zed/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/pango/pango.modules' it works :)

imirkin commented 9 years ago

Same issue here with missing libpng12.so.0 (on an up-to-date gentoo install) -- you need to add it to your hermetic environment, as you can't rely on the underlying system having it. [I'm able to install the 1.2-slotted version, but expecting that of end-users is a bit unrealistic.] And I ran into the libudev.so.0 issue as well... It all works now (with nouveau on a GF108) but these issues really ought to be addressed.

gdrewb-valve commented 9 years ago

Are any of you actually using the Steam runtime or do you all have it disabled?

imirkin commented 9 years ago

This is what I did: (a) run steam (b) in another shell, cd /path/to/steamapps/common/dota 2 test/; ./game/dota2.sh (or something along those lines, don't have it in front of me).

I looked over the script and it seems to set USE_STEAM_RUNTIME=1 unless specified otherwise (which I didn't), and sticks game/stuff/libwrappersomething to the LD_LIBRARY_PATH as well. I'm pretty sure I didn't find a libpng12.so nor libudev.so.0 in the steam install, and definitely not 64-bit ones.

I did it this way because I wanted to use a custom libGL via LD_LIBRARY_PATH, and didn't want to bother with the weird steam method (in addition to the fact that having one for both a single exec for a 32-bit and 64-bit client is probably bad).

[as an aside, fontconfig also complained about there being spaces in the filename due to config files being loaded from that "dota 2 test" directory... they need to be escaped... not sure whose responsibility that is though.]

gdrewb-valve commented 9 years ago

It's possible something else is disabling your Steam runtime. Can you put your full Steam console startup log somewhere?

If you look in the directory where Steam is installed there should be an ubuntu12_32 directory. In that directory there should a steam-runtime directory with amd64 under that. Under there in lib/x86_64-linux-gnu there should be a libpng12.so.0.

imirkin commented 9 years ago

I saw no reference to such a directory in the game.sh script, perhaps that's where the issue lies (or I didn't read it hard enough). Note that my steam client is installed in one place, but the steamapps dir is on another partition, not sure if that matters.

I'll be able to look closer at what's going on in 24-48h (like I said, not in front of the computer with the game right now)

Plagman commented 9 years ago

Steam is what adds the proper search paths for the game dependencies, not the script you started, so this failure is expected. You need to change the Steam launch options for the game to something like this instead:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/blah/custom_libGL_dir %command%

imirkin commented 9 years ago

@Plagman ah ok, that all makes sense then. I wanted to avoid the steam launch options since there's just one set for all of Dota 2, and I'd need different dirs for the 32-bit "regular" and 64-bit "reborn" clients. Apologies for the n00b steam fail... I assumed that the game.sh would be runnable as-is. I'll file a separate bug about the fontconfig thing later on.

Plagman commented 9 years ago

@DarkDefender: can you post your full Steam standard output log when running into this library issue?

Tele42 commented 9 years ago

With the steam runtime disabled on gentoo, ln -s /lib64/libudev.so.1 ~/.local/share/Steam/SteamApps/common/dota 2 beta/game/bin/linuxsteamrt64/libudev.so.0 was all I needed to get the client up and running.

DarkDefender commented 9 years ago

@Plagman my bad, I had forgotten that I removed the bundled amd64 lib dir from the steam runtime because I ran into multiple issues when trying to launch certain 64bit games from steam.

Issues like https://wiki.archlinux.org/index.php/Steam#Steam_runtime_issues

So I guess you can close this now then. Or do you still want me to post the output?

gdrewb-valve commented 9 years ago

The crash should be resolved in the 6/24 update. I believe other than that this issue is addressed, so closing.