Windows XP下編譯openssl-1.0.0 (上)

來源:互聯網
上載者:User

版本
ActivePerl: 5.12.0 Build 1200
VC: 6.0
openssl: 1.0.0
masm: 6.00.8168.0

 

ActivePerl,MASM, VC6.0均已安裝且bin目錄都在PATH環境變數中

一、 NMAKE : fatal error U1077: 'ml' : return code '0x1'

當執行>nmake -f ms/ntdll.mak

出現錯誤:
Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

Building OpenSSL
        ml /nologo /Cp /coff /c /Cx /Fotmp32dll/sha512-586.obj tmp32dll/sha512-5
86.asm
 Assembling: tmp32dll/sha512-586.asm
MASM version 8.00 or later is strongly recommended.
error A4910: cannot open file: C:/masm32/bin/ml.err
tmp32dll/sha512-586.asm(97) : error A2008:  : mm
tmp32dll/sha512-586.asm(105) : error A2008:  : mm
tmp32dll/sha512-586.asm(107) : error A2008:  : mm
tmp32dll/sha512-586.asm(110) : error A2008:  : mm
tmp32dll/sha512-586.asm(112) : error A2008:  : mm
tmp32dll/sha512-586.asm(130) : error A2008:  : mm
tmp32dll/sha512-586.asm(133) : error A2008:  : mm
tmp32dll/sha512-586.asm(154) : error A2008:  : mm
tmp32dll/sha512-586.asm(162) : error A2008:  : mm
tmp32dll/sha512-586.asm(164) : error A2008:  : mm
tmp32dll/sha512-586.asm(167) : error A2008:  : mm
tmp32dll/sha512-586.asm(169) : error A2008:  : mm
tmp32dll/sha512-586.asm(189) : error A2008:  : mm
tmp32dll/sha512-586.asm(192) : error A2008:  : mm
tmp32dll/sha512-586.asm(214) : error A2008:  : mm
tmp32dll/sha512-586.asm(220) : error A2008:  : mm
tmp32dll/sha512-586.asm(221) : error A2008:  : mm
tmp32dll/sha512-586.asm(240) : error A2008:  : mm
tmp32dll/sha512-586.asm(248) : error A2008:  : mm
tmp32dll/sha512-586.asm(250) : error A2008:  : mm
tmp32dll/sha512-586.asm(253) : error A2008:  : mm
tmp32dll/sha512-586.asm(255) : error A2008:  : mm
tmp32dll/sha512-586.asm(275) : error A2008:  : mm
tmp32dll/sha512-586.asm(278) : error A2008:  : mm
tmp32dll/sha512-586.asm(288) : error A2008:  : mm
tmp32dll/sha512-586.asm(289) : error A2008:  : mm
tmp32dll/sha512-586.asm(290) : error A2008:  : mm
tmp32dll/sha512-586.asm(291) : error A2008:  : mm
tmp32dll/sha512-586.asm(292) : error A2008:  : mm
tmp32dll/sha512-586.asm(293) : error A2008:  : mm
tmp32dll/sha512-586.asm(294) : error A2008:  : mm
tmp32dll/sha512-586.asm(295) : error A2008:  : mm
NMAKE : fatal error U1077: 'ml' : return code '0x1'
Stop.

解決方案:
google幾次,也沒找到解決方案。仔細分析出錯資訊,原來是MASM的版本過低, 我安裝的MASM32中
C:/masm32/bin>ml
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserv

版本是 6.14.8444,而錯誤提示中推薦8.00 or later ,所以只好下載MASM的高版本
這裡安裝MASM8.0,具體安裝可參考下面的URL,
http://finebree.blog.163.com/blog/static/878793552008102474254280/

將產生的ml.exe拷貝到C:/masm32/bin目錄下,將原來的ml.exe覆蓋即可。

 

二、NMAKE : fatal error U1077: 'cl' : return code '0x2'

解決錯誤1後,重新nmake -f ms/ntdll.mak會出現這個錯誤

解決辦法:
這個在openssl官方網站上找到了,方法是禁用IPV6
perl Configure VC-WIN32 -DOPENSSL_USE_IPV6=0

具體可參照
http://rt.openssl.org/Ticket/Display.html?id=2097&user=guest&pass=guest

三、總結Windows下openssl1.0.0的安裝步驟

版本要求:
ActivePerl: 5.12.0 Build 1200
VC: 6.0
openssl: 1.0.0
masm: 8.0

 

D:/開發工具/openssl-1.0.0>perl Configure VC-WIN32 -DOPENSSL_USE_IPV6=0 --prefix=
c:/openssl-1.0.0

D:/開發工具/openssl-1.0.0>ms/do_ms

D:/開發工具/openssl-1.0.0>nmake -f ms/ntdll.mak

D:/開發工具/openssl-1.0.0>nmake -f ms/ntdll.mak test

D:/開發工具/openssl-1.0.0>nmake -f ms/ntdll.mak install

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.