openssl 1.1.1 cross compile error to vxworks 6.8

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

openssl 1.1.1 cross compile error to vxworks 6.8

lu zhihong
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.

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)

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



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)

So: In file included from include/openssl/e_os2.h:258,
from include/openssl/crypto.h:17,
from crypto/aes/aes_core.c:42:
vxworks-6.8/target/usr/h/stdint.h:26: error: redefinition of typedef 'int8_t'
vxworks-6.8/target/h/types/vxTypes.h:180: error: previous declaration of 'int8_t' was here
vxworks-6.8/target/usr/h/stdint.h:27: error: redefinition of typedef 'int16_t'
vxworks-6.8/target/h/types/vxTypes.h:190: error: previous declaration of 'int16_t' was here
vxworks-6.8/target/usr/h/stdint.h:28: error: redefinition of typedef 'int32_t'
vxworks-6.8/target/h/types/vxTypes.h:200: error: previous declaration of 'int32_t' was here
vxworks-6.8/target/usr/h/stdint.h:31: error: redefinition of typedef 'uint8_t'
vxworks-6.8/target/h/types/vxTypes.h:185: error: previous declaration of 'uint8_t' was here
vxworks-6.8/target/usr/h/stdint.h:32: error: redefinition of typedef 'uint16_t'
vxworks-6.8/target/h/types/vxTypes.h:195: error: previous declaration of 'uint16_t' was here
vxworks-6.8/target/usr/h/stdint.h:33: error: redefinition of typedef 'uint32_t'
vxworks-6.8/target/h/types/vxTypes.h:205: error: previous declaration of 'uint32_t' was here
vxworks-6.8/target/usr/h/stdint.h:88: error: redefinition of typedef 'int64_t'
vxworks-6.8/target/h/types/vxTypes.h:210: error: previous declaration of 'int64_t' was here
vxworks-6.8/target/usr/h/stdint.h:92: error: redefinition of typedef 'uint64_t'
vxworks-6.8/target/h/types/vxTypes.h:215: error: previous declaration of 'uint64_t' was here

Thank you in advance for your help!

lu
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: openssl 1.1.1 cross compile error to vxworks 6.8

Matt Caswell-2


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

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users