Issue 1447607: make frameworkinstall fails on Intel Macs (original) (raw)

make frameworkinstall fails on Intel Macs due to an endian error.

Hardware: Intel Duo iMac 20" OS Version: OS X 10.4.6

Error:

File "/Users/Shared/Downloads/Python-2.4.2/Lib/plat-mac/applesingle.py", line 58, in init raise Error, "Unknown AppleSingle magic number 0x%8.8x" % (magic,) applesingle.Error: Unknown AppleSingle magic number 0x00160500 make[1]: *** [installmacsubtree] Error 1 make: *** [frameworkinstallmaclib] Error 2

Looking in the file at line 31:

AS_MAGIC=0x00051600

...it seems fairly obvious that byte order is reverse. Looks like the file is in big-endian format, not ntaive format.

Fix:

vi Lib/plat-mac/applesingle.py

Line 28: Replace AS_HEADER_FORMAT="LL16sh" with AS_HEADER_FORMAT=">LL16sh"

Line 35: Replace AS_ENTRY_FORMAT="lll" with AS_ENTRY_FORMAT=">lll"