By default, Pyinstaller links the executable program against the
Python shared library, .so instead of the static library, .a. As a
result, the Python shared library is needed to run the executable. The
Python library (shared or static) contains the actual Python language
code. Without it, nothing will work or even link as there will be lots
of unresolved symbols.
At some point in the past, using McMillan's original version, I had it
link against the static library so that the shared library didn't have
to ship with the product. It's been a while but I should be able to
dredge up what I had done to see if it works with pyinstaller.
- Peter
On 8/16/06, Bryan Knight <[EMAIL PROTECTED]> wrote:
I have a Python program I'm trying to wrap up and use as a single executable
on Linux (RedHat 7.1 and RHEL4) using Python 2.4.3, Tcl/Tk/Tix.
I've gone through the steps to make the build the bootloader, configure
PyInstaller, created a spec file with the -F, -K, and -a options, and
successfully built the project.
My problem is that my single file executable is dependant on the Python
library. If I run the command "ldd autorun" from the command line, I get
the following output:
libpython2.4.so.1.0 =>
/usr/local/lib/libpython2.4.so.1.0 (0x006f7000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x0043d000)
libdl.so.2 => /lib/libdl.so.2 (0x0034c000)
libutil.so.1 => /lib/libutil.so.1 (0x00d44000)
libm.so.6 => /lib/tls/libm.so.6 (0x00327000)
libz.so.1 => /usr/lib/libz.so.1 (0x00352000)
libc.so.6 => /lib/tls/libc.so.6 (0x001fc000)
/lib/ld-linux.so.2 (0x001df000)
Now I cant figure out why my single file executable would require the
libpython2.4 library since the whole purpose of PyInstaller is to create
standalone executables that work on systems without Python installed. On a
system without the Python 2.4 library installed, RHEL4 for example (it comes
with Python 2.3.4) if I run the program, I get the following output:
./autorun: error while loading shared libraries: libpython2.4.so.1.0: cannot
open shared object file: No such file or directory
If I manually put a libpython2.4.so.1.0 binary into /usr/local/lib, edit
/etc/ld.so.conf then run ldconfig, and finally re-run the program then I get
an error about not being able to find Tix. Now that I can think I can fix
on my own by hacking up the spec file. (if anyone wants to shed some light
on that, be my guest)
My main issue is why does the executable file depend on the python library.
Can anyone shed some light on this?
Thanks,
- Bryan W. Knight
_______________________________________________
PyInstaller mailing list
[email protected]
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller
_______________________________________________
PyInstaller mailing list
[email protected]
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller