On Sun, 11 Apr 2010 22:54:28 -0700 (PDT), King <[email protected]>
wrote:
> Here are some more test details:
> 
> I created final package on kubuntu karmic 9.10 using lsb based
> bootloader. First I tested on a freshly installed karmic with no
> dependencies installed. bootloader executes and app is working fine.
> Secondly I tested on ubuntu 8.04.4 LTS to check the binary dependency
> issue, bootloader executes but there was a problem. The libraries that
> was included by pyinstaller on karmic 9.10 are not compatible with
> glibc version on ubuntu LTS. There were 7 of them:
> 
> 
> /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.9' not found (required
> by /home/prashant/installed/dist-gtk/libgio-2.0.so.0
> /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.8' not found (required
> by /home/prashant/installed/dist-gtk/libglib-2.0.so.0)
> /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.8' not found (required
> by /home/prashant/installed/dist-gtk/libselinux.so.1)
> /home/prashant/installed/dist-gtk/libgobject-2.0.so.0: undefined
> symbol: g_array_ref
> /home/prashant/installed/dist-gtk/libgdk_pixbuf-2.0.so.0: undefined
> symbol: g_set_error_literal
> /home/prashant/installed/dist-gtk/libgdk-x11-2.0.so.0: undefined
> symbol: g_emblemed_icon_get_icon
> /home/prashant/installed/dist-gtk/libgtk-x11-2.0.so.0: undefined
> symbol: gdk_window_remove_redirection
> 
> I manually copied these libraries from /usr/lib & from /lib folder
> into dist-gtk folder. Now app is working fine.

That's because those libraries happened to be available on your system. If
you had build the program on the older distribution and run it on the
newer, it would have instead worked out-of-the-box.

> My question is why pyinstaller is including these libraries along with
> the package. AFAIK these are the core libraries and present in all
> modern distros. Am I right here? Even though pyinstaller is taking
> care of making a package as much independent as it has to be but
> including these libraries in the final package is problematic.

There is no global definition of "system libraries". Currently,
PyInstaller is very conservative about this; it prefers adding libraries
rather than removing them. This behaviour makes sense because it works, as
long as you run Build.py on an old enough distribution.

I think it might make sense to add a --lsb=VERSION option to Makespec.py,
so that it somehow changes the excludes list in bindependent.py to
something that matches LSB specification (v2, v3, whatever). It would be
great if it would also confirm that the libraries bundled effectively
depend on the LSB-version of the system library. This might be possible if
all your 3rd-parties libraries were compiled in LSB mode, which is
currently something *not* done by main distributions.

> For example if you deploy a package on karmic 9.10 and not including
> these core libraries, package will run on another freshly installed
> karmic. However, if you try to execute the app on an older version of
> OS, that means older version of glibc, it'll produce errors as shown
> above.

You are inferring too much from your own scenario. It happens to work for
you, but it would not work for someone else.
 
> In case if you are excluding these core/system libraries, you can
> create a .deb package and mentioned them in the dependency section. I
> don't know much about .deb but I think dependencies will get
> automatically get installed if they are not present.

This cannot be done portable, because .deb packages vary across
distributions. Also, .deb packaging is currently outside PyInstaller's
scope.

If you feel strongly about this, I'm happy to review and test some
patches. Please prepare a patch to the exclude list, motivate it (eg:
explain why you choose to exclude that specific library) and I can have a
look.

Thanks for your work on improving PyInstaller!
-- 
Giovanni Bajo   ::  [email protected]
Develer S.r.l.  ::  http://www.develer.com

My Blog: http://giovanni.bajo.it

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

Reply via email to