> I am trying to compile OpenSSL V0.9.8a with MS VC/C++ V8.0, which is the > version in Visual Studio 2005. > The compiling fails with a series of errors, which were trivial to fix, > except for the last one. > > 1. *********************************************** > Error: > ---8<--- > cl /Fotmp32dll\enc_read.obj -Iinc32 -Itmp32dll /MD /W3 /WX /Gs0 /GF > /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN > -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_USE_APPLINK -I. /Fdout32dll > -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_KRB5 > -DOPENSSL_NO_DYNAMIC_ENGINE -D_WINDLL -DOPENSSL_BUILD_SHLIBCRYPTO -c > .\crypto\des\enc_read.c > enc_read.c > .\crypto\des\enc_read.c(150) : error C2220: warning treated as error - no > 'object' file generated > .\crypto\des\enc_read.c(150) : warning C4996: 'read' was declared deprecated > C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\io.h(329) : see > declaration of 'read' > Message: 'The POSIX name for this item is deprecated. Instead, use > the ISO C++ conformant name: _read. See online help for details.' > .\crypto\des\enc_read.c(172) : warning C4996: 'read' was declared deprecated > C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\io.h(329) : see > declaration of 'read' > Message: 'The POSIX name for this item is deprecated. Instead, use > the ISO C++ conformant name: _read. See online help for details.' > NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio > 8\VC\BIN\cl.EXE"' : return code '0x2' > Stop. > ---8<--- > > Solution: > Change line 150 in crypto\des\enc_read.c from: > i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num); > To: > i=_read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
Fix it according to http://cvs.openssl.org/chngview?cn=14626. > 7. *********************************************** > Error: > ---8<--- > rc /fo"tmp32dll\libeay32.res" /d CRYPTO ms\version32.rc > link /nologo /subsystem:console /machine:I386 /opt:ref /dll > /out:out32dll\libeay32.dll /def:ms/LIBEAY32.def > @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nmDD.tmp > > ms/LIBEAY32.def(7) : warning LNK4017: DESCRIPTION statement not supported for > the target platform; ignored > Creating library out32dll\libeay32.lib and object out32dll\libeay32.exp > cl /Fotmp32dll\s2_meth.obj -Iinc32 -Itmp32dll /MD /W3 /WX /Gs0 /GF > /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN > -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_USE_APPLINK -I. /Fdout32dll > -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_KRB5 > -DOPENSSL_NO_DYNAMIC_ENGINE -D_WINDLL -DOPENSSL_BUILD_SHLIBSSL -c > .\ssl\s2_meth.c > s2_meth.c > cl /Fotmp32dll\s2_srvr.obj -Iinc32 -Itmp32dll /MD /W3 /WX /Gs0 /GF > /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN > -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_USE_APPLINK -I. /Fdout32dll > -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_KRB5 > -DOPENSSL_NO_DYNAMIC_ENGINE -D_WINDLL -DOPENSSL_BUILD_SHLIBSSL -c > .\ssl\s2_srvr.c > s2_srvr.c > .\ssl\s2_srvr.c(147) : error C2220: warning treated as error - no 'object' > file generated > .\ssl\s2_srvr.c(147) : warning C4244: 'initializing' : conversion from > 'time_t' to 'unsigned long', possible loss of data > NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio > 8\VC\BIN\cl.EXE"' : return code '0x2' > Stop. > ---8<--- > > Solution: > ? This requires further consideration. As *temporary* workaround you can issue 'set CL=-D_USE_32BIT_TIME_T' prior running nmake. One can argue that one could as well add -D_USE_32BIT_TIME_T to VC-32.pl [next to other -D_*NO_DEPRECATE], but I'd rather use this opportunity to sanitize relevant code pathes across multiple platforms than try to point patch for 32-bit VC8 in particular. > *********************************************** > > Additionally, I think the linker options have changed too. > > Here's a line from ms\ntdll.mak: > LFLAGS=/nologo /subsystem:console /machine:I386 /opt:ref > > Here's output from "link /?": > ... > /MACHINE:{ARM|EBC|IA64|MIPS|MIPS16|MIPSFPU|MIPSFPU16| > SH4|THUMB|X64|X86} > ... > > "/machine:I386" should probably read "/machine:X86" now, but I have no way of > knowing since the compiler stopped before the linker was invoked. http://cvs.openssl.org/chngview?cn=14626 removes /machine altogether, there is no need to it on WIN[32|64] targets. A. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
