I wanted to install Eric4 (an IDE for Python) on my Macbook running Snow Leopard. I had PyQt4 installed successfully. Eric4 requires QScintilla2. And that where an annoying error hit me. The build process did not fail, but it did warn me of a conflict between 64bit modules and 32bit modules. When I ran Eric4, it failed to start, obviously because of the conflict. This time, it didn’t take me long to figure out the problem: qmake/gcc built QScintilla2 in 64bit while the Qt library is 32bit. However, I couldn’t find any qmake option to specify that I want it to build in 32bit mode instead of the default 64bit mode. So I had to resort to the manual fix:
- Change to the source directory of QScintilla2. Because I use Qt4, I change to the sub-directory Qt4.
- Run qmake to create Makefile, remember to use option -spec macx-g++
qmake -spec macx-g++ qscintilla.pro
- Use a text editor (e.g. nano) to open file Makefile, find CFLAGS, CXXFLAGS, LFLAGS and add options
-arch i386(so CFLAGS will become
CFLAGS=-arch i386 ...)
- Build and install:
- After that, build the Python wrapper (and the Designer plugin if you want) as normal.
Problem solved! The most annoying issue in Snow Leopard from the developing perspective is probably the many conflicts between 32bit modules and 64bit modules.