openssl-1.1.1b: Compilation errors when use async and ct

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

openssl-1.1.1b: Compilation errors when use async and ct

OpenSSL - User mailing list
Hi,

While compiling async I see below errors with UCLIBC.

libcrypto.so: undefined reference to `getcontext'
libcrypto.so: undefined reference to `setcontext'
libcrypto.so: undefined reference to `makecontext'


As UCLIBC doesn't have support to these APIs, i have added no-async in configure. With no-async below errors are seen.

libcrypto.so: undefined reference to `ERR_load_ASYNC_strings'
libcrypto.so: undefined reference to `async_init'
libcrypto.so: undefined reference to `async_delete_thread_state'
libcrypto.so: undefined reference to `async_deinit'


Do we need to have macro check" #ifndef OPENSSL_NO_ASYNC" before these api calls?

Similarly for CT, we are seeing below errors. With no-ct options, compilation is OK.

We would like to know what would be the impact if we disable async and ct features. Could you please help us in understanding these features.

In file included from ../../../../vendor/openssl/crypto/ct/ct_b64.c:17:0:
../../../../vendor/openssl/crypto/ct/ct_locl.h:58:5: error: unknown type name 'sct_version_t'
     sct_version_t version;
     ^
../../../../vendor/openssl/crypto/ct/ct_locl.h:78:5: error: unknown type name 'ct_log_entry_type_t'
     ct_log_entry_type_t entry_type;
     ^
../../../../vendor/openssl/crypto/ct/ct_locl.h:80:5: error: unknown type name 'sct_source_t'
     sct_source_t source;
     ^
../../../../vendor/openssl/crypto/ct/ct_locl.h:82:5: error: unknown type name 'sct_validation_status_t'
     sct_validation_status_t validation_status;
     ^
In file included from ../../../../vendor/openssl/crypto/ct/ct_b64.c:14:0:
../../../../vendor/openssl/crypto/ct/ct_b64.c: In function 'ct_base64_decode':
../../../../vendor/openssl/crypto/ct/ct_b64.c:38:15: error: 'CT_F_CT_BASE64_DECODE' undeclared (first use in this function)
         CTerr(CT_F_CT_BASE64_DECODE, ERR_R_MALLOC_FAILURE);
               ^
../../../../vendor/openssl/include/openssl/err.h:29:59: note: in definition of macro 'ERR_PUT_error'
 #  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
                                                           ^
../../../../vendor/openssl/crypto/ct/ct_b64.c:38:9: note: in expansion of macro 'CTerr'
         CTerr(CT_F_CT_BASE64_DECODE, ERR_R_MALLOC_FAILURE);
         ^
../../../../vendor/openssl/crypto/ct/ct_b64.c:38:15: note: each undeclared identifier is reported only once for each function it appears in
         CTerr(CT_F_CT_BASE64_DECODE, ERR_R_MALLOC_FAILURE);
               ^
../../../../vendor/openssl/include/openssl/err.h:29:59: note: in definition of macro 'ERR_PUT_error'
 #  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
                                                           ^
../../../../vendor/openssl/crypto/ct/ct_b64.c:38:9: note: in expansion of macro 'CTerr'
         CTerr(CT_F_CT_BASE64_DECODE, ERR_R_MALLOC_FAILURE);
         ^
../../../../vendor/openssl/crypto/ct/ct_b64.c:44:38: error: 'CT_R_BASE64_DECODE_ERROR' undeclared (first use in this function)
         CTerr(CT_F_CT_BASE64_DECODE, CT_R_BASE64_DECODE_ERROR);
                                      ^
../../../../vendor/openssl/include/openssl/err.h:29:61: note: in definition of macro 'ERR_PUT_error'
 #  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
                                                             ^
../../../../vendor/openssl/crypto/ct/ct_b64.c:44:9: note: in expansion of macro 'CTerr'
         CTerr(CT_F_CT_BASE64_DECODE, CT_R_BASE64_DECODE_ERROR);
         ^
../../../../vendor/openssl/crypto/ct/ct_b64.c: At top level:
../../../../vendor/openssl/crypto/ct/ct_b64.c:64:26: error: unknown type name 'ct_log_entry_type_t'
                          ct_log_entry_type_t entry_type, uint64_t timestamp,
                          ^
In file included from ../../../../vendor/openssl/crypto/ct/ct_b64.c:14:0:
../../../../vendor/openssl/crypto/ct/ct_b64.c: In function 'CTLOG_new_from_base64':
../../../../vendor/openssl/crypto/ct/ct_b64.c:143:15: error: 'CT_F_CTLOG_NEW_FROM_BASE64' undeclared (first use in this function)
         CTerr(CT_F_CTLOG_NEW_FROM_BASE64, ERR_R_PASSED_INVALID_ARGUMENT);
               ^
../../../../vendor/openssl/include/openssl/err.h:29:59: note: in definition of macro 'ERR_PUT_error'
 #  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
                                                           ^
../../../../vendor/openssl/crypto/ct/ct_b64.c:143:9: note: in expansion of macro 'CTerr'
         CTerr(CT_F_CTLOG_NEW_FROM_BASE64, ERR_R_PASSED_INVALID_ARGUMENT);
         ^
../../../../vendor/openssl/crypto/ct/ct_b64.c:149:43: error: 'CT_R_LOG_CONF_INVALID_KEY' undeclared (first use in this function)
         CTerr(CT_F_CTLOG_NEW_FROM_BASE64, CT_R_LOG_CONF_INVALID_KEY);
                                           ^
../../../../vendor/openssl/include/openssl/err.h:29:61: note: in definition of macro 'ERR_PUT_error'
 #  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
                                                             ^
../../../../vendor/openssl/crypto/ct/ct_b64.c:149:9: note: in expansion of macro 'CTerr'
         CTerr(CT_F_CTLOG_NEW_FROM_BASE64, CT_R_LOG_CONF_INVALID_KEY);
         ^
../../../../vendor/openssl/crypto/ct/ct_b64.c:161:15: warning: implicit declaration of function 'CTLOG_new' [-Wimplicit-function-declaration]
     *ct_log = CTLOG_new(pkey, name);
               ^
../../../../vendor/openssl/crypto/ct/ct_b64.c:161:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     *ct_log = CTLOG_new(pkey, name);
             ^


Thanks & Regards,
Samiya khanum
Reply | Threaded
Open this post in threaded view
|

Re: openssl-1.1.1b: Compilation errors when use async and ct

Matt Caswell-2


On 19/06/2019 19:07, Samiya Khanum via openssl-users wrote:

> Hi,
>
> While compiling async I see below errors with UCLIBC.
>
> /libcrypto.so: undefined reference to `getcontext'
> libcrypto.so: undefined reference to `setcontext'
> libcrypto.so: undefined reference to `makecontext'/
>
> As UCLIBC doesn't have support to these APIs, i have added no-async in
> configure. With no-async below errors are seen.
> /
> /
> /libcrypto.so: undefined reference to `ERR_load_ASYNC_strings'
> libcrypto.so: undefined reference to `async_init'
> libcrypto.so: undefined reference to `async_delete_thread_state'
> libcrypto.so: undefined reference to `async_deinit'/

no-async actually still compiles the high level async code, but you get the
"null" implementation which doesn't do anything.

The only thing I can suggest is to try "make clean" and start again.

Matt


> /
> /
> Do we need to have macro check" #ifndef OPENSSL_NO_ASYNC" before these api calls?
>
> Similarly for CT, we are seeing below errors. With no-ct options, compilation is OK.
>
> We would like to know what would be the impact if we disable async and ct
> features. Could you please help us in understanding these features.
>
> In file included from ../../../../vendor/openssl/crypto/ct/ct_b64.c:17:0:
> ../../../../vendor/openssl/crypto/ct/ct_locl.h:58:5: error: unknown type name
> 'sct_version_t'
>      sct_version_t version;
>      ^
> ../../../../vendor/openssl/crypto/ct/ct_locl.h:78:5: error: unknown type name
> 'ct_log_entry_type_t'
>      ct_log_entry_type_t entry_type;
>      ^
> ../../../../vendor/openssl/crypto/ct/ct_locl.h:80:5: error: unknown type name
> 'sct_source_t'
>      sct_source_t source;
>      ^
> ../../../../vendor/openssl/crypto/ct/ct_locl.h:82:5: error: unknown type name
> 'sct_validation_status_t'
>      sct_validation_status_t validation_status;
>      ^
> In file included from ../../../../vendor/openssl/crypto/ct/ct_b64.c:14:0:
> ../../../../vendor/openssl/crypto/ct/ct_b64.c: In function 'ct_base64_decode':
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:38:15: error:
> 'CT_F_CT_BASE64_DECODE' undeclared (first use in this function)
>          CTerr(CT_F_CT_BASE64_DECODE, ERR_R_MALLOC_FAILURE);
>                ^
> ../../../../vendor/openssl/include/openssl/err.h:29:59: note: in definition of
> macro 'ERR_PUT_error'
>  #  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
>                                                            ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:38:9: note: in expansion of macro
> 'CTerr'
>          CTerr(CT_F_CT_BASE64_DECODE, ERR_R_MALLOC_FAILURE);
>          ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:38:15: note: each undeclared
> identifier is reported only once for each function it appears in
>          CTerr(CT_F_CT_BASE64_DECODE, ERR_R_MALLOC_FAILURE);
>                ^
> ../../../../vendor/openssl/include/openssl/err.h:29:59: note: in definition of
> macro 'ERR_PUT_error'
>  #  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
>                                                            ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:38:9: note: in expansion of macro
> 'CTerr'
>          CTerr(CT_F_CT_BASE64_DECODE, ERR_R_MALLOC_FAILURE);
>          ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:44:38: error:
> 'CT_R_BASE64_DECODE_ERROR' undeclared (first use in this function)
>          CTerr(CT_F_CT_BASE64_DECODE, CT_R_BASE64_DECODE_ERROR);
>                                       ^
> ../../../../vendor/openssl/include/openssl/err.h:29:61: note: in definition of
> macro 'ERR_PUT_error'
>  #  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
>                                                              ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:44:9: note: in expansion of macro
> 'CTerr'
>          CTerr(CT_F_CT_BASE64_DECODE, CT_R_BASE64_DECODE_ERROR);
>          ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c: At top level:
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:64:26: error: unknown type name
> 'ct_log_entry_type_t'
>                           ct_log_entry_type_t entry_type, uint64_t timestamp,
>                           ^
> In file included from ../../../../vendor/openssl/crypto/ct/ct_b64.c:14:0:
> ../../../../vendor/openssl/crypto/ct/ct_b64.c: In function 'CTLOG_new_from_base64':
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:143:15: error:
> 'CT_F_CTLOG_NEW_FROM_BASE64' undeclared (first use in this function)
>          CTerr(CT_F_CTLOG_NEW_FROM_BASE64, ERR_R_PASSED_INVALID_ARGUMENT);
>                ^
> ../../../../vendor/openssl/include/openssl/err.h:29:59: note: in definition of
> macro 'ERR_PUT_error'
>  #  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
>                                                            ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:143:9: note: in expansion of macro
> 'CTerr'
>          CTerr(CT_F_CTLOG_NEW_FROM_BASE64, ERR_R_PASSED_INVALID_ARGUMENT);
>          ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:149:43: error:
> 'CT_R_LOG_CONF_INVALID_KEY' undeclared (first use in this function)
>          CTerr(CT_F_CTLOG_NEW_FROM_BASE64, CT_R_LOG_CONF_INVALID_KEY);
>                                            ^
> ../../../../vendor/openssl/include/openssl/err.h:29:61: note: in definition of
> macro 'ERR_PUT_error'
>  #  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
>                                                              ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:149:9: note: in expansion of macro
> 'CTerr'
>          CTerr(CT_F_CTLOG_NEW_FROM_BASE64, CT_R_LOG_CONF_INVALID_KEY);
>          ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:161:15: warning: implicit
> declaration of function 'CTLOG_new' [-Wimplicit-function-declaration]
>      *ct_log = CTLOG_new(pkey, name);
>                ^
> ../../../../vendor/openssl/crypto/ct/ct_b64.c:161:13: warning: assignment makes
> pointer from integer without a cast [-Wint-conversion]
>      *ct_log = CTLOG_new(pkey, name);
>              ^
>
>
> Thanks & Regards,
> Samiya khanum