[Python-Dev] How to configure with icc on Mac?

skip at pobox.com skip at pobox.com
Sun Jan 4 17:28:42 CET 2009


    >> CC=icc ./configure --prefix=$HOME/tmp/icc-python
    >> 
    >> That failed computing the size of size_t because it tries to incorrectly link
    >> with -lgcc_s.

    Martin> Can you provide the relevant section of config.log? What is the
    Martin> precise command that configure is invoking, and what is the
    Martin> precise error message that icc reports?

Sorry, should have been more complete in my report.  I configured with

    CC='icc' ../configure --prefix=$HOME/tmp/icc-python --without-gcc

That officially succeeds but is worthless because it overrode CC=icc from
the command line with CC=cc.  On my Mac cc == gcc.

So, I fix that, at least temporarily, to demonstrate the error I'm getting,
run autoreconf then repeat the above configure line.  The failure is

    ...
    configure:10332: checking size of size_t
    configure:10637: icc -o conftest -g -O2   conftest.c  >&5
    ld: library not found for -lgcc_s
    configure:10641: $? = 1
    configure: program exited with status 1
    configure: failed program was:
    ...

with fairly innocuous conftest.c source.  BTW, I'm using autoconf 2.63.

    >> That failed because of a bug in configure.in:
    >> 
    >> case $withval in
    >> no)     CC=cc
    >> without_gcc=yes;;
    >> yes)    CC=gcc
    >> without_gcc=no;;
    >> *)      CC=$withval
    >> without_gcc=$withval;;
    >> 
    >> It ignores the CC value on the command line.

    Martin> I don't think it is a bug. --without-gcc *overrides* the CC
    Martin> environment variable, rather than ignoring it.

I don't think that's right.  There's no telling what the non-gcc compiler is
called.  As far as I can tell you can't give any arguments to --without-gcc.
All values I tried yielded errors:

    % ../configure --prefix=$HOME/tmp/icc-python --without-gcc=yes
    configure: error: invalid package name: gcc=yes
    % ../configure --prefix=$HOME/tmp/icc-python --without-gcc=icc
    configure: error: invalid package name: gcc=icc

The only way I can see to tell it what compiler to use is to set CC and have
the configure script use it.

Skip



More information about the Python-Dev mailing list