This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: build ssl failed use vs2010 express
Type: compile error Stage: resolved
Components: Windows Versions: Python 3.4
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: zach.ware Nosy List: BreamoreBoy, Mo.Jia, loewis, python-dev, steve.dower, zach.ware
Priority: normal Keywords:

Created on 2014-06-01 04:03 by Mo.Jia, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (13)
msg219482 - (view) Author: Mo Jia (Mo.Jia) * Date: 2014-06-01 04:03
Here is the failed message . 


Project "D:\Hg\Python\Python\PCbuild\_ssl.vcxproj" (17) is building "D:\Hg\Python\Python\PCbuild\ssl.vcxproj" (18) on node 1 (default targets).                                     
Build:                                                                                                                                                                              
  cd "D:\Hg\Python\Python\PCbuild\"                                                                                                                                                 
  "D:\Hg\Python\Python\PCbuild\python_d.exe" build_ssl.py Release Win32 -a                                                                                                          
                                                                                                                                                                                    
  Found a working perl at 'C:\Perl\bin\perl.exe'                                                                                                                                    
  Executing ssl makefiles: nmake /nologo -f "ms\nt.mak"                                                                                                                             
  Building OpenSSL                                                                                                                                                                  
        copy ".\crypto\buildinf.h" "tmp32\buildinf.h"                                                                                                                               
          1 file(s) copied.                                                                                                                                                         
        copy ".\crypto\opensslconf.h" "inc32\openssl\opensslconf.h"                                                                                                                 
          1 file(s) copied.                                                                                                                                                         
          cl /Fotmp32\shatest.obj -Iinc32 -Itmp32 /MT /Ox /O2 /Ob2 -DOPENSSL_THREADS  -DDSO_WIN32 -W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN 
   -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_A 
  SM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DOPENSSL_NO_IDEA -DOPENSSL_NO_RC5 -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_JPAKE -DOPENSSL_NO_DYNA 
  MIC_ENGINE /Zi /Fdtmp32/app -c .\crypto\sha\shatest.c                                                                                                                             
  shatest.c                                                                                                                                                                         
        link /nologo /subsystem:console /opt:ref /debug /out:out32\shatest.exe @C:\Users\YANXIN~1\AppData\Local\Temp\nm306E.tmp                                                     
libeay32.lib(b_print.obj) : error LNK2019: unresolved external symbol ___report_rangecheckfailure referenced in function _fmtfp [D:\Hg\Python\Python\PCbuild\ssl.vcxproj]           
libeay32.lib(obj_dat.obj) : error LNK2001: unresolved external symbol ___report_rangecheckfailure [D:\Hg\Python\Python\PCbuild\ssl.vcxproj]                                         
libeay32.lib(b_dump.obj) : error LNK2001: unresolved external symbol ___report_rangecheckfailure [D:\Hg\Python\Python\PCbuild\ssl.vcxproj]                                          
libeay32.lib(pem_lib.obj) : error LNK2001: unresolved external symbol ___report_rangecheckfailure [D:\Hg\Python\Python\PCbuild\ssl.vcxproj]                                         
out32\shatest.exe : fatal error LNK1120: 1 unresolved externals [D:\Hg\Python\Python\PCbuild\ssl.vcxproj]                                                                           
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.EXE"' : return code '0x460' [D:\Hg\Python\Python\PCbuild\ssl.vcxproj]                  
  Stop.                                                                                                                                                                             
  Executing ms\nt.mak failed                                                                                                                                                        
  2
msg219503 - (view) Author: Mo Jia (Mo.Jia) * Date: 2014-06-01 14:57
Another error is .

  cd "D:\Hg\Python\Python\PCbuild\"
  "D:\Hg\Python\Python\PCbuild\python_d.exe" build_ssl.py Release Win32 -a

  Found a working perl at 'C:\Perl\bin\perl.exe'
  Traceback (most recent call last):
    File "build_ssl.py", line 253, in <module>
      main()
    File "build_ssl.py", line 181, in main
      ssl_dir = get_ssl_dir()
    File "build_ssl.py", line 70, in get_ssl_dir
      m = re.search('openssl-([^<]+)<', f.read())
  UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2: illegal multibyte sequence
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "cd "D:\Hg\Python\Python\PCbuild\" [D:\Hg\Python\Python\PCbuild\ssl. vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: "D:\Hg\Python\Python\PCbuild\python_d.exe" build_ssl.py Release Win32 -a [D:\Hg\ Python\Python\PCbuild\ssl.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: " exited with code 1. [D:\Hg\Python\Python\PCbuild\ssl.vcxproj]
msg219604 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-06-02 16:58
The first error makes no sense to me.  What version of OpenSSL are you building?  How did you invoke the Python build (command line, or through the VS GUI)?

As for the second error, all of the VS-generated files in PCbuild have a UTF-8 BOM, which is what the 'gbk' codec can't handle.
msg219605 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-06-02 17:16
New changeset 1d36bd258ee8 by Zachary Ware in branch '3.4':
Issue #21623: open pyproject.props with an explicit encoding
http://hg.python.org/cpython/rev/1d36bd258ee8
msg219608 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-06-02 17:21
The cause of the second error should be fixed now.
msg219612 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2014-06-02 18:02
Has the first log been abbreviated at all? It looks like it's trying to build the tests before building the library...

(Nosied Martin, since he's managed to build this version of OpenSSL with VC10 and may have encountered this. I've only dealt with VC9 so far.)
msg219613 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-06-02 18:09
I will note that VC++ 2010 Express is what I use on one of my usual machines, and don't recall ever having this issue.
msg219701 - (view) Author: Mo Jia (Mo.Jia) * Date: 2014-06-03 15:31
@Roundup Robot . Clone the newest 3.4 tag. The unicode problem is ok now .
@Zachary Ware , don't change anything after clone from the repo. What i do is just cd python src dir and runing : Tools\buildbot\build.bat .  the openssl verison is 1.0.1g . Seem the external.bat don't build openssl . I see the readme "     The ssl.vcxproj sub-project simply invokes PCbuild/build_ssl.py,    which locates and builds OpenSSL." Seem I don't need build the openssl by handle .  After meet the error , I open the sln by vc2010 , and choose the ssl project build . Here is another error :

4>  pymath.c
4>  pytime.c
4>  pystate.c
4>  pystrcmp.c
4>  pystrtod.c
4>  dtoa.c
4>  Python-ast.c
4>  pythonrun.c
4>  structmember.c
4>  symtable.c
4>  sysmodule.c
4>  thread.c
4>  traceback.c
4>  Generating Code...
4>  The syntax of the command is incorrect.
4>  cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL -D_DEBUG -MDd ..\Modules\getbuildinfo.c -Fo"D:\Hg\Python\Python\PCbuild\Win32-temp-Debug\pythoncore\getbuildinfo.o" -I..\Include -I..\PC
4>  The syntax of the command is incorrect.
4>     Creating library D:\Hg\Python\Python\PCbuild\python34_d.lib and object D:\Hg\Python\Python\PCbuild\python34_d.exp
4>  pythoncore.vcxproj -> D:\Hg\Python\Python\PCbuild\python34_d.dll
5>------ Build started: Project: python, Configuration: Debug Win32 ------
5>  python.c
5>  python.vcxproj -> D:\Hg\Python\Python\PCbuild\python_d.exe
6>------ Build started: Project: ssl, Configuration: Debug Win32 ------
6>  Found a working perl at 'D:\cygwin64\bin\perl.exe'
6>  Executing ssl makefiles: nmake /nologo -f "ms\nt.mak"
6>  The syntax of the command is incorrect.
6>  Executing ms\nt.mak failed
6>  1
6>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "cd "D:\Hg\Python\Python\PCbuild\"
6>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: "D:\Hg\Python\Python\PCbuild\python_d.exe" build_ssl.py Release Win32 -a
6>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: " exited with code 1.
msg219708 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-06-03 18:07
Mo Jia wrote:
> @Zachary Ware , don't change anything after clone from the repo. What
> i do is just cd python src dir and runing : Tools\buildbot\build.bat
> .  the openssl verison is 1.0.1g . Seem the external.bat don't build
> openssl . I see the readme "     The ssl.vcxproj sub-project simply
> invokes PCbuild/build_ssl.py,    which locates and builds OpenSSL."
> Seem I don't need build the openssl by handle

That's correct, you shouldn't have to do anything special for OpenSSL, especially since you used Tools\buildbot\build.bat.

> After meet the error, I open the sln by vc2010 , and choose the ssl project build .

So the original error happened in the Tools\buildbot\build.bat build, and the newest error happened while building from the VS GUI?

Neither error makes sense to me yet though, so here's a few more questions that may or may not have any impact on things:

Have you tried building again from a completely fresh checkout (including re-downloading the OpenSSL source using Tools/buildbot/external.bat)?
Are you using the hgeol extension of Mercurial?
What version of Windows are you using?
Is VC++ updated completely (including service pack 1)?
What language/localization settings are you using (in Windows and VC++)?
Do you have anything installed that messes with cmd.exe?
What is your default codepage?

Anything else that may seem relevant, please let us know!
msg219712 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-06-03 18:43
I have no idea what might be causing this. I think it only can be resolved if Mo Jia actually researches the errors himself. Mo Jia, pick one particular error, and stick to it until you completely understand it. If you cannot do this, we may have to wait until somebody else shows up who can reproduce the problem, and also analyze it.

For example, for the original problem, we would need the original command line that compiled b_print.obj, and check whether /GS was passed to that compilation command or not.
msg223845 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-07-24 14:56
Mo Jia: are you still having issues with this?
msg228518 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-10-05 00:45
I have never had a problem building ssl with vs2010 express so can this be closed?
msg228524 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-10-05 01:48
Mo Jia: if you have any information to add later, feel free to reopen the issue, but so far nobody else can reproduce your error.
History
Date User Action Args
2022-04-11 14:58:04adminsetgithub: 65822
2014-10-05 01:48:20zach.waresetstatus: open -> closed
assignee: zach.ware
messages: + msg228524

stage: resolved
2014-10-05 00:45:33BreamoreBoysetstatus: pending -> open
nosy: + BreamoreBoy
messages: + msg228518

2014-07-24 14:56:33zach.waresetstatus: open -> pending
resolution: works for me
messages: + msg223845
2014-06-03 18:43:46loewissetmessages: + msg219712
2014-06-03 18:07:01zach.waresetmessages: + msg219708
2014-06-03 15:31:32Mo.Jiasetmessages: + msg219701
2014-06-02 18:09:27zach.waresetmessages: + msg219613
2014-06-02 18:02:28steve.dowersetnosy: + loewis
messages: + msg219612
2014-06-02 17:21:11zach.waresetmessages: + msg219608
2014-06-02 17:16:29python-devsetnosy: + python-dev
messages: + msg219605
2014-06-02 16:58:04zach.waresetmessages: + msg219604
2014-06-01 14:57:45Mo.Jiasetmessages: + msg219503
2014-06-01 06:52:30ned.deilysetnosy: + zach.ware, steve.dower
2014-06-01 04:03:45Mo.Jiacreate