André Colomb wrote:
> Hi there!
>
> I've been lurking on IRC today after asking this question, so now
> reposting it here in hope of a non-real-time answer :-)
I saw your messages just a few minutes after you left the channel, so
you just needed to wait a little longer... :-)
>
> I'm hitting the same problem described on
>
https://stackoverflow.com/questions/47270751/import-wx-xrc-in-wxformbuilder-code-fails-with-file-not-found-error
>
> The "missing" libwx_gtk3u_html-3.0.so.0 library is actually right
> there, but even an `ldd _
xrc.cpython-36m-x86_64-linux-gnu.so` marks it
> as not found. wxPython was built from
> wxPython-4.0.0rc1.dev3641+54837c1.tar.gz using pip3 install, as
> advised in the Phoenix installation howto.
>
> After looking around with ldd and objdump, it seems like any indirect
> library dependencies are not found, while direct .so deps are found in
> the same directory as the _xrc.*.so OR in the current working
> directory. What strikes me is that after copying the .so files to the
> current directory (from where python3 was invoked), they are found by
> ldd as well as python3 itself.
The build sets LD_RUN_PATH=$ORIGIN while building wxWidgets and
wxPython. That should be setting the rpath in the binaries such that it
will look first in the same folder where the loading entity (the
extension modules in our case) is located. It works fine on my various
linux boxes, so maybe there is something on your system that is
disrupting that feature. Do you have any LD_* variables set in your
environment? Googling rpath, $ORIGIN, and your distro version may turn
up some additional details or hints. One thing that leaves me a bit
confused is why this happens when importing the _xrc extension, but not
the others.
If all else fails you should be able to set LD_LIBRARY_PATH to include
the wx package folder where the wx shared libs are located, or you can
try using the chrpath system tool to view and/or change the rpath
settings in the extension modules.
--
Robin Dunn
Software Craftsman
http://wxPython.org