[PEAK] How to build w/ GCC 4+Python 2.6
David Gowers
00ai99 at gmail.com
Tue Dec 26 22:27:27 EST 2006
(using gcc 4.0.3 and python 2.6a0 (SVN))
When I'm building PEAK, I get the following error:
building 'peak.binding._once' extension
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
src/peak/binding/_once.c: In function '__pyx_f_11bindingLock___new__':
src/peak/binding/_once.c:64: warning: label '__pyx_L1' defined but not used
src/peak/binding/_once.c: In function '__pyx_f_isLock':
src/peak/binding/_once.c:82: warning: label '__pyx_L1' defined but not used
src/peak/binding/_once.c: In function '__pyx_f_isOurs':
src/peak/binding/_once.c:94: error: invalid lvalue in assignment
src/peak/binding/_once.c:107: error: invalid lvalue in assignment
src/peak/binding/_once.c:116: warning: label '__pyx_L1' defined but not used
src/peak/binding/_once.c: In function '__pyx_f_14BaseDescriptor_onSet':
src/peak/binding/_once.c:227: warning: label '__pyx_L1' defined but not used
src/peak/binding/_once.c: In function '__pyx_f_14BaseDescriptor_ofClass':
src/peak/binding/_once.c:257: warning: label '__pyx_L1' defined but not used
src/peak/binding/_once.c: In function '__pyx_tp_new_bindingLock':
src/peak/binding/_once.c:592: warning: unused variable 'p'
src/peak/binding/_once.c: In function '__pyx_tp_dealloc_bindingLock':
src/peak/binding/_once.c:600: warning: unused variable 'p'
src/peak/binding/_once.c: In function '__pyx_tp_traverse_bindingLock':
src/peak/binding/_once.c:606: warning: unused variable 'p'
src/peak/binding/_once.c:605: warning: unused variable 'e'
src/peak/binding/_once.c: In function '__pyx_tp_clear_bindingLock':
src/peak/binding/_once.c:611: warning: unused variable 'p'
error: command 'gcc' failed with exit status 1
Lines 94 and 107 refer to :
((PyObject*)__pyx_v_lock) = Py_None;
((PyObject *)__pyx_v_lock) = __pyx_1;
OKAY -- looking at the pyrex site:
"LValue Casting Is Dead
I have redesigned the code generator to eliminate the need for lvalue
casting. This means that Pyrex-generated code should now be gcc4-compatible,
although I haven't tested this. Let me know if you find any remaining lvalue
casts; they should be fairly easy to fix now."
It sounds like that is the source of the problem. In fact, running pyrexc
over each .pyx file to regenerate the .c allows PEAK to finish building OK.
But still not to install OK :(
Processing dependencies for PEAK==0.5a4.dev-r2248
Traceback (most recent call last):
File "./setup.py", line 201, in <module>
Topic :: Text Processing :: Markup :: XML""".strip().splitlines()
File "/usr/lib/python2.6/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.6/distutils/dist.py", line 974, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.6/distutils/dist.py", line 994, in run_command
cmd_obj.run()
File "build/bdist.linux-i686/egg/setuptools/command/install.py", line 76,
in run
File "build/bdist.linux-i686/egg/setuptools/command/install.py", line 100,
in do_egg_install
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line
211, in run
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line
427, in easy_install
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line
473, in install_item
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line
519, in process_distribution
File "build/bdist.linux-i686/egg/pkg_resources.py", line 488, in resolve
File "build/bdist.linux-i686/egg/pkg_resources.py", line 2025, in requires
File "build/bdist.linux-i686/egg/pkg_resources.py", line 2017, in _dep_map
File "build/bdist.linux-i686/egg/pkg_resources.py", line 2436, in
split_sections
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1731, in
yield_lines
File "build/bdist.linux-i686/egg/pkg_resources.py", line 2039, in
_get_metadata
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1058, in
get_metadata_lines
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1055, in
get_metadata
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1113, in _get
zipimport.ZipImportError: bad local file header in
/usr/lib/python2.6/site-packages/PEAK-0.5a4.dev_r2248-py2.6-linux-i686.egg
Looks like it doesn'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
'sudo ./setup.py install' twice in a row.
Ditto when I had to reinstall RuleDispatch because it tries to define a
function named 'as', which is a keyword in python 2.6.
ick.. there are a few more problems which show up when trying to import
various parts of PEAK:
peak/binding/components.py: 844 uses the 'as' (sic) method from RuleDispatch
peak/util/graph.py:13 uses dispatch.as
peak/running/commands.py:724 uses dispatch.as
after adjusting those, everything is happy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eby-sarna.com/pipermail/peak/attachments/20061227/2e6e867b/attachment.html
More information about the PEAK
mailing list