[sldev][VWR] Re: Failed build on x86_64, failed including glib?
Morgaine Dinova
morgaine.dinova at googlemail.com
Mon Jan 5 06:10:48 PST 2009
Ricky, in your "Compiling on Gentoo AMD64" instructions at
https://wiki.secondlife.com/wiki/User:Cron_Stardust , you write:
> (More [library dependencies] will be found when I study my world file, and maybe when I rebuild my system... If you know a package is needed, by all means append it to the list!)
It's actually a lot easier than that to find your host lib
dependencies with the help of "ldd". Just cd to your viewer
installation directory (bin and lib must be just under it), and three
commands will tell you everything you need to know:
ldd bin/do-not-directly-run-secondlife-bin
ldd bin/do-not-directly-run-secondlife-bin | grep 'not found'
LD_LIBRARY_PATH="lib" ldd bin/do-not-directly-run-secondlife-bin |
grep 'not found'
The first command shows you the full list of shared library bindings
for your standalone executable, required when it is run directly.
The second command shows you any unresolved shared library bindings
for your standalone executable; if there is no output from this
command then all bindings are resolved and your executable will run
directly.
The third command adds LL's directory of pre-compiled libraries to the
shared library path of ldd: as before, if there is no output then the
executable will run with this symbol in its environment (use absolute
paths to make this runnable from anywhere, ie.
LD_LIBRARY_PATH="$DIR/lib"
$DIR/bin/do-not-directly-run-secondlife-bin). If there *is* any
output then this tells you which library references still remain to be
resolved.
The final wrinkle in the pre-compiled lib case is to extend the
LD_LIBRARY_PATH still further to make the Mozilla runtime shared
libraries accessible:
LD_LIBRARY_PATH="$DIR/lib:$DIR/app_settings/mozilla-runtime-linux-i686"
The latter lib path isn't required by the system's link loader for
viewer startup, so I assume that those .so libs are accessed only via
dlopen(3) calls later on in the session. They ought to be documented
on a file by file basis so that our dependencies are explicit.
'Hope this helps. And Happy New Year! :-)
Morgaine.
More information about the SLDev
mailing list