Install QScintilla2 (to install Eric4) on Mac OS Snow Leopard

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++
  • 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:
    make 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.

This entry was posted in MacOS, Python and tagged , . Bookmark the permalink.

3 Responses to Install QScintilla2 (to install Eric4) on Mac OS Snow Leopard

  1. Pingback: The Tech Night Owl — Cutting-Edge Tech Commentary

  2. Pingback: Building 32-bit PyQt4 and associated packages on OS X « pmcode

  3. Adam Twardoch says:

    Even better solution is to append “CONFIG+=x86” to the qmake call:
    qmake -spec macx-g++ CONFIG+=x86
    which will result in appending “-arch i386” where appropriate.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s