I have a case where if I built on Ubuntu 10, the resulting bundle would segfault on Ubuntu 13. I was making separate builds for each, but then I read the excellent suggestion by
Nathan Weston <elb...@spamcop.net>:
> One thing I've found is that, on Linux, PyInstaller will pull in a bunch
> of system libraries, and you're often better off skipping these and
> using whatever version is installed on the target machine....
> The libraries we're excluding right now are: libfontconfig.so,
>
libglib-2.0.so, libX11.so, libXext.so, libXau.so... [etc]
I took the Ubuntu-10 build to Ubuntu-13 (gotta love Dropbox plus Parallels!)
and dragged out of it all the lib*.so* files that I could 'find' in /usr/lib.
Et voila, the app now works, no segfault.
So I began putting them back one at a time and found that it was only
libX11.so.6 whose presence caused a segfault.
I changed my spec file to read, in part:
a = Analysis(...)
nox11 = a.binaries - [('libX11.so.6',None,None)]
...
coll = COLLECT(exe,
nox11,
a.zipfiles,
a.datas, ...
Replacing the "a.binaries" with the modified "nox11" tree. And this works: the app builds sans libX11 and runs on both Ubuntu 10 and 13.