All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

SNOW-240: Fix libjson naming madness, for standalone.

Review Request #47 - Created Dec. 19, 2010 and submitted

Aleric Inglewood Reviewers
viewer
SNOW-240
None viewer-development
On linux (and remember this is about standalone)
the libjson packages of distributions don't have this
complex compiler version baked into their name.

This patch fixes this issue by first searching for
libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so
and when that fails search for the system package
library file libjson.so.
It works :p (I have Michelle's debian package libjsoncpp0 installed, which provides /usr/lib/libjson.so).
Ship it!
Posted (Dec. 19, 2010, 12:48 p.m.)
Looks good.

Like this, it should continue working even if a system-wide installed libjson uses the compiler-version-specific filename, like the gentoo ebuild from Techwolf's portage overlay currently does. I guess all other distributions use the plain name, so once this ebuild has been updated, we can even drop looking for the compiler version specific filename in the standalone case completely.
  1. Just wondering: Is there some reason behind the search order (libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so first, then libjson.so) or is that arbitrary? (I guess the systems where both are present are rare.)