[Python-Dev] Building Python for AMD64 (Windows)

Thomas Heller theller at python.net
Wed Mar 22 21:26:16 CET 2006


Thomas Heller wrote:
> Martin v. Löwis wrote:
>> Thomas Heller wrote:
>>> Then I fire up MSVC, select the ReleaseAMD64 configuration, and try to 
>>> build the
>>> pythoncore project.
>>> After lots of compiler warnings, the build fails with this message:
>>>
> ...
>> For some reason, VS.NET hasn't picked up the PATH modifications, so that 
>> it doesn't invoke the linker wrapper (which would have invoked the right 
>> compiler and linker). This sometimes happens, and I don't know why.
>>
>> As the first measure, open Tools/External compiler configuration, and
>> see whether this reports changes to the path. If it does, throw all
>> object files away, and recompile.
>>
>> Otherwise, please try editing the executable path manually:
>>
>> Tools/Options/Projects/VC++ Directories/Executable Files
>>
>> should start with c:\program files\vsextcompiler.
>>
>> Please let me know whether that works.
> 
> Yes, that worked.  vsextcomp complained that the PATH was not correct, but it
> did then repair it itself.
> 
> Ok, so now I'm able to make itanium builds (which I don't want because I don't have
> such amachine).  The Feb 2003 Platform SDK apparently doesn't have an AMD64 compiler.
> 
> In the meantime, I installed a fresh copy of MSVC on a second machine (Athlon64, running
> Windows XP 64bit), plus the Platform SDK for Win Server 2003 SP1 - April 2005 Edition.
> 
> Same problems with vsextcomp, but vsextcomp repairs the path itself again.
> But here, starting the build it complains:
> CL.EXE Wrapper for VSExtCompiler Plugin
> Error 2 while trying to open SDK path key from registry ...
> Error: Could not determine installation directory of  Microsoft SDK.
> 
> Guess I'll install the 2003 SP1 SDK on the first machine and try it there.

Ok, the Win32 Server 2003 SP1 April 2005 SDK is installed on the first machine,
the build now fails with this:

------ Build started: Project: pythoncore, Configuration: ReleaseAMD64 Win32 ------

Compiling resources...
generate buildinfo
"C:\Programme\TortoiseSVN\bin\subwcrev.exe" .. ..\Modules\getbuildinfo.c getbuildinfo2.c
SubWCRev: 'c:\svn\trunk'
Last committed at revision 43226
Updated to revision 43226
Local modifications found
cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL -MD -MD /USECL:MS_OPTERON getbuildinfo2.c -DSUBWCREV  -Fogetbuildinfo.o -I..\Include -I..\PC
getbuildinfo2.c
------ CL.EXE Wrapper for VSExtCompiler Plugin ------
Linking...
   Creating library .\./python25.lib and object .\./python25.exp
zipimport.obj : error LNK2001: unresolved external symbol __security_cookie
traceback.obj : error LNK2001: unresolved external symbol __security_cookie
typeobject.obj : error LNK2001: unresolved external symbol __security_cookie
unicodeobject.obj : error LNK2001: unresolved external symbol __security_cookie

(lots of similar errors...)

gzio.obj : error LNK2001: unresolved external symbol __security_check_cookie
inftrees.obj : error LNK2001: unresolved external symbol __security_check_cookie
trees.obj : error LNK2001: unresolved external symbol __security_check_cookie
_codecs_cn.obj : error LNK2001: unresolved external symbol __security_check_cookie
./python25.dll : fatal error LNK1120: 2 unresolved externals
------ LINK.EXE Wrapper for VSExtCompiler Plugin ------

Build log was saved at "file://c:\svn\trunk\PCbuild\amd64-temp-release\pythoncore\BuildLog.htm"
pythoncore - 107 error(s), 0 warning(s)


---------------------- Done ----------------------

    Build: 2 succeeded, 1 failed, 0 skipped


Is there a library missing?

BTW: When this eventually builds, will this run on an Athlon64, or does it need an Opteron processor?

Thomas



More information about the Python-Dev mailing list