[openssl-users] openssl 1.1.1 cross compile error to vxworks 6.8

Matt Caswell matt at openssl.org
Fri Oct 26 10:07:07 UTC 2018



On 26/10/2018 09:47, lu zhihong wrote:
> Hi,All
> Now I am trying build openssl1.1.1 version libs in cross compiler platform(susu12+Vxworks 6.8 ). the build target is vxworks-ppc860.but it failed.
> I have tried use different Vxworks versions(such as Vxworks6.4,Vxworks6.8),it still failed.
> I want to know if build openssl libs using Vxworks compiler, does it need open some special macro or need take care something? Please help to point out.

Vxworks isn't a platform we test on - but there is vxworks specific code
in the codebase so in theory it should work. We're always happy to
receive patches for non-core platforms.

> 
> The compile issues details messages as follows:
> 1. h_errno not defined
> crypto/bio/b_addr.c: In function 'BIO_lookup_ex':
> crypto/bio/b_addr.c:785: error: 'h_errno' undeclared (first use in this function)

h_errno has been removed from recent versions of POSIX. It looks like we
should remove this (at least for recent POSIX versions). Patches
gratefully received.


> 
> 2. streams/un.h not found , I can only found sys/un.h
> include/internal/sockets.h:76:29: error: streams/un.h: No such file or directory

That's a bit odd. internal/sockets.h has this code:

#    ifdef OPENSSL_SYS_VXWORKS
#     include <streams/un.h>
#    else
#     include <sys/un.h>
#    endif

So for all our other platforms we include sys/un.h, but for vxworks only
we include streams/un.h. Presumably this was done as some historical
workaround for this platform that no longer applies to current versions.
A fix would be to simply remove this special case code and always
include sys/un.h - although this begs the question: is the special case
still needed for some historical vxworks platform version that people
are still using?


> 3. some int type redefined(int8_t, int16_t, int32_t, uint8_t , uint16_t, uint32_t, int64_t, uint64_t) both in stdint.h and vxTypes.h
> When first include vxTypes.h then include stdint.h will make this issue
> 
> One example:
> In include/openssl/crypto.h
> First include time.h (time.h -> vxWorks.h-> vxWorksCommon.h-> vxTypes.h)
> Then include openssl/e_os2.h(e_os2.h -> stdint.h)
> 

TBH, this looks like a vxworks platform bug. It shouldn't fail if you
include 2 different standard header files (time.h and stdint.h)!?

Matt



More information about the openssl-users mailing list