Page MenuHomeSolus

Some Steam games are relying on an old name of libjson-c.so: 'libjson.so.0'
Closed, ResolvedPublic

Description

Hi. It looks like some Steam games are relying on libjson-c.so to exist as 'libjson.so.0'.

There is a prominent workaround (sourced from here) where one can create a symbolic link as such:

cd /usr/lib32
sudo ln -s libjson-c.so libjson.so.0

However, I thought that I'd report this anyways in case that it was possible for Solus to provide the fix although I'm not sure whether that'd be appropriate.

Output:

ERROR: ld.so: object '/home/<user>/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/<user>/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
/home/<user>/.local/share/Steam/steamapps/common/Baldur's Gate Enhanced Edition/BaldursGate: error while loading shared libraries: libjson.so.0: cannot open shared object file: No such file or directory

Event Timeline

DataDrake triaged this task as Normal priority.Feb 23 2017, 2:37 AM
DataDrake moved this task from Backlog to Improvement on the Software board.

Ah! Just run into this issue playing Baldure's Gate... I came to the same fix from the same source... (arch linux forums) XD.

I think that your command line in not right though. There's no libjson-c.so lib in /usr/lib32, at least in my system. For me it was: sudo ln -s /usr/lib32/libjson-glib-1.0.so /usr/lib32/libjson.so.0

Well json-c and json-glib are two very different libraries - so which one is it ? :)

For me, tested with "Baldure's Gate Enhanced Edition" (purchased through steam) the game works with json-glib linked to libjson.so.0. Didn't test if it can work with json-c too. Can do that test if you find it useful...

It appears to be json-c. This is an old version that ships with steam (libjson0-0.9) and the lib was built as libjson.so (unpatched to change the default) where the current versions are libjson-c.so

The current source also contains "Please link against libjson-c instead of libjson"

The homepage of that package is an old json-c website which now forwards to the json-c github

These differences are only increasing unfortunately. I have pretty good data on the runtime, just no idea about flatpak xD

Tested now, can confirm that the game works with any of the two libraries for me...