[openssl-users] Building OpenSSL-1.1.0f for WinCE (Windows Embedded Compact 7.0)

Topolewski, Tom TopolewskiT at cumminsallison.com
Mon Jun 19 16:58:34 UTC 2017


Hello,

This is the first time I'm building OpenSSL for any platform (I'm pretty new to this solution).

I'm trying to build OpenSSL 1.1.0f library on ARM7 (backwards compatible, SDK version is ARM4) running Windows Embedded Compact 7.0. I'm hoping to implement a client interfacing web service requiring TLS 1.2 with the https connections.

I'm following this instructions:
http://documentation.unified-automation.com/uasdkcpp/1.5.2/html/CompileOpenSSLCE.html

wcecompat compatibility library is compiled successfully - I'm getting two libraries: wcecompat.lib and wcecompatex.lib.

Because with the 1.1.0 release the build process has changed I'm looking at this site as well:
https://stackoverflow.com/questions/39076244/why-there-is-no-ms-do-ms-bat-after-perl-configure-vc-win64a

Since I'm not sure where my problem is I will provide the list of steps I'm taking:

1. In Cygwin64 Terminal: tar -xvzf openssl-1.1.0f.tar.gz
2. In Visual Studio 2008 Command Prompt I'm changing directory to C:\cygwin64\home\myaccount\openssl-1.1.0f and entering the following:

set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;
set LIB=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib;
set LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB;
set Path=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\cygwin64\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;

set OSVERSION=WCE700
set PLATFORM=VC-CE
set TARGETCPU=ARMV4I
set WCECOMPAT="C:\cygwin64\home\myaccount\wcecompat-master"
set LIB=C:\Program Files (x86)\Windows CE Tools\SDKs\CA_MM2_CE7\Lib\ARMv4I;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\lib\ARMV4I;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib
set INCLUDE=C:\Program Files (x86)\Windows CE Tools\SDKs\CA_MM2_CE7\Include\Armv4i;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;
set Path=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm;C:\Perl64\site\bin;%Path%
set LIBPATH="C:\Program Files (x86)\Windows CE Tools\SDKs\CA_MM2_CE7\Lib\ARMv4I";C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\lib\ARMV4I;

3. Configuring the make file with the following (full path to perl to make sure ActivePerl-5.24.0.2400 is used):

c:\Perl64\bin\perl Configure no-idea no-mdc2 no-rc5 no-asm no-ssl3 VC-CE

Configuring OpenSSL version 1.1.0f (0x1010006fL)
    no-asan         [default]  OPENSSL_NO_ASAN
    no-asm          [option]   OPENSSL_NO_ASM
    no-crypto-mdebug [default]  OPENSSL_NO_CRYPTO_MDEBUG
    no-crypto-mdebug-backtrace [default]  OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
    no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128
    no-egd          [default]  OPENSSL_NO_EGD
    no-fuzz-afl     [default]  OPENSSL_NO_FUZZ_AFL
    no-fuzz-libfuzzer [default]  OPENSSL_NO_FUZZ_LIBFUZZER
    no-heartbeats   [default]  OPENSSL_NO_HEARTBEATS
    no-idea         [option]   OPENSSL_NO_IDEA (skip dir)
    no-md2          [default]  OPENSSL_NO_MD2 (skip dir)
    no-mdc2         [option]   OPENSSL_NO_MDC2 (skip dir)
    no-msan         [default]  OPENSSL_NO_MSAN
    no-rc5          [option]   OPENSSL_NO_RC5 (skip dir)
    no-sctp         [default]  OPENSSL_NO_SCTP
    no-ssl-trace    [default]  OPENSSL_NO_SSL_TRACE
    no-ssl3         [option]   OPENSSL_NO_SSL3
    no-ssl3-method  [default]  OPENSSL_NO_SSL3_METHOD
    no-ubsan        [default]  OPENSSL_NO_UBSAN
    no-unit-test    [default]  OPENSSL_NO_UNIT_TEST
    no-weak-ssl-ciphers [default]  OPENSSL_NO_WEAK_SSL_CIPHERS
    no-zlib         [default]
    no-zlib-dynamic [default]
Configuring for VC-CE
CC            =cl
CFLAG         =/W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYS_WINCE-DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT -D_WIN32_WCE=700 -DUNDER_CE=700 -DWCE_PLATFORM_VC-CE -DARM -D_ARM_ -DARMV4I -QRarch4T -QRinterwork-return -I$(WCECOMPAT)/include  /MD /O1i
SHARED_CFLAG  =
DEFINES       =DSO_WIN32 NDEBUG OPENSSL_THREADS OPENSSL_NO_STATIC_ENGINE OPENSSL
_PIC
LFLAG         =/nologo /opt:ref /subsystem:windowsce,7.00 /machine:THUMB
PLIB_LFLAG    =
EX_LIBS       =3
APPS_OBJ      =win32_init.o
CPUID_OBJ     =mem_clr.o
UPLINK_OBJ    =
BN_ASM        =bn_asm.o
EC_ASM        =
DES_ENC       =des_enc.o fcrypt_b.o
AES_ENC       =aes_core.o aes_cbc.o
BF_ENC        =bf_enc.o
CAST_ENC      =c_enc.o
RC4_ENC       =rc4_enc.o rc4_skey.o
RC5_ENC       =rc5_enc.o
MD5_OBJ_ASM   =
SHA1_OBJ_ASM  =
RMD160_OBJ_ASM=
CMLL_ENC      =camellia.o cmll_misc.o cmll_cbc.o
MODES_OBJ     =
PADLOCK_OBJ   =
CHACHA_ENC    =chacha_enc.o
POLY1305_OBJ  =
BLAKE2_OBJ    =
PROCESSOR     =
RANLIB        =true
ARFLAGS       =/nologo
PERL          =c:\Perl64\bin\perl.exe

THIRTY_TWO_BIT mode
BN_LLONG mode

Configured for VC-CE.

4. Compiling the library with the following:

nmake

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        "c:\Perl64\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl"  "-omakefile" "crypto\include\internal\bn_conf.h.in" > crypto\include\internal\bn_conf.h
        "c:\Perl64\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl"  "-omakefile" "crypto\include\internal\dso_conf.h.in" > crypto\include\internal\dso_conf.h
        "c:\Perl64\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl"  "-omakefile" "include\openssl\opensslconf.h.in" > include\openssl\opensslconf.h
        "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" depend && "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" _all

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl  /I "." /I "crypto\include" /I "include" -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC "-DENGINESDIR=\"C:\\ProgramFiles\\OpenSSL\\lib\\engines-1_1\"" "-DOPENSSLDIR=\"C:\\Program Files\\Common Files\\SSL\"" /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYS_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT -D_WIN32_WCE=700 -DUNDER_CE=700 -DWCE_PLATFORM_VC-CE -DARM -D_ARM_ -DARMV4I -QRarch4T -QRinterwork-return -I"C:\cygwin64\home\myaccount\wcecompat-master"/include  /MD /O1i /Zi /Fdossl_static -c /Focrypto\aes\aes_ige.obj "crypto\aes\aes_ige.c" aes_ige.c
C:\cygwin64\home\myaccount\openssl-1.1.0f\e_os.h(485) : error C2220: warning treated as error - no 'object' file generated
C:\cygwin64\home\myaccount\openssl-1.1.0f\e_os.h(485) : warning C4005: 'open' : macro redefinition
        C:\cygwin64\home\myaccount\wcecompat-master\include\io.h(25) : see previous definition of 'open'
C:\cygwin64\home\myaccount\openssl-1.1.0f\e_os.h(486) : warning C4005: 'fdopen' : macro redefinition
        C:\cygwin64\home\myaccount\wcecompat-master\include\io.h(38) : see previous definition of 'fdopen'
C:\cygwin64\home\myaccount\openssl-1.1.0f\e_os.h(487) : warning C4005: 'close' : macro redefinition
        C:\cygwin64\home\myaccount\wcecompat-master\include\io.h(27) : see previous definition of 'close'
C:\cygwin64\home\myaccount\openssl-1.1.0f\e_os.h(491) : warning C4005: 'unlink' : macro redefinition
        C:\cygwin64\home\myaccount\wcecompat-master\include\io.h(32) : see previous definition of 'unlink'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\cl.EXE"' : return code '0x2' Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2' Stop.


This may be something simple but I use Visual Studio 2008 to build my code and manually setting up the build process is not simple for me. I would appreciate if someone could point me into a right direction. Thank you in advance.

I also tried to build openssl-1.0.2l (following the same instructions). I went a little further seeing link errors and one lib (libeay32d.lib) generated but that's not an expected result.

Best regards,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20170619/66531d28/attachment-0001.html>


More information about the openssl-users mailing list