[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 2208 in lilypond: Problem running midi2ly on M
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 2208 in lilypond: Problem running midi2ly on Mac OS X 10.6.8 : 32- vs. 64-bit code |
Date: |
Sat, 16 Aug 2014 23:34:50 +0000 |
Comment #5 on issue 2208 by address@hidden: Problem running midi2ly
on Mac OS X 10.6.8 : 32- vs. 64-bit code
http://code.google.com/p/lilypond/issues/detail?id=2208
Actually the `#!/usr/bin/env /usr/bin/arch -i386 python` shebang line does
not work on any system I tried (Snow Leopard, Mountain Lion, Mavericks),
and it is wrong for two reasons:
- the system-provided /usr/bin/python is broken with respect to running in
32 bit mode, so invoking `/usr/bin/arch -i386 /usr/bin/python` and
importing midi.so fails with
ImportError: dlopen(./midi.so, 2): no suitable image found. Did find:
./midi.so: mach-o, but wrong architecture
- third-party Pythons, such as those provided by MacPorts and Homebrew, are
built as 64 bit only binaries by default; e.g. on my system, with
MacPorts-provided Python first in $PATH, invoking `/usr/bin/env
/usr/bin/arch -i386 python` fails with
arch: posix_spawnp: python: Bad CPU type in executable
Apple provides some versions of Python other than /usr/bin/python:
depending on the version of the OS any of
/usr/bin/python2.5 (32 bit only),
/usr/bin/python2.6 (universal 32 bit + 64 bit),
/usr/bin/python2.7 (universal 32 bit + 64 bit)
might be available (`ls /usr/bin/python2.?` will list the ones available on
the system).
All of these behave well with respect to running in 32 bit mode and
importing midi.so.
If you change the shebang line of midi2ly (and by the way also the one of
lilymidi) to
#!/usr/bin/arch -i386 /usr/bin/python2.?
where python2.? is one of the available Pythons (I would prefer the highest
version available), you'll get a working midi2ly.
(Instead of editing the file, you could run midi2ly invoking `/usr/bin/arch
-i386 /usr/bin/python2.? /path/to/midi2ly`.)
Of course this is only a workaround: a proper solution would be to build
midi.so as a 32 bit + 64 bit universal binary.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
- Re: [Lilypond-auto] Issue 2208 in lilypond: Problem running midi2ly on Mac OS X 10.6.8 : 32- vs. 64-bit code,
lilypond <=