Building OpenSSL on Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Building OpenSSL on Windows

Hellstern, Thomas (LfSt)
Building OpenSSL on Windows

Hi,

I tried to build OpenSSL-fips-1.0 on Windows XP.

So I followed the install.w32-instructions:

- perl Configure VC-WIN32
- ms\do_ms
- nmake -f ms\nt.mak (to build a static library)
--> here I got after the copy of the headers the following error:
        cl /Fotmp32\cryptlib.obj  -Iinc32 -Itmp32 /MD /W3 /WX /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_N

ONSTDC_NO_DEPRECATE /Fdout32 -DOPENSSL_NO_KRB5  -c .\crypto\cryptlib.c
cryptlib.c
.\crypto\cryptlib.c(59) : fatal error C1083: Include-Datei kann nicht ge÷ffnet werden: 'stdio.h': No such file or directory

NMAKE : fatal error U1077: 'cl' : Rueckgabe-Code '0x2'
Stop.

- now I copied the default-headers from the visual studio to <openssl>\inc32
- and started again nmake
- the libraries <openssl>\out32\ssleay32.lib and <openssl>\out32\libeay32.lib were built
--> but then I got the message:
        lib /out:out32\ssleay32.lib @C:\Temp\nmb05352.
Microsoft (R) Library Manager Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

tmp32\s2_meth.obj tmp32\s2_srvr.obj tmp32\s2_clnt.obj tmp32\s2_lib.obj tmp32\s2_enc.obj tmp32\s2_pkt.obj tmp32\s3_meth.obj tmp32\s3_srvr.obj tmp32\s3_clnt.obj tmp32\s3_lib.obj tmp32\s3_enc.obj tmp32\s

3_pkt.obj tmp32\s3_both.obj tmp32\s23_meth.obj tmp32\s23_srvr.obj tmp32\s23_clnt.obj tmp32\s23_lib.obj tmp32\s23_pkt.obj tmp32\t1_meth.obj tmp32\t1_srvr.obj tmp32\t1_clnt.obj tmp32\t1_lib.obj tmp32\t1

_enc.obj tmp32\ssl_lib.obj tmp32\ssl_err2.obj tmp32\ssl_cert.obj tmp32\ssl_sess.obj tmp32\ssl_ciph.obj tmp32\ssl_stat.obj tmp32\ssl_rsa.obj tmp32\ssl_asn1.obj tmp32\ssl_txt.obj tmp32\ssl_algs.obj tmp3

2\bio_ssl.obj tmp32\ssl_err.obj tmp32\kssl.obj advapi32.lib
        cl /Fotmp32\md2test.obj -Iinc32 -Itmp32 /MD /W3 /WX /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NON

STDC_NO_DEPRECATE /Fdout32 -DOPENSSL_NO_KRB5  -c .\crypto\md2\md2test.c
md2test.c
        link /nologo /subsystem:console /machine:I386 /opt:ref /out:out32\md2test.exe @C:\Temp\nmc05352.
LINK : fatal error LNK1181: Eingabedatei "setargv.obj" kann nicht ge÷ffnet werden
NMAKE : fatal error U1077: 'link' : Rueckgabe-Code '0x49d'
Stop.

- with every new try to build the libraries (e.g. with other compiler-settings) I immediately get the same error:
H:\Work\Download\www.openssl.org\OpenSSL-fips-1.0\openssl>nmake -f ms\nt.mak

Microsoft (R) Program Maintenance-Dienstprogramm: Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. Alle Rechte vorbehalten.

Building OpenSSL
        link /nologo /subsystem:console /machine:I386 /opt:ref /out:out32\md2test.exe @C:\Temp\nma05664.
LINK : fatal error LNK1181: Eingabedatei "setargv.obj" kann nicht ge÷ffnet werden
NMAKE : fatal error U1077: 'link' : Rueckgabe-Code '0x49d'
Stop.

H:\Work\Download\www.openssl.org\OpenSSL-fips-1.0\openssl>


Now - finally - my questions:
- Was it the right solution to copy the VC-Headers to <openssl>\inc32?
- Are the libraries <openssl>\out32\ssleay32.lib and <openssl>\out32\libeay32.lib built completely and correctly?
- What can I do to (re)build the whole project?

- On building the dll I get a link-error:
        link /nologo /subsystem:console /machine:I386 /opt:ref /dll  /out:out32dll\libeay32.dll /def:ms/LIBEAY32.def @C:\Temp\nma03560.

LINK : fatal error LNK1104: Datei "MSVCRT.lib" kann nicht ge÷ffnet werden
NMAKE : fatal error U1077: 'link' : Rueckgabe-Code '0x450'
Stop.

  Where have I to put this lib or tell the path to the vc-libs in order to succeed?

Thanks a lot!

Thomas

Reply | Threaded
Open this post in threaded view
|

Re: Building OpenSSL on Windows

Dr. Stephen Henson
On Mon, Apr 03, 2006, Hellstern, Thomas (LfSt) wrote:

> Hi,
>
> I tried to build OpenSSL-fips-1.0 on Windows XP.
>
> So I followed the install.w32-instructions:
>

Since you are using the FIPS distribution I'm assuming you want the FIPS
validated module and a version of OpenSSL linked against it.

In that case you cannot use VC++ at all for the compilation of the validated
module. You can use VC++ later to link a version of OpenSSL against it.

Full details will appear in the user guide. In the meantime check out the
recent thread on this subject which outlines the procdure.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]