(using gcc 4.0.3 and python 2.6a0 (SVN))<br>When I&#39;m building PEAK, I get the following error:<br><br>building &#39;peak.binding._once&#39; extension<br>gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c src/peak/binding/_once.c -o build/temp.linux-
i686-2.6/src/peak/binding/_once.o<br>src/peak/binding/_once.c: In function '__pyx_f_11bindingLock___new__':<br>src/peak/binding/_once.c:64: warning: label '__pyx_L1' defined but not used<br>src/peak/binding/_once.c: In function '__pyx_f_isLock':
<br>src/peak/binding/_once.c:82: warning: label '__pyx_L1' defined but not used<br>src/peak/binding/_once.c: In function '__pyx_f_isOurs':<br>src/peak/binding/_once.c:94: error: invalid lvalue in assignment <br>src/peak/binding/_once.c:107: error: invalid lvalue in assignment
<br>src/peak/binding/_once.c:116: warning: label '__pyx_L1' defined but not used<br>src/peak/binding/_once.c: In function '__pyx_f_14BaseDescriptor_onSet':<br>src/peak/binding/_once.c:227: warning: label '__pyx_L1' defined but not used
<br>src/peak/binding/_once.c: In function '__pyx_f_14BaseDescriptor_ofClass':<br>src/peak/binding/_once.c:257: warning: label '__pyx_L1' defined but not used<br>src/peak/binding/_once.c: In function '__pyx_tp_new_bindingLock':
<br>src/peak/binding/_once.c:592: warning: unused variable 'p'<br>src/peak/binding/_once.c: In function '__pyx_tp_dealloc_bindingLock':<br>src/peak/binding/_once.c:600: warning: unused variable 'p'<br>src/peak/binding/_once.c: In function '__pyx_tp_traverse_bindingLock':
<br>src/peak/binding/_once.c:606: warning: unused variable 'p'<br>src/peak/binding/_once.c:605: warning: unused variable 'e'<br>src/peak/binding/_once.c: In function '__pyx_tp_clear_bindingLock':<br>src/peak/binding/_once.c:611: warning: unused variable 'p'
<br>error: command &#39;gcc&#39; failed with exit status 1<br><br><br>Lines 94 and 107 refer to :<br><br>((PyObject*)__pyx_v_lock) = Py_None;<br>((PyObject *)__pyx_v_lock) = __pyx_1;<br><br>OKAY -- looking at the pyrex site:
<br>&quot;<span style="font-weight: bold;">LValue Casting Is Dead</span><br>
      <div style="margin-left: 40px;">I have redesigned the code
generator to eliminate the need for lvalue casting. This means that
Pyrex-generated code should now be <span style="font-weight: bold;">gcc4-compatible</span>, although I haven&#39;t tested this. Let me know if you find any remaining lvalue casts; they should be fairly easy to fix now.&quot;
<br><br></div><br>It sounds like that is the source of the problem.&nbsp; In fact, running pyrexc over each .pyx file to regenerate the .c allows PEAK to finish building OK.<br><br>But still not to install OK :(<br><br>Processing dependencies for PEAK==
0.5a4.dev-r2248<br>Traceback (most recent call last):<br>&nbsp; File &quot;./setup.py&quot;, line 201, in &lt;module&gt;<br>&nbsp;&nbsp;&nbsp; Topic :: Text Processing :: Markup :: XML&quot;&quot;&quot;.strip().splitlines()<br>&nbsp; File &quot;/usr/lib/python2.6/distutils/core.py&quot;, line 151, in setup
<br>&nbsp;&nbsp;&nbsp; dist.run_commands()<br>&nbsp; File &quot;/usr/lib/python2.6/distutils/dist.py&quot;, line 974, in run_commands<br>&nbsp;&nbsp;&nbsp; self.run_command(cmd)<br>&nbsp; File &quot;/usr/lib/python2.6/distutils/dist.py&quot;, line 994, in run_command
<br>&nbsp;&nbsp;&nbsp; cmd_obj.run()<br>&nbsp; File &quot;build/bdist.linux-i686/egg/setuptools/command/install.py&quot;, line 76, in run<br>&nbsp; File &quot;build/bdist.linux-i686/egg/setuptools/command/install.py&quot;, line 100, in do_egg_install
<br>&nbsp; File &quot;build/bdist.linux-i686/egg/setuptools/command/easy_install.py&quot;, line 211, in run<br>&nbsp; File &quot;build/bdist.linux-i686/egg/setuptools/command/easy_install.py&quot;, line 427, in easy_install<br>&nbsp; File &quot;build/bdist.linux-i686/egg/setuptools/command/easy_install.py&quot;, line 473, in install_item
<br>&nbsp; File &quot;build/bdist.linux-i686/egg/setuptools/command/easy_install.py&quot;, line 519, in process_distribution<br>&nbsp; File &quot;build/bdist.linux-i686/egg/pkg_resources.py&quot;, line 488, in resolve<br>&nbsp; File &quot;build/bdist.linux-i686/egg/pkg_resources.py&quot;, line 2025, in requires
<br>&nbsp; File &quot;build/bdist.linux-i686/egg/pkg_resources.py&quot;, line 2017, in _dep_map<br>&nbsp; File &quot;build/bdist.linux-i686/egg/pkg_resources.py&quot;, line 2436, in split_sections<br>&nbsp; File &quot;build/bdist.linux-i686/egg/pkg_resources.py&quot;, line 1731, in yield_lines
<br>&nbsp; File &quot;build/bdist.linux-i686/egg/pkg_resources.py&quot;, line 2039, in _get_metadata<br>&nbsp; File &quot;build/bdist.linux-i686/egg/pkg_resources.py&quot;, line 1058, in get_metadata_lines<br>&nbsp; File &quot;build/bdist.linux-i686/egg/pkg_resources.py&quot;, line 1055, in get_metadata
<br>&nbsp; File &quot;build/bdist.linux-i686/egg/pkg_resources.py&quot;, line 1113, in _get<br>zipimport.ZipImportError: bad local file header in /usr/lib/python2.6/site-packages/PEAK-0.5a4.dev_r2248-py2.6-linux-i686.egg<br><br>
Looks like it doesn&#39;t cope well with overwriting an existing package of the same name; As soon as I remove PEAK-0.5a4.dev_r2248-py2.6-linux-i686.egg, the install goes OK -- in short, the bug can be triggered by simply running &#39;sudo ./setup.py install&#39; twice in a row.
<br><br>Ditto when I had to reinstall RuleDispatch because it tries to define a function named &#39;as&#39;, which is a keyword in python 2.6.<br>ick.. there are a few more problems which show up when trying to import various parts of PEAK:
<br><br>peak/binding/components.py: 844 uses the &#39;as&#39; (sic) method from RuleDispatch<br>peak/util/graph.py:13 uses <a href="http://dispatch.as">dispatch.as</a><br>peak/running/commands.py:724 uses <a href="http://dispatch.as">
dispatch.as</a><br><br>after adjusting those, everything is happy.<br><br><br><br>