linux and liblcms support

Report problems with running the game, or game-play issues.

linux and liblcms support

Postby Jabberwocky » Sat May 11, 2013 6:15 pm

rufferson on desura forums wrote:A huge thanks for the release, it's a real milestone, right in time when linux gaming is not a geeky thnkg anymore, but becoming a mainstream.

One Q though - is there any particular reason to link agains lcms 1? Original binary was using only lcms2 while desura's version is also linked with v1:
[ruff@mo release]$ ldd SalvationProphecy | grep lcms
liblcms2.so.2 => ./lib/liblcms2.so.2 (0xf564e000)
[ruff@mo release]$ cd ~/desura/common/salvation-prophecy/build/release/
[ruff@mo release]$ ldd SalvationProphecy | grep lcms
liblcms.so.1 => not found
liblcms2.so.2 => ./lib/liblcms2.so.2 (0xf567a000)
[ruff@mo release]$


I see this in the ldd output on my machine:

build/release$ ldd SalvationProphecy | grep lcms
liblcms.so.1 => /usr/lib/i386-linux-gnu/liblcms.so.1 (0xb5728000)
liblcms2.so.2 => ./lib/liblcms2.so.2 (0xb5678000)

Interestingly, I see some standard libs (such as libfreeimage) also pointing to both:

build/release/lib$ ldd libfreeimage-3.15.1.so | grep liblcms
liblcms.so.1 => /usr/lib/i386-linux-gnu/liblcms.so.1 (0xb703f000)
liblcms2.so.2 => /usr/lib/i386-linux-gnu/liblcms2.so.2 (0xb6f8f000)

My executable (SalvationProphecy) is not explicitly linking against liblcms.so.1. So it looks like an inherited dependency.

Here's what I think is going on. During testing, as users report missing libs on their particular distro, I have added them into the installer. So for example, if a tester emailed me and said the game wouldn't run because libjpeg is missing on Debian, I would include libjpeg in the next release. Most likely, one of these recently added libs had the extra dependency of liblcms.so.1.

I'll have to think about how best to handle this. Most people don't seem to encounter this as a problem, likely because their systems include liblcms by default. I suppose the easiest solution is just to include both liblcms and liblcms2. But maybe there's a better solution.

Is this preventing you from playing the game? If so, what distro and architecture(32/64)?
User avatar
Jabberwocky
Site Admin
 
Posts: 454
Joined: Sat Jun 25, 2011 4:39 am

Re: linux and liblcms support

Postby ruff » Sun May 12, 2013 6:15 am

Hi Jabberwocky,

This is Arch x64 distro. Debugging linker shows
Code: Select all
      1600:   file=liblcms.so.1 [0];  needed by ./lib/libmng.so.1 [0]
      1600:   find library=liblcms.so.1 [0]; searching

so it's really indirect dep - and again old friend libmng ;) System's mng does not use lcms1
Code: Select all
[ruff@mo release]$ ldd /usr/lib32/libmng.so
   linux-gate.so.1 (0xf7732000)
   libz.so.1 => /home/ruff/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libz.so.1 (0xf76aa000)
   libm.so.6 => /usr/lib32/libm.so.6 (0xf764d000)
   libjpeg.so.8 => /home/ruff/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libjpeg.so.8 (0xf75f6000)
   libc.so.6 => /usr/lib32/libc.so.6 (0xf7446000)
   /usr/lib/ld-linux.so.2 (0xf7733000)

so I can launch desura's version by forcing system's libmng
Code: Select all
LD_PRELOAD=/usr/lib32/libmng.so ./SalvationProphecy

or export this var from my .profile/.bashrc to act transparently for desura (same way as I exported steam runtime to avoid pulling them from pacman).
P.S.
Desura's version has some strange glitches - image broken by diagonal lines spontaneously. Very obvious on launch video. And screenshots are similar to those made on OSS radeon driver - i think it is related to mesa renderer.
However no such (in-game) glitches observed on original binary, even though screenshot is also spliced/shifted.
ruff
 
Posts: 8
Joined: Sun May 12, 2013 5:48 am

Re: linux and liblcms support

Postby Jabberwocky » Sun May 12, 2013 1:06 pm

Nice work, detective!
Interesting. My system (ubuntu 12.04 32-bit) libmng does use liblcms:
Code: Select all
$ ldd /usr/lib/i386-linux-gnu/libmng.so.1
   linux-gate.so.1 =>  (0xb76f7000)
   libjpeg.so.8 => /usr/lib/i386-linux-gnu/libjpeg.so.8 (0xb7602000)
   liblcms.so.1 => /usr/lib/i386-linux-gnu/liblcms.so.1 (0xb75c9000)
   libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb75b2000)
   libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7586000)
   libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb73dc000)
   /lib/ld-linux.so.2 (0xb76f8000)


I could consider removing libmng from the installer. Here's the note I have for myself about why I copy libmng in with the installer:
libmng was missing on one user's 64-bit system who didn't install ia32-libs, but instead relied on the 32-bit libs installed by steam
by doing something like this:
export LD_LIBRARY_PATH=/home/USERNAME/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu:/home/USERNAME/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib:/home/USERNAME/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu


So it's kind of only there for an unusual edge case anyway. I guess it's either that, or ensure I include all libmng's dependencies (liblcms) along with the installer. Thoughts?
User avatar
Jabberwocky
Site Admin
 
Posts: 454
Joined: Sat Jun 25, 2011 4:39 am

Re: linux and liblcms support

Postby Jabberwocky » Sun May 12, 2013 1:13 pm

ruff wrote:Desura's version has some strange glitches - image broken by diagonal lines spontaneously. Very obvious on launch video. And screenshots are similar to those made on OSS radeon driver - i think it is related to mesa renderer.
However no such (in-game) glitches observed on original binary, even though screenshot is also spliced/shifted.


Hmm - just prior to release, I removed an extra (unnecessary) opengl context created by SDL. So now the only opengl context is created and managed by my graphics engine, Ogre3D. This was necessary to solve a shutdown crash. But maybe this affected how the game renders on the open source drivers. Thanks for letting me know. That might provide a useful hint towards why the open source drivers render things weirdly. Maybe they don't like how Ogre3D does things.
User avatar
Jabberwocky
Site Admin
 
Posts: 454
Joined: Sat Jun 25, 2011 4:39 am

Re: linux and liblcms support

Postby ruff » Sun May 12, 2013 1:39 pm

Right, so that libmng missing report was also done by me, so I guess you added it on my (or similar) request. It makes sense to add the lib with deps I think :)


Re. glitches: I've tried following:
replace media from desura with media from old package - no changes, still glitches
replace build/release/lib from desura - no changes, still diagonal screen corruption
replace binary SalvationProphecy from desura with binary from old package - no glitches
[ruff@mo release]$ md5sum SalvationProphecy
3541e58aa2a2d32993179d1e55fde1c2 SalvationProphecy
[ruff@mo release]$ md5sum SalvationProphecy-orig
a03883cd83bf5dd40d2b1e523e659540 SalvationProphecy-orig
[ruff@mo release]$
-orig is from desura package, with glitches
without orig is from original package provided for testing

There's no difference in log however when I execute glitched and non-glitched binary, just standard error message about diffuse_and_specular_fast_with_distance_scale_PPL_fp_glsl shader compilation and 5 times
20:22:39: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at /home/sean/ogre/ogre_src_v1-7-4/OgreMain/src/OgreGpuProgramParams.cpp (line 1425)
20:22:39: Compiler error: invalid parameters in PPL.program(315): setting of constant failed
i.e. nothing new.
Again - the binary itself is sufficient to get rid of glitches - I've returned back media and lib, only SalvationProphecy executable is from test package - and everything is ok.
ruff
 
Posts: 8
Joined: Sun May 12, 2013 5:48 am

Re: linux and liblcms support

Postby Jabberwocky » Sun May 12, 2013 4:34 pm

Cool. That goes to confirm the opengl context thing I mentioned above, since that change was made in the SalvationProphecy executable. I appreciate your investigation!
User avatar
Jabberwocky
Site Admin
 
Posts: 454
Joined: Sat Jun 25, 2011 4:39 am


Return to Support

cron