On 25.06.2013 07:29, Dougal Sutherland wrote:
> The attached code works for me when I use CC=gcc python setup.py
> install. If I then do python -m example.run, it uses all my cores. (Kill
> it with ^\, since it's doing a sillily long computation in a C extension
> and won't see ^C until it's done.)
>
> This is on OS X 10.8.4 with Xcode 4.6.3 (though I think my command-line
> tools might be out of date), where gcc is actually llvm-gcc-4.2:
>
> $ gcc --version
> i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc.
> build 5658) (LLVM build 2336.11.00)
Yes, on OSX CC is clang, so a
$ export CC=gcc
in the terminal will fix it.
llvm-gcc-4.2 is the system C compiler. Don't mess with it by installing
different GCCs on top.
Personally I prefer to use Intel C compiler (2013) on OSX, which is
link-compatible with llvm-gcc-4.2. To use this compiler with distutils
(setup.py) I use this in the terminal:
$ export CC=icc
Sturla