[Pythonmac-SIG] Intel compilers to build Python?

Boyd Waters bwaters at nrao.edu
Mon Aug 28 04:22:28 CEST 2006


On Aug 27, 2006, at 4:51 PM, Bob Ippolito wrote:


> On 8/27/06, Boyd Waters <bwaters at nrao.edu> wrote:
>
>> I cannot get the Python package to build with the Intel compiler. It
>> does not find the _Py_Main symbol when linking the top-level
>> "python.exe".
>>
>
> Have you tried building it with just the source, not DarwinPorts?
>


Thanks for the quick reply, Bob.

Well, I'm the one who is hacking together the DarwinPort for using  
the Intel compiler, as there are no such DarwinPorts in the standard  
distribution. So no, it doesn't link without DP either. libtool uses  
the wrong thing for linking, and so fails to find the Intel libs:

libtool -o Python.framework/Versions/2.4/Python -dynamic   
libpython2.4.a \
          -lSystem -lSystemStubs -install_name /Library/Frameworks/ 
Python.framework/Versions/2.4/Python -compatibility_version 2.4 - 
current_version 2.4
ld: for architecture i386
ld: Undefined symbols:
___intel_security_check_cookie
___intel_security_cookie
__intel_fast_memcpy
__intel_fast_memcmp
___libm_sse2_atan2
___libm_sse2_exp
___libm_sse2_log
___libm_sse2_sincos
___intel_cpu_indicator
___intel_cpu_indicator_init
__intel_fast_memset
___divdi3
libtool: internal link edit command failed


I have a patch that replaces "libtool" with "icpc -dynamiclib", which  
seems to link, but perhaps that does the wrong thing?

If I do that manually, I get this error:

$ icpc -dynamiclib -o Python.framework/Versions/2.4/Python -dynamic   
libpython2.4.a \
 >          -lSystem -lSystemStubs -arch_only i386 -install_name /opt/ 
local/Library/Frameworks/Python.framework/Versions/2.4/Python - 
compatibility_version 2.4 -current_version 2.4

$ make
icpc  -u _PyMac_Error Python.framework/Versions/2.4/Python -o  
python.exe \
                 Modules/ccpython.o \
                  -ldl
ld: Undefined symbols:
_PyMac_Error
_Py_Main



- boyd

Boyd Waters
Scientific Programmer
National Radio Astronomy Observatory
Socorro, New Mexico
http://www.aoc.nrao.edu/





More information about the Pythonmac-SIG mailing list