Ticket #21316 (closed defect: fixed)
Failing to build py2app apps due to macholib error
| Reported by: | dmitrykichenko@… | Owned by: | jmr@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.8.0 |
| Keywords: | LP64 | Cc: | torsten@…, xbenlau@… |
| Port: | py26-macholib |
Description
Building apps with py2app fails on Snow Leopard with MacPorts' python26 and both py26-py2app and py26-py2app-devel (and the latest SVN checkout too). The problem appears to be with macholib.
I have tried compiling all ports with a +universal flag. Everything compiles without issue, except for when compiling a universal build where apr fails to build as a 64-bit binary but everything else builds just fine. The issue crops up with my own apps as well as a dummy app and a one-line setup.py.
Here is the traceback for when attempting to build an app:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.4.2-py2.6.egg/py2app/build_app.py", line 589, in _run
self.run_normal()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.4.2-py2.6.egg/py2app/build_app.py", line 660, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.4.2-py2.6.egg/py2app/build_app.py", line 768, in create_binaries
mm.mm.run_file(runtime)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachOGraph.py", line 66, in run_file
m = self.createNode(MachO, pathname)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachOStandalone.py", line 23, in createNode
res = super(FilteredMachOGraph, self).createNode(cls, name)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/altgraph/ObjectGraph.py", line 148, in createNode
m = cls(name, *args, **kw)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachO.py", line 63, in __init__
self.load(file(filename, 'rb'))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachO.py", line 78, in load
self.load_header(fh, 0, size)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachO.py", line 108, in load_header
hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachO.py", line 148, in __init__
self.load(fh)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachO.py", line 161, in load
header = self.mach_header.from_fileobj(fh, **kw)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/ptypes.py", line 44, in from_fileobj
return cls.from_str(f.read(cls._size_), **kw)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/ptypes.py", line 48, in from_str
return cls.from_tuple(struct.unpack(endian + cls._format_, s), **kw)
error: unpack requires a string argument of length 32
Change History
Note: See
TracTickets for help on using
tickets.


Looks like an upstream issue to me.