Hi,

I was using PyInstaller in onefile mode. However, it doesn't fill my needs, 
as it requires to have a /tmp partition mounted without the noexec option. 
So I start to try the onedir mode. And I fall back into a well-known 
problem here: linking against shared libraries outside the directory where 
the generated ELF binary is located.

Indeed, after building, in my dist directory is located my ELF binary and 
all the needed shared library. However, I want this binary to link with the 
shared library installed in the system, the ones located in /lib, /usr/lib, 
etc... I first try using LD_LIBRARY_PATH, at execution time of my binary, 
but this doesn't work. After googling, I saw that the PyInstaller 
bootloader resets this environment variable to "homepath" in onedir mode 
(so to the binary path, right ?). This happens in source/linux/utils.c. 
Following some posts here, I try to modify the set_dynamic_library_path so 
that LD_LIBRARY_PATH is not overwritten but concatenated with "homepath". 
However, this does not change the behaviour of execution:

Python library not found.

Indeed this happens in launch.c, as the code looks for the Python library 
either in homepath or in temppath, but not using LD_LIBRARY_PATH. No 
matter, to test I hardcode dllpath to /usr/lib/libpython2.6.so.1.0. Ok, 
knows execution does not complain about missing Python library. But now 
others shared libraries are not found, like bz2.  So LD_LIBRARY_PATH is 
ignored ?

Is anybody solve the problem of moving the binary outside the directory and 
succeed to execute it ?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to