[Rd] Nested shared library calls in Linux
wettenhall at wehi.edu.au
Tue Jun 8 15:41:05 CEST 2004
I have an interface from R to the wxPython GUI toolkit which
works under Windows:
(as long as you build RSPython with a shared (not static)
But on Linux I get an error:
Error in .PythonEval(cmd) : Error in Python call:
undefined symbol: PyExc_IOError
I am working within my home area at the moment:
By running strace, I found that the Python command "import wx"
but then when _core.so tries to load libwx_gtk_html-2.5.so.1
(its first shared-library-dependency), it only looks
in one place:
i.e. THE DIRECTORY CONTAINING THE R SHARED LIBRARY.
when in fact it should be looking in:
Has LD_LIBRARY_PATH somehow been collapsed into just one
directory??? I have tried checking it with Sys.getenv()
just before running importPythonModule("wx"), and
it seems to be OK: ~/usr/local/lib/ is certainly included
I have included ~/usr/local/lib in my PYTHONPATH and
I can also modify the Python path within R, using:
or .PythonEval("path.append ...",.module="sys")
I have registered the shared libraries with ldconfig.
One more complication is that libwx_gtk_html-2.5.so.1 is
actually a symbolic link to libwx_gtk_html-2.5.so.1.0.0
(in the same directory, ~/usr/local/lib).
I'm running Fedora Linux with R 1.9.0. I've installed Python
2.2.3 from source in ~/usr/local/ and I've built RSPython
0.5-3 with a shared Python library libpython2.2.so (which I
built from the Python source). R and wxPython are also
installed from source, both in ~/usr/local/ and R is
configured with --enable-shlib.
If it would be helpful, I could try to come up with a much
simpler example of nested shared-library calls from R, but
people may wish to suggest that this is not the real problem.
system i686, linux-gnu
More information about the R-devel