py26-numpy +gcc44 requires gcc45 variant of atlas

Michael Dickens michaelld at macports.org
Tue Sep 14 10:59:51 PDT 2010


My US$0.02 worth, having been extensively experimenting with numpy over the past few days. - MLD

On Sep 14, 2010, at 12:56 PM, Jeff Singleton wrote:
> I took a gamble and changed the CC and CXX variables being set in the py26-numpy Portfile to point to the gcc-4.2/g++-4.2 compiler in OS X.  py26-numpy compiled without issue for me.

numpy's setup.py is actually designed to robustly handle Apple's GCC when compiling on OSX; it can create arch-specific or universal installs "out of the box" -- the programming is all in place to do so in the various Py scripts used by setup.py.  Using vanilla GCC, one can pretty easily create arch-specific install, though I think mixing versions of GCC does confuse the issue somewhat (e.g., linking atlas against gcc45 while linking numpy against gcc44).  Using vanilla GCC, it's much more difficult to create a universal install, but it can be done (lipo is your friend!).

> I could not get it to build using mp-gcc-4.4 ... It kept failing with "RuntimeError: Broken toolchain: cannot link a simple C program"

Which in my experience means that the project is being compiled from .c to .o for one arch (e.g., 32 bit) but linked from .o to an executable with another arch (e.g., 64 bit) -- so, the compiler errors out & that's the error that Python prints.  If you look at the more in depth debug output, I bet you find some comment about not finding the correct architecture.


More information about the macports-users mailing list