[MacPorts] #38163: py2app and macholib error
#38163: py2app and macholib error -------------------------+-------------------------------- Reporter: drsmith48@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Keywords: | Port: -------------------------+-------------------------------- Py2app and macholib raise the error "ValueError: New Mach-O header is too large to relocate". The patches for configure.ldflags in portconfigure.tcl described here https://bitbucket.org/ronaldoussoren/py2app/issue/93/mach-o-header-may-be- too-large-to-relocate http://www.danplanet.com/blog/2009/02/15/using-py2app-with-gtk/ https://trac.macports.org/ticket/29838 do not fix the error. I suspect some ports override default configure.ldflags. Also, I think OpenCV triggers the same error: http://stackoverflow.com/questions/13131024/py2app-error-for-opencv- macports-app-how-to-compile-opencv-with-headerpad-max-i Error stack: {{{ WARNING: Mach-O header may be too large to relocate WARNING: Mach-O header may be too large to relocate Traceback (most recent call last): File "setup.py", line 26, in <module> setup_requires=['py2app'], File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/py2app/build_app.py", line 553, in run self._run() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/py2app/build_app.py", line 741, in _run self.run_normal() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/py2app/build_app.py", line 831, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/py2app/build_app.py", line 978, in create_binaries platfiles = mm.run() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/macholib/MachOStandalone.py", line 140, in run node.write(f) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/macholib/MachO.py", line 119, in write header.write(f) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/macholib/MachO.py", line 314, in write self.synchronize_size() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/macholib/MachO.py", line 304, in synchronize_size raise ValueError("New Mach-O header is too large to relocate") ValueError: New Mach-O header is too large to relocate drsmith$ }}} py2app's full output is attached. Env: python27, py27-py2app, py27-macholib on OSX 10.8. Any guidance would be helpful. There seems to be lots of confusion about this in trac and stack overflow. Thanks. -- Ticket URL: <https://trac.macports.org/ticket/38163> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38163: py2app and macholib error --------------------------+-------------------------------- Reporter: drsmith48@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: invalid | Keywords: Port: | --------------------------+-------------------------------- Changes (by jmr@…): * status: new => closed * resolution: => invalid Comment: As explained in your links, there is nothing py2app can do about this. The relocated header cannot be larger than the original. -- Ticket URL: <https://trac.macports.org/ticket/38163#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38163: py2app and macholib error --------------------------+-------------------------------- Reporter: drsmith48@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: invalid | Keywords: Port: | --------------------------+-------------------------------- Comment (by drsmith48@…): How about macholib? I'm not sure where the bug lies. -- Ticket URL: <https://trac.macports.org/ticket/38163#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38163: py2app and macholib error --------------------------+-------------------------------- Reporter: drsmith48@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: invalid | Keywords: Port: | --------------------------+-------------------------------- Comment (by jmr@…): AIUI it's more like a limitation of the Mach-O format, in that to increase the size of the header you effectively have to re-link the file. So it could be viewed as a deficiency of macholib that it doesn't do that, but it's not like it's a simple fix, which is why install_name_tool can't do it either. -- Ticket URL: <https://trac.macports.org/ticket/38163#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38163: py2app and macholib error --------------------------+-------------------------------- Reporter: drsmith48@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: invalid | Keywords: Port: | --------------------------+-------------------------------- Comment (by spam4scott@…): Same problem as above. Earlier, editing portconfigure.tcl did the trick, but with the newer MacPorts I confirm that this does not fix it; i.e., error persists despite fresh clean/reinstall of MacPorts, rebuilding with -headerpad... in portconfigure.tcl "As explained in your links, there is nothing py2app can do about this." So basically py27-py2app is broken and non-functional in MacPorts? Why is it even then still listed? This ticket should not be closed until port py27-py2app actually works. -- Ticket URL: <https://trac.macports.org/ticket/38163#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts