Re: VPython 6.02 with buttons, sliders, and new event handling capabilities

Bruce Sherwood <[email protected]> Thu, 14 Feb 2013 07:53:00 -0700
Newsgroups gmane.comp.python.visualpython.user
Message-ID <CAFDG03jMT+ErQZ7cXxnLn=V0TqUDmh9o-QrkoS9XnY=KXPnb2Q@mail.gmail.com>
--===============3561754220288770234==
Content-Type: multipart/alternative; boundary=047d7b6da9603c755204d5b06a61

--047d7b6da9603c755204d5b06a61
Content-Type: text/plain; charset=UTF-8

Sorry, I have no idea. Since the error mentions threads, I will comment
that threads have been eliminated from VPython 6.

Bruce Sherwood


On Thu, Feb 14, 2013 at 5:51 AM, Steve Spicklemire <steve-/3wgw/[email protected]> wrote:

> Hmm.. I've never hit that one.
>
> I haven't experimented with linking to dylibs for boost, so I'm probably
> not going to be much help there.
>
> Maybe Bruce will know if that's been tried.
>
> sorry!
> -steve
>
> On Feb 13, 2013, at 9:43 PM, [email protected] wrote:
>
> > Hello Steve,
> >
> > I did read that, but I have't tried yet. I'm interested in trying to
> install boost with homebrew.
> >
> > I made a few changes with the boost installation complied by homebrew (I
> not do their basic install for 10.8. Before I had chosen some options that
> I didn't really need).
> >
> > The strange c++ error has gone. Instead 'import visual' generated the
> following Fatal error:
> >
> > Fatal Python error: PyThreadState_Get: no current thread
> > Abort trap: 6
> >
> > Do you think this could be because I linked with the dylibs. I remember
> when I did some ctypes work with python on OSX that there was a problem
> importing dylib files that gave a similar error.
> >
> > Best wishes,
> >
> > Dan
> >
> >
> > On 13 Feb 2013, at 22:42, Steve Spicklemire <steve-/3wgw/[email protected]> wrote:
> >
> >> Hi Dan,
> >>
> >> When you built boost did you use the bootstrap/b2 parameters suggest in
> MAC-OSX.txt or some variation?
> >>
> >> I think
> __ZN5boost6python7objects15function_objectERKNS1_11py_functionERKSt4pairIPKNS0_6detail7keywordES9_E
> is a c++ mangled name for some specific method, but it's not included in
> your library somehow.
> >>
> >> -steve
> >>
> >> On Feb 13, 2013, at 6:18 AM, "[email protected]" <
> [email protected]> wrote:
> >>
> >>> Hello Steve, Tom,
> >>>
> >>> find /usr/local/lib -name *boost_python* -ls reveals that there is a
> .dylib and .a versions, symlinked to /usr/local/lib,
> >>>
> >>> /usr/local/lib/libboost_python-mt.a ->
> ../Cellar/boost/1.52.0/lib/libboost_python-mt.a
> >>> /usr/local/lib/libboost_python-mt.dylib ->
> ../Cellar/boost/1.52.0/lib/libboost_python-mt.dylib
> >>>
> >>> So Tom suggestion was right, the libraries have a "-mt" appended.
> >>>
> >>> I changed line 135 of setup.py to read,
> >>>
> >>> libraries = ['boost_python-mt','boost_signals-mt']
> >>>
> >>> I re-built. This time the build finishes successfully, but there is
> error when import visual in python:
> >>>
> >>> ----------------------------------
> >>> File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86_64.egg/visual/__init__.py",
> line 33, in <module>
> >>>  from visual.visual_all import * # this statement not included in
> vis/__init__.py
> >>> File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86_64.egg/visual/visual_all.py",
> line 10, in <module>
> >>>  from visual_common.cvisual import vector
> >>> ImportError:
> dlopen(/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86_64.egg/visual_common/cvisual.so,
> 2): Symbol not found:
> __ZN5boost6python7objects15function_objectERKNS1_11py_functionERKSt4pairIPKNS0_6detail7keywordES9_E
> >>> Referenced from:
> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86_64.egg/visual_common/cvisual.so
> >>> Expected in: flat namespace
> >>> in
> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86_64.egg/visual_common/cvisual.so
> >>> ---------------------------------
> >>>
> >>> I think the function named
> "__ZN5boost6python7objects15function_objectERKNS1_11py_functionERKSt4pairIPKNS0_6detail7keywordES9_E"
> is a hint that headers didn't get processed or some obscure problem with
> building against a dynamic library (the .dylib) files.
> >>>
> >>> Any suggestions?
> >>>
> >>> The includes directory has the following structure,
> >>>
> >>> /usr/local/include/boost/<all boost files and folders>
> >>>
> >>> Should I specify the boost subdirectory as,
> >>>
> >>> [build_ext]
> >>> include-dirs=/usr/local/include/boost <---- ?
> >>> library-dirs=/usr/local/lib
> >>>
> >>> Should I only link against the static library (is that what the .a
> files are?). If so, how to do that?
> >>>
> >>> Best wishes,
> >>>
> >>> Dan
> >>>
> >>> PS. I should probably say, this is a fresh install of 10.8.2, with a
> latest Xcode (4.6), and latest homebrew (0.9.4, completely up-to-date).
> >>>
> >>
> >
> >
> >
> ------------------------------------------------------------------------------
> > Free Next-Gen Firewall Hardware Offer
> > Buy your Sophos next-gen firewall before the end March 2013
> > and get the hardware for free! Learn more.
> > http://p.sf.net/sfu/sophos-d2d-feb
> > _______________________________________________
> > Visualpython-users mailing list
> > Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > https://lists.sourceforge.net/lists/listinfo/visualpython-users
>
>
>
> ------------------------------------------------------------------------------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013
> and get the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> Visualpython-users mailing list
> Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/visualpython-users
>

--047d7b6da9603c755204d5b06a61
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Sorry, I have no idea. Since the error mentions threads, I=
 will comment that threads have been eliminated from VPython 6.<div><br></d=
iv><div style>Bruce Sherwood</div></div><div class=3D"gmail_extra"><br><br>=
<div class=3D"gmail_quote">
On Thu, Feb 14, 2013 at 5:51 AM, Steve Spicklemire <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:steve-/3wgw/[email protected]" target=3D"_blank">steve-/3wgw/[email protected]</a>&gt;</s=
pan> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex">
Hmm.. I&#39;ve never hit that one.<br>
<br>
I haven&#39;t experimented with linking to dylibs for boost, so I&#39;m pro=
bably not going to be much help there.<br>
<br>
Maybe Bruce will know if that&#39;s been tried.<br>
<br>
sorry!<br>
<span class=3D"HOEnZb"><font color=3D"#888888">-steve<br>
</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
On Feb 13, 2013, at 9:43 PM, <a href=3D"mailto:[email protected]">boyfar=
[email protected]</a> wrote:<br>
<br>
&gt; Hello Steve,<br>
&gt;<br>
&gt; I did read that, but I have&#39;t tried yet. I&#39;m interested in try=
ing to install boost with homebrew.<br>
&gt;<br>
&gt; I made a few changes with the boost installation complied by homebrew =
(I not do their basic install for 10.8. Before I had chosen some options th=
at I didn&#39;t really need).<br>
&gt;<br>
&gt; The strange c++ error has gone. Instead &#39;import visual&#39; genera=
ted the following Fatal error:<br>
&gt;<br>
&gt; Fatal Python error: PyThreadState_Get: no current thread<br>
&gt; Abort trap: 6<br>
&gt;<br>
&gt; Do you think this could be because I linked with the dylibs. I remembe=
r when I did some ctypes work with python on OSX that there was a problem i=
mporting dylib files that gave a similar error.<br>
&gt;<br>
&gt; Best wishes,<br>
&gt;<br>
&gt; Dan<br>
&gt;<br>
&gt;<br>
&gt; On 13 Feb 2013, at 22:42, Steve Spicklemire &lt;<a href=3D"mailto:stev=
[email protected]">steve-/3wgw/[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Hi Dan,<br>
&gt;&gt;<br>
&gt;&gt; When you built boost did you use the bootstrap/b2 parameters sugge=
st in MAC-OSX.txt or some variation?<br>
&gt;&gt;<br>
&gt;&gt; I think __ZN5boost6python7objects15function_objectERKNS1_11py_func=
tionERKSt4pairIPKNS0_6detail7keywordES9_E is a c++ mangled name for some sp=
ecific method, but it&#39;s not included in your library somehow.<br>
&gt;&gt;<br>
&gt;&gt; -steve<br>
&gt;&gt;<br>
&gt;&gt; On Feb 13, 2013, at 6:18 AM, &quot;<a href=3D"mailto:boyfarrell@gm=
ail.com">[email protected]</a>&quot; &lt;<a href=3D"mailto:boyfarrell@gm=
ail.com">[email protected]</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Hello Steve, Tom,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; find /usr/local/lib -name *boost_python* -ls reveals that ther=
e is a .dylib and .a versions, symlinked to /usr/local/lib,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; /usr/local/lib/libboost_python-mt.a -&gt; ../Cellar/boost/1.52=
.0/lib/libboost_python-mt.a<br>
&gt;&gt;&gt; /usr/local/lib/libboost_python-mt.dylib -&gt; ../Cellar/boost/=
1.52.0/lib/libboost_python-mt.dylib<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; So Tom suggestion was right, the libraries have a &quot;-mt&qu=
ot; appended.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I changed line 135 of setup.py to read,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; libraries =3D [&#39;boost_python-mt&#39;,&#39;boost_signals-mt=
&#39;]<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I re-built. This time the build finishes successfully, but the=
re is error when import visual in python:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ----------------------------------<br>
&gt;&gt;&gt; File &quot;/usr/local/Cellar/python/2.7.3/Frameworks/Python.fr=
amework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-=
10.8-x86_64.egg/visual/__init__.py&quot;, line 33, in &lt;module&gt;<br>

&gt;&gt;&gt; =C2=A0from visual.visual_all import * # this statement not inc=
luded in vis/__init__.py<br>
&gt;&gt;&gt; File &quot;/usr/local/Cellar/python/2.7.3/Frameworks/Python.fr=
amework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-=
10.8-x86_64.egg/visual/visual_all.py&quot;, line 10, in &lt;module&gt;<br>

&gt;&gt;&gt; =C2=A0from visual_common.cvisual import vector<br>
&gt;&gt;&gt; ImportError: dlopen(/usr/local/Cellar/python/2.7.3/Frameworks/=
Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.=
7-macosx-10.8-x86_64.egg/visual_common/cvisual.so, 2): Symbol not found: __=
ZN5boost6python7objects15function_objectERKNS1_11py_functionERKSt4pairIPKNS=
0_6detail7keywordES9_E<br>

&gt;&gt;&gt; Referenced from: /usr/local/Cellar/python/2.7.3/Frameworks/Pyt=
hon.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-m=
acosx-10.8-x86_64.egg/visual_common/cvisual.so<br>
&gt;&gt;&gt; Expected in: flat namespace<br>
&gt;&gt;&gt; in /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/=
Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86=
_64.egg/visual_common/cvisual.so<br>
&gt;&gt;&gt; ---------------------------------<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I think the function named &quot;__ZN5boost6python7objects15fu=
nction_objectERKNS1_11py_functionERKSt4pairIPKNS0_6detail7keywordES9_E&quot=
; is a hint that headers didn&#39;t get processed or some obscure problem w=
ith building against a dynamic library (the .dylib) files.<br>

&gt;&gt;&gt;<br>
&gt;&gt;&gt; Any suggestions?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The includes directory has the following structure,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; /usr/local/include/boost/&lt;all boost files and folders&gt;<b=
r>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Should I specify the boost subdirectory as,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; [build_ext]<br>
&gt;&gt;&gt; include-dirs=3D/usr/local/include/boost &lt;---- ?<br>
&gt;&gt;&gt; library-dirs=3D/usr/local/lib<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Should I only link against the static library (is that what th=
e .a files are?). If so, how to do that?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Best wishes,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Dan<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; PS. I should probably say, this is a fresh install of 10.8.2, =
with a latest Xcode (4.6), and latest homebrew (0.9.4, completely up-to-dat=
e).<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; ----------------------------------------------------------------------=
--------<br>
&gt; Free Next-Gen Firewall Hardware Offer<br>
&gt; Buy your Sophos next-gen firewall before the end March 2013<br>
&gt; and get the hardware for free! Learn more.<br>
&gt; <a href=3D"http://p.sf.net/sfu/sophos-d2d-feb" target=3D"_blank">http:=
//p.sf.net/sfu/sophos-d2d-feb</a><br>
&gt; _______________________________________________<br>
&gt; Visualpython-users mailing list<br>
&gt; <a href=3D"mailto:Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org">Visualpyth=
[email protected]</a><br>
&gt; <a href=3D"https://lists.sourceforge.net/lists/listinfo/visualpython-u=
sers" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/visual=
python-users</a><br>
<br>
<br>
---------------------------------------------------------------------------=
---<br>
Free Next-Gen Firewall Hardware Offer<br>
Buy your Sophos next-gen firewall before the end March 2013<br>
and get the hardware for free! Learn more.<br>
<a href=3D"http://p.sf.net/sfu/sophos-d2d-feb" target=3D"_blank">http://p.s=
f.net/sfu/sophos-d2d-feb</a><br>
_______________________________________________<br>
Visualpython-users mailing list<br>
<a href=3D"mailto:Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org">Visualpython-us=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/visualpython-users"=
 target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/visualpytho=
n-users</a><br>
</div></div></blockquote></div><br></div>

--047d7b6da9603c755204d5b06a61--


--===============3561754220288770234==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
--===============3561754220288770234==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Visualpython-users mailing list
Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/visualpython-users

--===============3561754220288770234==--