Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Windows CE (VC-CE) Compilation problem !

253 views
Skip to first unread message

Martin Beaudet

unread,
Jul 22, 2013, 10:29:02 AM7/22/13
to

Hi,

 

We are tried to compile the OpenSSL (1.0.1e) for Windows CE (Standard SDK and also device SDK) using Visual Studio 2005 and also Visual Studio 2008.

We succeed to compiled the WCECompact as suggested in the INSTALL.WCE documents.

 

We followed the instruction of INSTALL.WCE but did not succeed to compile for Windows CE. Too much errors !

 

Then we came across this site : http://blog.csdn.net/sooner01/article/details/4289147

 

We succeeded farther away in the process, but now we have these new errors:

 

.\crypto\bio\b_sock.c(195) : warning C4013: 'getservbyname' undefined; assuming extern returning int

.\crypto\bio\b_sock.c(195) : warning C4047: '=' : 'servent *' differs in levels of indirection from 'int'

.\crypto\bio\b_sock.c(629) : error C2079: 'sa_in6' uses undefined struct 'sockaddr_in6'

.\crypto\bio\b_sock.c(776) : error C2224: left of '.sin6_addr' must have struct/union type

.\crypto\bio\b_sock.c(776) : error C2224: left of '.sin6_addr' must have struct/union type

.\crypto\bio\b_sock.c(776) : error C2168: 'memset' : too few actual parameters for intrinsic function

.\crypto\bio\b_sock.c(777) : error C2224: left of '.sin6_addr' must have struct/union type

.\crypto\bio\b_sock.c(861) : error C2079: 'sa_in6' uses undefined struct 'sockaddr_in6'

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\cl.EXE"' : return code '0x2'

Stop.

 

There seems to be problems with inclusions. On my Windows CE SDK platform the getservbyname function exists (also it's exists on the WCECompact).

The sa_in6 struct exists in the " C:\Program Files (x86)\Windows CE Tools\wce500\{SDK-Platform}\Include\Armv4i\ws2tcpip.h"

 

The OpenSSL developers take the time to consider the Windows CE configuration, but it does not work at all L

 

Is there really someone who has succeed to compile this library for Windows CE ?

We really need OpenSSL, and it very urgent ! For several days we have been stuck on this compilation problem.

 

Hope someone have some fresh news ?

 

Best regards

Martin

Bankapur, Balaji (GE Healthcare)

unread,
Jul 23, 2013, 12:59:17 AM7/23/13
to

Hello Martin,

 

Currently I am in a process of compiling openssl-1.0.1e  on Win CE 6.0. using visual studio 2005

I too got the same errors. Try the following to resolve your errors.

 

Error:

--------

.\crypto\bio\b_sock.c(195) : error C2220: warning treated as error - no 'object' file generated

.\crypto\bio\b_sock.c(195) : warning C4013: 'getservbyname' undefined; assumingextern returning int

.\crypto\bio\b_sock.c(195) : warning C4047: '=' : 'servent *' differs in levelsof indirection from 'int'

.\crypto\bio\b_sock.c(629) : error C2079: 'sa_in6' uses undefined struct 'sockaddr_in6'

.\crypto\bio\b_sock.c(776) : error C2224: left of '.sin6_addr' must have struct/union type

.\crypto\bio\b_sock.c(776) : error C2224: left of '.sin6_addr' must have struct/union type

.\crypto\bio\b_sock.c(776) : error C2168: 'memset' : too few actual parameters for intrinsic function

.\crypto\bio\b_sock.c(777) : error C2224: left of '.sin6_addr' must have struct/union type

.\crypto\bio\b_sock.c(861) : error C2079: 'sa_in6' uses undefined struct 'sockaddr_in6'

NMAKE : fatal error U1077: '"D:/Program Files/Microsoft Visual Studio 8/VC/bin\cl.EXE"' : return code '0x2' Stop.

Fix for Error:

----------------

Replace

"#    if !defined(OPENSSL_NO_SOCK) && defined(_WIN32_WINNT)" with

"#    if !defined(OPENSSL_NO_SOCK) && ( defined(_WIN32_WINNT) ||     defined(_WIN32_WCE))" in "openssl-1.0.1e\e_os.h" @ line 273

 

Regards

Balaji

Pierre DELAAGE

unread,
Jul 23, 2013, 1:33:09 AM7/23/13
to
Hello,
Yes, I did compile successfully openssl on WCE 5 / WM 6.

Check this page in openssl rt system : http://rt.openssl.org/index.html?q=2350
(user guest / password guest).
Particularly check the 2012 contribution.

Check also the full record of some discussion between me and Andy Polyakov here :
http://www.mail-archive.com/opens...@openssl.org/msg31829.html

And also my own page http://delaage.pierre.free.fr  for some explanation for the full WCE compilation process (with EVC 4.2).

Yours sincerely,
Pierre Delaage

Geoffrey Coram

unread,
Jul 23, 2013, 8:13:53 AM7/23/13
to
I have compiled up to 0.9.8x for Windows CE, using MS Visual C++ 6.0.
(The site you mentioned was working with 0.9.8k, I think.)

I was unable to compile 1.0.1 for WCE, as I recall I had some issues
with FIPS, and I did not spend the time to resolve it.

I start with this:
perl Configure no-rc5 no-idea no-ec VC-CE

because I don't need those algorithms; you might try putting in those
and other no- options to see if you can get something to compile.

I do have a note:
----
For some reason,
-I"C:\Windows CE Tools\WCE211\MS HPC Pro\include"
doesn't get into cedll.mak on the CFLAG line, even though INCLUDE is
set to include it
----
which might be something to check, since you mention a possible
problem with includes.




On 07/22/2013 10:29, Martin Beaudet <martin....@intelia.com>
wrote:
> configuration, but it does not work at all :(
>
> Is there really someone who has succeed to compile this library for
> Windows CE ?
> We really need OpenSSL, and it very urgent ! For several days we
> have been stuck on this compilation problem.
>
> Hope someone have some fresh news ?
>
> Best regards
> Martin

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openss...@openssl.org
Automated List Manager majo...@openssl.org

Pierre DELAAGE

unread,
Jul 23, 2013, 8:53:40 AM7/23/13
to
Hello,
To be more precise : on that page you can find a patch to compile V1.0.2
without FIPS on WCE :
http://rt.openssl.org/index.html?q=2350
(user guest / password guest).
Particularly check the 2012 contribution.

On my own page http://delaage.pierre.free.fr/ you will find details for
the compilation process, extras libs and bat files,
although to compile1.0.0a, but still relevant vs v1.0.2 version.

Regards,
Pierre



Le 23/07/2013 14:13, Geoffrey Coram a �crit :

Martin Beaudet

unread,
Jul 23, 2013, 10:27:07 AM7/23/13
to
Hi Pierre,

I'm not an expert of TLS or any encryption technology but I just want to use OpenSSL for an SMTP client and possibly an FTP server. Thus, is there some OpenSSL project options that I should remove to get the smallest footprint of the library that should be sufficient for the needs (certificates / smtp / FTP server) ?

Also, it is important for us to get the library in (*.lib) and not by DLL.

It will be nice if you could make a list that enumerate all the change you did to compile OpenSSL on Windows CE. Ideally on your personal web page, because I'm not able to access to the rt.openssl.org page you indicate me. It would be beneficial to others who have the same problem as me.

Best regards
Martin

-----Original Message-----
From: owner-ope...@openssl.org [mailto:owner-ope...@openssl.org] On Behalf Of Pierre DELAAGE
Sent: 23 juillet 2013 08:54
To: openss...@openssl.org
Cc: Geoffrey Coram
Subject: Re: Windows CE (VC-CE) Compilation problem !

Hello,
To be more precise : on that page you can find a patch to compile V1.0.2 without FIPS on WCE :
http://rt.openssl.org/index.html?q=2350
(user guest / password guest).
Particularly check the 2012 contribution.

On my own page http://delaage.pierre.free.fr/ you will find details for the compilation process, extras libs and bat files, although to compile1.0.0a, but still relevant vs v1.0.2 version.

Regards,
Pierre



Pierre DELAAGE

unread,
Jul 23, 2013, 10:40:50 AM7/23/13
to
Oh..I see
Go there :
http://rt.openssl.org/

Then use credentials : user guest / password guest

Then, in the top right "SEARCH" text box, type : 2350
and then ENTER...

Now you see my patches to openssl.

Then go the the parargraph "Attachment", and dowload that of 2012-12-12
at 23:45:31.

link reminder :
http://rt.openssl.org/Ticket/Attachment/35510/19075/patched_opensslV100a_forWCE_4.txt

This file contains all my modif to openssl.

Anyway you will have to check e_capi.c from the openssl website THAT
embeds different set of modifications agreed with Andy Polyakov, that
are different from my original patch.

Both files shoud work...

****
Well, that said, if you just use openssl to set up an SMTPS client, you
could be interested in using my stunnel tool for WCE from my webpage....

Stunnel does the job you want to do.

Regards,
Pierre


Le 23/07/2013 16:27, Martin Beaudet a �crit :
> Hi Pierre,
>
> I'm not an expert of TLS or any encryption technology but I just want to use OpenSSL for an SMTP client and possibly an FTP server. Thus, is there some OpenSSL project options that I should remove to get the smallest footprint of the library that should be sufficient for the needs (certificates / smtp / FTP server) ?
>
> Also, it is important for us to get the library in (*.lib) and not by DLL.
>
> It will be nice if you could make a list that enumerate all the change you did to compile OpenSSL on Windows CE. Ideally on your personal web page, because I'm not able to access to the rt.openssl.org page you indicate me. It would be beneficial to others who have the same problem as me.
>
> Best regards
> Martin
>
> -----Original Message-----
> From: owner-ope...@openssl.org [mailto:owner-ope...@openssl.org] On Behalf Of Pierre DELAAGE
> Sent: 23 juillet 2013 08:54
> To: openss...@openssl.org
> Cc: Geoffrey Coram
> Subject: Re: Windows CE (VC-CE) Compilation problem !
>
> Hello,
> To be more precise : on that page you can find a patch to compile V1.0.2 without FIPS on WCE :
> http://rt.openssl.org/index.html?q=2350
> (user guest / password guest).
> Particularly check the 2012 contribution.
>
> On my own page http://delaage.pierre.free.fr/ you will find details for the compilation process, extras libs and bat files, although to compile1.0.0a, but still relevant vs v1.0.2 version.
>
> Regards,
> Pierre
>
>
>
> Le 23/07/2013 14:13, Geoffrey Coram a �crit :

karan.reddy

unread,
Apr 28, 2014, 8:58:03 AM4/28/14
to
Hi,

I am very new to Openssl. My aim is to compile openssl for WINCE 6.0 OS.
After spending lot of time on google , i found procedure to build openssl
for WINCE 6.0. But my attempt to build the wcecompat WINCE runtime libraries
is unsuccessful. Below is my environment

Host Platform : WINDOWS 7
Visual Studio : 2008
TargetCpu : x86

Below are the steps followed to build wcecompat:

1) Downloaded the source from
"https://github.com/mauricek/wcecompat/tree/master" git.
2) Using Visual Studio Command prompt for build. Declared the env following
variables:

set OSVERSION=WCE600
set TARGETCPU=x86
set PLATFORM=VC-CE

3) Created the make files using "perl config.pl" command.
4) Executed nmake command.

The build fails with compilation errors. Below are the logs:

--------------------------------------------------------------------------------------------------
args.cpp
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(235) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(237) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(239) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(241) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(243) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(245) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(247) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(249) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(251) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(253) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(255) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(257) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(258) : error
C2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(994) : error
C2556: 'const wchar_t *wcschr(const wchar_t *,wchar_t)' : overloaded
function differs only by return type from 'wchar_t *wcschr(const wchar_t
*,wchar_t)'
include\string.h(36) : see declaration of 'wcschr'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(994) : error
C2373: 'wcschr' : redefinition; different type modifiers
include\string.h(36) : see declaration of 'wcschr'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1026) :
error C2556: 'const wchar_t *wcspbrk(const wchar_t *,const wchar_t *)' :
overloaded function differs only by return type from 'wchar_t *wcspbrk(const
wchar_t *,const wchar_t *)'
include\string.h(46) : see declaration of 'wcspbrk'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1026) :
error C2373: 'wcspbrk' : redefinition; different type modifiers
include\string.h(46) : see declaration of 'wcspbrk'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1027) :
error C2556: 'const wchar_t *wcsrchr(const wchar_t *,wchar_t)' : overloaded
function differs only by return type from 'wchar_t *wcsrchr(const wchar_t
*,wchar_t)'
include\string.h(47) : see declaration of 'wcsrchr'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1027) :
error C2373: 'wcsrchr' : redefinition; different type modifiers
include\string.h(47) : see declaration of 'wcsrchr'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1029) :
error C2556: 'const wchar_t *wcsstr(const wchar_t *,const wchar_t *)' :
overloaded function differs only by return type from 'wchar_t *wcsstr(const
wchar_t *,const wchar_t *)'
include\string.h(49) : see declaration of 'wcsstr'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1029) :
error C2373: 'wcsstr' : redefinition; different type modifiers
include\string.h(49) : see declaration of 'wcsstr'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1079) :
error C2264: 'wcschr' : error in function definition or declaration;
function not called
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1081) :
error C2264: 'wcspbrk' : error in function definition or declaration;
function not called
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1083) :
error C2264: 'wcsrchr' : error in function definition or declaration;
function not called
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1085) :
error C2264: 'wcsstr' : error in function definition or declaration;
function not called
include\stdio.h(62) : warning C4005: 'stdin' : macro redefinition
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(81)
: see previous definition of 'stdin'
include\stdio.h(63) : warning C4005: 'stdout' : macro redefinition
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(82)
: see previous definition of 'stdout'
include\stdio.h(64) : warning C4005: 'stderr' : macro redefinition
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(83)
: see previous definition of 'stderr'
include\stdio.h(74) : error C2375: 'swprintf' : redefinition; different
linkage
C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\swprintf.inl(85) : see declaration of 'swprintf'
include\stdio.h(75) : error C2375: 'vswprintf' : redefinition; different
linkage
C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\swprintf.inl(97) : see declaration of 'vswprintf'
include\stdio.h(125) : error C2733: second C linkage of overloaded function
'_wfdopen' not allowed
include\stdio.h(125) : see declaration of '_wfdopen'
include\stdlib.h(48) : warning C4273: '_wputenv' : inconsistent dll linkage
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(955)
: see previous definition of '_wputenv'
include\stdlib.h(90) : warning C4273: '_ultow' : inconsistent dll linkage
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(884)
: see previous definition of '_ultow'
include\stdlib.h(91) : warning C4273: '_itow' : inconsistent dll linkage
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(878)
: see previous definition of '_itow'
include\stdlib.h(92) : warning C4273: '_ltow' : inconsistent dll linkage
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(881)
: see previous definition of '_ltow'
include\stdlib.h(95) : warning C4273: 'wcstoul' : inconsistent dll linkage
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(889)
: see previous definition of 'wcstoul'
c:\workspace\wcecompat-master\src\ts_string.h(106) : warning C4996:
'wcscpy': This function or variable may be unsafe. Consider using wcscpy_s
instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online
help for details.
include\string.h(38) : see declaration of 'wcscpy'
c:\workspace\wcecompat-master\src\ts_string.h(151) : warning C4996:
'wcscat': This function or variable may be unsafe. Consider using wcscat_s
instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online
help for details.
include\string.h(35) : see declaration of 'wcscat'

------------------------------------------------------------------------------------------------

Am i missing any configuration step? I got stuck for 2 weeks now. Please
help me to resolve this error.
Let me know for more details
Thanks in advance





--
View this message in context: http://openssl.6102.n7.nabble.com/Windows-CE-VC-CE-Compilation-problem-tp45909p49773.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.

Geoffrey Coram

unread,
Apr 30, 2014, 7:08:12 AM4/30/14
to
I use wcecompat with OpenSSL for WinCE 2.11; I haven't tried building
for a later version of WinCE, and I use an older compiler. There's
some basic problem with your build; it looks like something as basic
as using a C compiler to compile C++ and getting tripped up on new
syntax. Are you able to build a "hello, world" program for WinCE?

I remember one issue I had with wcecompat was that the configure
script didn't get the include paths right, particularly for paths that
included spaces.

-Geoffrey

Pierre DELAAGE

unread,
May 2, 2014, 10:48:35 AM5/2/14
to
Hello,
I recommend you have a look at here, where I compiled 1.0.0a.

http://delaage.pierre.free.fr/

There is a lot of compilation issues to compile for WCE.
I am NOT using VC compiler, but a free compiler for WCE from MS, called EVC.
Basically, compilations options are very similar to ones for VC, but you
have also to use the proper WCE SDK,
and take care to adapt some script from MS that are NOT always instantly
usable "as is".

See my web page for guidelines for that.

I presently do not have time to recompile the last version of openssl.
And some issues around my patches are to be clarified with openssl team
before being included in the openssl mainstream.

On my page, you will find specific instructions to compile wcecompat.

Best regards,
Pierre Delaage


Le 28/04/2014 14:58, karan.reddy a �crit :
> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(81)
> : see previous definition of 'stdin'
> include\stdio.h(63) : warning C4005: 'stdout' : macro redefinition
> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(82)
> : see previous definition of 'stdout'
> include\stdio.h(64) : warning C4005: 'stderr' : macro redefinition
> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(83)
> : see previous definition of 'stderr'
> include\stdio.h(74) : error C2375: 'swprintf' : redefinition; different
> linkage
> C:\Program Files\Microsoft Visual Studio
> 9.0\VC\INCLUDE\swprintf.inl(85) : see declaration of 'swprintf'
> include\stdio.h(75) : error C2375: 'vswprintf' : redefinition; different
> linkage
> C:\Program Files\Microsoft Visual Studio

karan.reddy

unread,
May 3, 2014, 2:54:27 AM5/3/14
to
Thanks for your suggestions. I missed a basic step to set the INCLUDE path
which points to VS header files and Windows Embedded Compact SDK. This was
not mentioned in the blog which i followed. I was able to successfully
compile openssl for WINCE 6.0 as well as WEC7. Thanks all.



--
View this message in context: http://openssl.6102.n7.nabble.com/Windows-CE-VC-CE-Compilation-problem-tp45909p49917.html
0 new messages