Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic loader unsatisfied code symbol trouble

Highlighted
Ralph Grothe
Honored Contributor

Dynamic loader unsatisfied code symbol trouble

Hi,

I have some trouble with library calls from RRDtool.
Actually the rrdtool lib is called from the Munin performance grapher.
I built RRDtool and all its prerequisite libs
(which were zlib, libpng, libart, freetype2)
from the sources on HP-UX 11.11 with HP ANSI cc.
Somehow there seem to be dangling unsatisfied symbols.

$ /opt/munin/lib/munin-update --host gomera --service df
/usr/lib/pa20_64/dld.sl: Unsatisfied code symbol 'rrd_clear_error' in load module '/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-LP64/auto/RRDs/RRDs.sl'.

In the RRDs.sl there seem to be quite a few
undefined symbols

$ nm -u /opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-LP64/auto/RRDs/RRDs.sl|wc -w
57

and especially at least 18 RRD specific

$ nm -u /opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-LP64/auto/RRDs/RRDs.sl|grep -ci rrd
18

However, I trust this could be fixed with chatr

$ chatr /opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-LP64/auto/RRDs/RRDs.sl
/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-LP64/auto/RRDs/RRDs.sl:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third -lrrd
shared library list:
libm.2
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
5 text 4000000000000000 z---c- D (default)
6 data 8000000100000000 ---m-- D (default)
static branch prediction disabled
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr references disabled


My librrd built resides here


$ chatr /opt/rrdtool/lib/librrd.sl
/opt/rrdtool/lib/librrd.sl:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /opt/rrdtool/lib
internal name:
librrd.sl.2
shared library list:
libfreetype.sl.9
libpng12.sl.0
libz.sl
libart_lgpl_2.sl.5
libm.2
libc.2
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
5 text 4000000000000000 z---c- D (default)
6 data 8000000100000000 ---m-- D (default)
static branch prediction disabled
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr references disabled


But even when I set LD_LIBRARY_PATH accordingly
the symbols still remain undefined

$ LD_LIBRARY_PATH=/opt/rrdtool/lib nm -u /opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-LP64/auto/RRDs/RRDs.sl
18


I read in the linker's manpage that one can
influence the binding behaviour through
e.g. "-B immediate -B nonfatal"
(but haven't used it in the Makefiles),
and even chatr's manpage suggests such an example.
But where should such be applied?
Obviously not on the offending shared lib itself.

I know too little (or better nothing)
about the working of the dynamic linker.
So I don't know how to support it in finding the missing symbol definitions.
In dld.sl's manpage an LD_PRELOAD env var is
mentioned.
Would this be of any help?

Rgds.
Ralph

Madness, thy name is system administration
1 REPLY
Cheryl Griffin
Honored Contributor

Re: Dynamic loader unsatisfied code symbol trouble