[Rd] Nested shared library calls in Linux
James Wettenhall
wettenhall at wehi.edu.au
Tue Jun 8 17:13:10 CEST 2004
Duncan,
Thanks for your answer.
I just realised that I was probably a bit too quick to claim
that ~/usr/local/lib/R/bin/ is the only place that the dynamic
linker is looking for libwx_gtk_html-2.5.so.1 I don't have much
experience at reading strace output. I think it looks in the
wrong place initially, but then in the correct place.
On Jun 2004, Duncan Temple Lang wrote:
> What should happen is that _core.so and all Python packages
> should be linked against libpython2.2.so or libpython2.2.a.
> We can tell whether this has happened via
>
> ldd /export/share/disk501/lab0605/wettenhall/usr/local/lib/
python2.2/site-packages/wx/_core.so
I haven't included all the ldd output from wxPython's _core.so
but I can tell you that libpython2.2.so is not there. Here's
some of the output:
unix28 507 % ldd _core.so
libwx_gtk_html-2.5.so.1 =>
/home/users/lab0605/wettenhall/usr/local/lib/libwx_gtk_html-2.5.so.1
(0x00842000)
libwx_gtk_adv-2.5.so.1 =>
/home/users/lab0605/wettenhall/usr/local/lib/libwx_gtk_adv-2.5.so.1
(0x00d98000)
libwx_gtk_core-2.5.so.1 =>
/home/users/lab0605/wettenhall/usr/local/lib/libwx_gtk_core-2.5.so.1
(0x00111000)
libwx_base_xml-2.5.so.1 =>
/home/users/lab0605/wettenhall/usr/local/lib/libwx_base_xml-2.5.so.1
(0x003e5000)
libwx_base_net-2.5.so.1 =>
/home/users/lab0605/wettenhall/usr/local/lib/libwx_base_net-2.5.so.1
(0x0054b000)
libwx_base-2.5.so.1 =>
/home/users/lab0605/wettenhall/usr/local/lib/libwx_base-2.5.so.1
(0x005e5000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x004e6000)
libc.so.6 => /lib/tls/libc.so.6 (0x00a39000)
<snip>
>
> nm /export/share/disk501/lab0605/wettenhall/usr/local/lib/python2.2/site-packages/wx/_core.so | grep PyExc_IOError
This returns:
unix28 510 % nm _core.so | grep PyExc_IOError
U PyExc_IOError
i.e. the symbol is undefined in wxPython's _core.so
whereas it is defined in libpython2.2.so :
unix28 513 % nm libpython2.2.so | grep PyExc_IOError
000f65d8 B PyExc_IOError
(To be precise, it is declared but not initialized).
OK, so I guess I will experiment with trying to build wxPython
and get it to link against libpython2.2.so.
Or maybe for each wxPython .so file, I can just add a
libpython2.2.so dependency with something like:
ld -o _core2.so _core.so libpython2.2.so
mv _core2.so _core.so
I'll play around with this sort of thing for a while...
Regards,
James
More information about the R-devel
mailing list