Pyinstall build issues

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Pyinstall build issues

Thomas Huffington
Hi,

I'm having some issues building a standalone app using wxpython 3.0.2.0 with pyinstaller 3.2 on osx 10.11.6, and I was wondering if anyone else has run into the same problem, described in this thread).
Basically every time I try to run the app I get a ton errors followed by a segfault at the point where I declare app = wx.App(false). The thread I linked makes the problem out to be wx libraries, but I can't make head or tails of the workaround (which involves a bunch of library re-linking which I'm not familiar with at all). I've built previous versions of my app before with absolutely no problems, so I was hoping that someone here has seen this before and can help me figure out what's happened to break things.Thanks!

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pyinstall build issues

Michael Freeman
Full output of error messages would be helpful.

On Friday, September 9, 2016 at 12:12:25 AM UTC+1, Thomas Huffington wrote:
Hi,

I'm having some issues building a standalone app using wxpython 3.0.2.0 with pyinstaller 3.2 on osx 10.11.6, and I was wondering if anyone else has run into the same problem, described in <a href="https://github.com/pyinstaller/pyinstaller/issues/1825" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fpyinstaller%2Fpyinstaller%2Fissues%2F1825\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEftsUoWWQ0Fg3rdL3WbD16G5PBjA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fpyinstaller%2Fpyinstaller%2Fissues%2F1825\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEftsUoWWQ0Fg3rdL3WbD16G5PBjA&#39;;return true;">this thread).
Basically every time I try to run the app I get a ton errors followed by a segfault at the point where I declare app = wx.App(false). The thread I linked makes the problem out to be wx libraries, but I can't make head or tails of the workaround (which involves a bunch of library re-linking which I'm not familiar with at all). I've built previous versions of my app before with absolutely no problems, so I was hoping that someone here has seen this before and can help me figure out what's happened to break things.Thanks!

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pyinstall build issues

Thomas Huffington
Sure, files linked. I created a very simple hello world program to test, which is where the log comes from, but I get pretty much the same thing when building my app.


2016年9月9日金曜日 8時26分29秒 UTC-7 Michael Freeman:
Full output of error messages would be helpful.

On Friday, September 9, 2016 at 12:12:25 AM UTC+1, Thomas Huffington wrote:
Hi,

I'm having some issues building a standalone app using wxpython 3.0.2.0 with pyinstaller 3.2 on osx 10.11.6, and I was wondering if anyone else has run into the same problem, described in <a href="https://github.com/pyinstaller/pyinstaller/issues/1825" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fpyinstaller%2Fpyinstaller%2Fissues%2F1825\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEftsUoWWQ0Fg3rdL3WbD16G5PBjA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fpyinstaller%2Fpyinstaller%2Fissues%2F1825\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEftsUoWWQ0Fg3rdL3WbD16G5PBjA&#39;;return true;">this thread).
Basically every time I try to run the app I get a ton errors followed by a segfault at the point where I declare app = wx.App(false). The thread I linked makes the problem out to be wx libraries, but I can't make head or tails of the workaround (which involves a bunch of library re-linking which I'm not familiar with at all). I've built previous versions of my app before with absolutely no problems, so I was hoping that someone here has seen this before and can help me figure out what's happened to break things.Thanks!

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

logfile.txt (18K) Download Attachment
helloworld.py (129 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pyinstall build issues

GadgetSteve


On 09/09/2016 17:16, Thomas Huffington wrote:
> Sure, files linked. I created a very simple hello world program to test,
> which is where the log comes from, but I get pretty much the same thing
> when building my app.
>
>
< SNIP >

Thomas,

Looking at your log files pyinstaller is including 2 versions of the wx
libraries, libwx_osx_cocoau_core-3.0.0.2.0.dylib and
libwx_osx_cocoau_core-3.0.0.2.0.dylib and
libwx_osx_cocoau_core-3.0.dylib and for each library call picking one at
random. You ought to be able to specify which one to include/exclude
using Spec files
https://pyinstaller.readthedocs.io/en/stable/spec-files.html and may
also be able to get some help from
https://pyinstaller.readthedocs.io/en/stable/when-things-go-wrong.html.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pyinstall build issues

GadgetSteve


On 09/09/2016 17:39, Steve Barnes wrote:

>
>
> On 09/09/2016 17:16, Thomas Huffington wrote:
>> Sure, files linked. I created a very simple hello world program to test,
>> which is where the log comes from, but I get pretty much the same thing
>> when building my app.
>>
>>
> < SNIP >
>
> Thomas,
>
> Looking at your log files pyinstaller is including 2 versions of the wx
> libraries, libwx_osx_cocoau_core-3.0.0.2.0.dylib and
> libwx_osx_cocoau_core-3.0.0.2.0.dylib and
> libwx_osx_cocoau_core-3.0.dylib and for each library call picking one at
> random. You ought to be able to specify which one to include/exclude
> using Spec files
> https://pyinstaller.readthedocs.io/en/stable/spec-files.html and may
> also be able to get some help from
> https://pyinstaller.readthedocs.io/en/stable/when-things-go-wrong.html.
>

Or, of course, if both files are present in your build directory, have a
tidy up. :-)

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pyinstall build issues

Thomas Huffington
I've tried removing the 3.0 libraries from the specfile following this thread, and removing all references to them in all the build files that are created, then rebuilding from the spec file, but that doesn't seem to have done anything. I can't remove the actual library files from the build either, because they're not listed inside the package contents. At this point I think I'm getting away from wxpython and it might be better to post something on the pyinstaller board, but considering that the official response from the bug report thread that I linked earlier is that this is a wx problem, I feel like I might be going in circles...well, probably worth a try anyways. Thanks for your replies!

2016年9月9日金曜日 9時42分58秒 UTC-7 Gadget Steve:


On 09/09/2016 17:39, Steve Barnes wrote:

>
>
> On 09/09/2016 17:16, Thomas Huffington wrote:
>> Sure, files linked. I created a very simple hello world program to test,
>> which is where the log comes from, but I get pretty much the same thing
>> when building my app.
>>
>>
> < SNIP >
>
> Thomas,
>
> Looking at your log files pyinstaller is including 2 versions of the wx
> libraries, libwx_osx_cocoau_core-3.0.0.2.0.dylib and
> libwx_osx_cocoau_core-3.0.0.2.0.dylib and
> libwx_osx_cocoau_core-3.0.dylib and for each library call picking one at
> random. You ought to be able to specify which one to include/exclude
> using Spec files
> <a href="https://pyinstaller.readthedocs.io/en/stable/spec-files.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpyinstaller.readthedocs.io%2Fen%2Fstable%2Fspec-files.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE2Lzd0iuyeCp8qYo6cTu5zIz_9zQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpyinstaller.readthedocs.io%2Fen%2Fstable%2Fspec-files.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE2Lzd0iuyeCp8qYo6cTu5zIz_9zQ&#39;;return true;">https://pyinstaller.readthedocs.io/en/stable/spec-files.html and may
> also be able to get some help from
> <a href="https://pyinstaller.readthedocs.io/en/stable/when-things-go-wrong.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpyinstaller.readthedocs.io%2Fen%2Fstable%2Fwhen-things-go-wrong.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBYL_94AqBCGduq6X52RZN9EqScg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpyinstaller.readthedocs.io%2Fen%2Fstable%2Fwhen-things-go-wrong.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBYL_94AqBCGduq6X52RZN9EqScg&#39;;return true;">https://pyinstaller.readthedocs.io/en/stable/when-things-go-wrong.html.
>

Or, of course, if both files are present in your build directory, have a
tidy up. :-)

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pyinstall build issues

GadgetSteve


On 09/09/2016 19:27, Thomas Huffington wrote:

> I've tried removing the 3.0 libraries from the specfile following this
> thread
> <https://stackoverflow.com/questions/4890159/python-excluding-modules-pyinstaller/17595149#17595149>,
> and removing all references to them in all the build files that are
> created, then rebuilding from the spec file, but that doesn't seem to
> have done anything. I can't remove the actual library files from the
> build either, because they're not listed inside the package contents. At
> this point I think I'm getting away from wxpython and it might be better
> to post something on the pyinstaller board, but considering that the
> official response from the bug report thread that I linked earlier is
> that this is a wx problem, I feel like I might be going in
> circles...well, probably worth a try anyways. Thanks for your replies!
>
Thomas,

Have you looked in your build directory, (and in the sub-directories),
for the presence of the two builds of wxPython? If they are not there
then there will be two on your library path, or a combination of the
two. Making sure that pyInstaller can only "see" one of them by
renaming/moving if they are in the local directory structure or by
temporary modification of the path/system variables, (sorry not an OS-X
expert here), or possibly by Un-installing one and Installing the other
do that there is a single one on your system should resolve the issue.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pyinstall build issues

Thomas Huffington
Okay, I finally got it working! Just for posterity I'm going to leave the random things I've been documenting over the past three hours or so in this post for posterity/reference.

Just to make sure we're talking about the same thing, the build directory is the folder that pyinstaller creates, right? When I run pyinstaller I get 2 folders, build and dist. build contains a bunch of files that are used during the packing process, but does not contain any dependencies (i.e., library files). dist is where the app/exe reside, but since I'm using pyinstaller's one-file mode, all the library files are packed inside the app so I can't remove them. From what I gather, they are unpacked into a temporary folder at runtime, but of course that doesn't help me with preventing the unwanted files from getting inside the package in the first place. I've already tried uninstalling (using brew) and making sure that weren't somehow two copies of wxpython residing on my system, then reinstalling (again using brew), but the 3.0 libraries still persist after reinstallation, so I think that they come with 3.0.2.0?

Something interesting that I noticed while I was digging around in my wxpython install directory, though, is a python file called wxversion.py that allows you to specify a certain version of wxpython to run. Specifying both 3.0.2.0 and 3.0 worked fine when running the script directly, but after packaging everything up, it apparently couldn't find the wxpython versions that I specified.

I found the libraries in question under /usr/local/Cellar/wxmac/3.0.2_2/lib. What I found was basically a bunch of dylibs, version 3.0.0.2.0, as well as two aliases/symlinks to each individual library, but versioned 3.0 and 3.0.0. I tried simply removing the symlinks, but I got an error as it seems that some wxpython tries to load them instead of going to 3.0.0.2.0 directly. So that was a bust as well.

At this point, now that I'd found what the bug report I linked in my original post was pointing to, I decided to try my luck at following their steps and seeing what the result was. Since the error messages that I was getting only mentioned 2 libraries, libwx_osx_cocoau_core-3.0.dylib and libwx_osx_cocoau_adv-3.0.dylib, I figured that I'd try fixing the references on only those two libraries first.
Running otool -L <libname> let me find whatever references were pointing to /usr/local/Cellar/.../XXX-3.0.0.2.0.dylib, as described in the bug report, and from there I just looked at the manpage for install_name_tool, which got me to "install_name_tool -change /usr/local/Cellar/.../XXX-3.0.0.2.0.dylib /usr/local/opt/wxmac/lib/XXX-3.0.dylib <libname>" to fix all the individual references, after which the pyinstaller package worked! Thanks for sticking with this, I probably would have given up long ago otherwise.

2016年9月9日金曜日 23時09分29秒 UTC-7 Gadget Steve:


On 09/09/2016 19:27, Thomas Huffington wrote:

> I've tried removing the 3.0 libraries from the specfile following this
> thread
> <<a href="https://stackoverflow.com/questions/4890159/python-excluding-modules-pyinstaller/17595149#17595149" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F4890159%2Fpython-excluding-modules-pyinstaller%2F17595149%2317595149\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE38EvoLKjkGWex3wsjoKeIxZCmPQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F4890159%2Fpython-excluding-modules-pyinstaller%2F17595149%2317595149\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE38EvoLKjkGWex3wsjoKeIxZCmPQ&#39;;return true;">https://stackoverflow.com/questions/4890159/python-excluding-modules-pyinstaller/17595149#17595149>,
> and removing all references to them in all the build files that are
> created, then rebuilding from the spec file, but that doesn't seem to
> have done anything. I can't remove the actual library files from the
> build either, because they're not listed inside the package contents. At
> this point I think I'm getting away from wxpython and it might be better
> to post something on the pyinstaller board, but considering that the
> official response from the bug report thread that I linked earlier is
> that this is a wx problem, I feel like I might be going in
> circles...well, probably worth a try anyways. Thanks for your replies!
>
Thomas,

Have you looked in your build directory, (and in the sub-directories),
for the presence of the two builds of wxPython? If they are not there
then there will be two on your library path, or a combination of the
two. Making sure that pyInstaller can only "see" one of them by
renaming/moving if they are in the local directory structure or by
temporary modification of the path/system variables, (sorry not an OS-X
expert here), or possibly by Un-installing one and Installing the other
do that there is a single one on your system should resolve the issue.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pyinstall build issues

GadgetSteve


On 12/09/2016 19:13, Thomas Huffington wrote:

> Okay, I finally got it working! Just for posterity I'm going to leave
> the random things I've been documenting over the past three hours or so
> in this post for posterity/reference.
>
> Just to make sure we're talking about the same thing, the build
> directory is the folder that pyinstaller creates, right? When I run
> pyinstaller I get 2 folders, build and dist. build contains a bunch of
> files that are used during the packing process, but does not contain any
> dependencies (i.e., library files). dist is where the app/exe reside,
> but since I'm using pyinstaller's one-file mode, all the library files
> are packed inside the app so I can't remove them. From what I gather,
> they are unpacked into a temporary folder at runtime, but of course that
> doesn't help me with preventing the unwanted files from getting inside
> the package in the first place. I've already tried uninstalling (using
> brew) and making sure that weren't somehow two copies of wxpython
> residing on my system, then reinstalling (again using brew), but the 3.0
> libraries still persist after reinstallation, so I think that they come
> with 3.0.2.0?
>
> Something interesting that I noticed while I was digging around in my
> wxpython install directory, though, is a python file called wxversion.py
> that allows you to specify a certain version of wxpython to run.
> Specifying both 3.0.2.0 and 3.0 worked fine when running the script
> directly, but after packaging everything up, it apparently couldn't find
> the wxpython versions that I specified.
>
> I found the libraries in question under
> /usr/local/Cellar/wxmac/3.0.2_2/lib. What I found was basically a bunch
> of dylibs, version 3.0.0.2.0, as well as two aliases/symlinks to each
> individual library, but versioned 3.0 and 3.0.0. I tried simply removing
> the symlinks, but I got an error as it seems that some wxpython tries to
> load them instead of going to 3.0.0.2.0 directly. So that was a bust as
> well.
>
> At this point, now that I'd found what the bug report I linked in my
> original post was pointing to, I decided to try my luck at following
> their steps and seeing what the result was. Since the error messages
> that I was getting only mentioned 2 libraries,
> libwx_osx_cocoau_core-3.0.dylib and libwx_osx_cocoau_adv-3.0.dylib, I
> figured that I'd try fixing the references on only those two libraries
> first.
> Running otool -L <libname> let me find whatever references were pointing
> to /usr/local/Cellar/.../XXX-3.0.0.2.0.dylib, as described in the bug
> report, and from there I just looked at the manpage for
> install_name_tool, which got me to "install_name_tool -change
> /usr/local/Cellar/.../XXX-3.0.0.2.0.dylib
> /usr/local/opt/wxmac/lib/XXX-3.0.dylib <libname>" to fix all the
> individual references, after which the pyinstaller package worked!
> Thanks for sticking with this, I probably would have given up long ago
> otherwise.
>
> 2016年9月9日金曜日 23時09分29秒 UTC-7 Gadget Steve:
>
>
>

Good News!

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pyinstall build issues

Charlie Winston
Hi Thomas,
I'm encountering the same problem as you had. 
Can you guide me using a quite detailed steps inorder to solve these reference issues, using install_name_tool?

Thanks in advance!

On Tuesday, September 13, 2016 at 2:22:59 AM UTC+8, Gadget Steve wrote:


On 12/09/2016 19:13, Thomas Huffington wrote:

> Okay, I finally got it working! Just for posterity I'm going to leave
> the random things I've been documenting over the past three hours or so
> in this post for posterity/reference.
>
> Just to make sure we're talking about the same thing, the build
> directory is the folder that pyinstaller creates, right? When I run
> pyinstaller I get 2 folders, build and dist. build contains a bunch of
> files that are used during the packing process, but does not contain any
> dependencies (i.e., library files). dist is where the app/exe reside,
> but since I'm using pyinstaller's one-file mode, all the library files
> are packed inside the app so I can't remove them. From what I gather,
> they are unpacked into a temporary folder at runtime, but of course that
> doesn't help me with preventing the unwanted files from getting inside
> the package in the first place. I've already tried uninstalling (using
> brew) and making sure that weren't somehow two copies of wxpython
> residing on my system, then reinstalling (again using brew), but the 3.0
> libraries still persist after reinstallation, so I think that they come
> with 3.0.2.0?
>
> Something interesting that I noticed while I was digging around in my
> wxpython install directory, though, is a python file called wxversion.py
> that allows you to specify a certain version of wxpython to run.
> Specifying both 3.0.2.0 and 3.0 worked fine when running the script
> directly, but after packaging everything up, it apparently couldn't find
> the wxpython versions that I specified.
>
> I found the libraries in question under
> /usr/local/Cellar/wxmac/3.0.2_2/lib. What I found was basically a bunch
> of dylibs, version 3.0.0.2.0, as well as two aliases/symlinks to each
> individual library, but versioned 3.0 and 3.0.0. I tried simply removing
> the symlinks, but I got an error as it seems that some wxpython tries to
> load them instead of going to 3.0.0.2.0 directly. So that was a bust as
> well.
>
> At this point, now that I'd found what the bug report I linked in my
> original post was pointing to, I decided to try my luck at following
> their steps and seeing what the result was. Since the error messages
> that I was getting only mentioned 2 libraries,
> libwx_osx_cocoau_core-3.0.dylib and libwx_osx_cocoau_adv-3.0.dylib, I
> figured that I'd try fixing the references on only those two libraries
> first.
> Running otool -L <libname> let me find whatever references were pointing
> to /usr/local/Cellar/.../XXX-3.0.0.2.0.dylib, as described in the bug
> report, and from there I just looked at the manpage for
> install_name_tool, which got me to "install_name_tool -change
> /usr/local/Cellar/.../XXX-3.0.0.2.0.dylib
> /usr/local/opt/wxmac/lib/XXX-3.0.dylib <libname>" to fix all the
> individual references, after which the pyinstaller package worked!
> Thanks for sticking with this, I probably would have given up long ago
> otherwise.
>
> 2016年9月9日金曜日 23時09分29秒 UTC-7 Gadget Steve:
>
>
>

Good News!

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...