[Python-Dev] How to configure with icc on Mac?
skip at pobox.com
skip at pobox.com
Sun Jan 4 19:03:22 CET 2009
>> ...
>> configure:10332: checking size of size_t
>> configure:10637: icc -o conftest -g -O2 conftest.c >&5
>> ld: library not found for -lgcc_s
Martin> I think you have the source of the problem right there: your icc
Martin> installation is broken. It is unable to build even trivial
Martin> programs.
Martin> To confirm this theory, take the source of the program, and
Martin> invoke it with the very same command line. If it gives you the
Martin> same error, then this has nothing to do with autoconf, or
Martin> Python, or anything: that command line *must* work, or else the
Martin> compiler is useless.
It compiled without error. Hmmm...
I added -v to the command. it does indeed ask for libgcc_s though it
specifies it with a version number:
ld -lcrt1.10.5.o -dynamic -arch x86_64 -weak_reference_mismatches
non-weak -o conftest
/var/folders/5q/5qTPn6xq2RaWqk+1Ytw3-U+++TI/-Tmp-//iccTRv8HW.o
-L/opt/intel/Compiler/11.0/056/lib -L/usr/lib/i686-apple-darwin9/4.0.1/
-L/usr/lib/ -L/usr/lib/gcc/i686-apple-darwin9/4.0.1/x86_64
-L/usr/lib/gcc/i686-apple-darwin9/4.0.1/
-L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../i686-apple-darwin9/4.0.1/
-L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../.. /opt/intel/Compiler/11.0/056/lib/libimf.a
/opt/intel/Compiler/11.0/056/lib/libsvml.a
/opt/intel/Compiler/11.0/056/lib/libipgo.a
/opt/intel/Compiler/11.0/056/lib/libdecimal.a
/opt/intel/Compiler/11.0/056/lib/libirc.a -lgcc_s.10.5 -lgcc
-lSystemStubs -lmx -lSystem /opt/intel/Compiler/11.0/056/lib/libirc.a
/opt/intel/Compiler/11.0/056/lib/libirc_s.a -ldl
This is from the same shell where the configure run failed so I'm fairly
certain it can't be related to a different set of environment variables.
The only possible environment change would seem to be something configure
imposed. I added -v to the ac_link command to see what it was generating
for the ld command:
ld -lcrt1.o -dynamic -arch x86_64 -weak_reference_mismatches non-weak
-macosx_version_min 10.3 -o conftest
/var/folders/5q/5qTPn6xq2RaWqk+1Ytw3-U+++TI/-Tmp-//iccTIMK7D.o
-L/opt/intel/Compiler/11.0/056/lib -L/usr/lib/i686-apple-darwin9/4.0.1/
-L/usr/lib/ -L/usr/lib/gcc/i686-apple-darwin9/4.0.1/x86_64
-L/usr/lib/gcc/i686-apple-darwin9/4.0.1/
-L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../i686-apple-darwin9/4.0.1/
-L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../.. /opt/intel/Compiler/11.0/056/lib/libimf.a
/opt/intel/Compiler/11.0/056/lib/libsvml.a
/opt/intel/Compiler/11.0/056/lib/libipgo.a
/opt/intel/Compiler/11.0/056/lib/libdecimal.a
/opt/intel/Compiler/11.0/056/lib/libirc.a -lgcc_s -lgcc -lSystemStubs
-lmx -lSystem /opt/intel/Compiler/11.0/056/lib/libirc.a
/opt/intel/Compiler/11.0/056/lib/libirc_s.a -ldl
I searched back through config.log looking for gcc_s. I noticed that the
ld command used for -fno-strict-aliasing linked against -lgcc_s.10.5 but
that the check for -Olimit 1500 linked against -lgcc_s. In between there is
this block of code:
# Calculate the right deployment target for this build.
#
cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
if test ${cur_target} '>' 10.2; then
cur_target=10.3
fi
if test "${UNIVERSAL_ARCHS}" = "all"; then
# Ensure that the default platform for a 4-way
# universal build is OSX 10.5, that's the first
# OS release where 4-way builds make sense.
cur_target='10.5'
fi
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
# Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
# environment with a value that is the same as what we'll use
# in the Makefile to ensure that we'll get the same compiler
# environment during configure and build time.
MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
export MACOSX_DEPLOYMENT_TARGET
EXPORT_MACOSX_DEPLOYMENT_TARGET=''
I stuck in an echo after the export statement:
...
checking whether icc accepts -fno-strict-aliasing... yes
>>> 10.3
checking whether icc accepts -OPT:Olimit=0... (cached) no
...
When I installed Xcode I didn't include the 10.3 stuff since I don't run
that version anymore, so it's quite possible I have a somehow "deficient"
Xcode install. Still, the 10.3 stuff is not installed by default these days
so it shouldn't be required.
This code looks suspicious:
if test ${cur_target} '>' 10.2; then
cur_target=10.3
fi
If I comment it out configure succeeds. This code dates from r65061 which
states:
#3381 fix framework builds on 10.4
Maybe it should be
if test ${cur_target} '>' 10.2 -a ${cur_target} '<' 10.5 ; then
cur_target=10.3
fi
I'll open a ticket.
Skip
More information about the Python-Dev
mailing list