I have a third-party library (the interface to Xerox's Finite State tools) which come as universal binaries with two variants internally: a PPC and an i386 variant. I also have a Python interface to the library (which uses ctypes).
But when I try to run the example code provided with the Python interface I get an error complaining about the library being the wrong architecture:
ImportError: dlopen(/Users/arne/sw/lib/libxcfsm.dylib, 10): no suitable image found. Did find:
/Users/arne/sw/lib/libxcfsm.dylib: mach-o, but wrong architecture
From what I can gather, this is because the python executables have an x86_64 variant internally in addition to the two versions in my library, and prefer to run in that mode. Is there some way for me to force the python executable to start the i386 version rather than the x86_64 one, for just some scripts?
The easiest way to play 32-bit games on a Mac is to use an app such as CrossOver or Parallels. CrossOver use Wine to translate Windows applications into Mac commands. Parallels will create a virtual Windows machine on your Mac.
MacOS 10.14 Mojave, the version of the Mac operating system before macOS Catalina, is the last version that supports 32-bit software. With Catalina, only 64-bit software will be supported.
MacBinary is a file format that combines the two forks of a classic Mac OS file into a single file, along with HFS's extended metadata.
If you are using the apple system python (on snow leopard) you can execute it with
arch -i386 python
eg:
robin-mbp:~ $ arch -i386 /usr/bin/python2.6 -c "import sys; print sys.maxint"
2147483647
to start the interpreter in 32 bit mode. There is also an environment variable you can set for the system python (VERSIONER_PYTHON_PREFER_32_BIT).
If it is your own built python there is currently a bug with arch selection, but if you rebuild with the pythonw.c from this ticket it works fine.
If you are not using the system python, you can go ahead and add a line to your ~/.bash_profile
:
export VERSIONER_PYTHON_PREFER_32_BIT=yes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With