[ 
https://issues.apache.org/jira/browse/PROTON-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986068#comment-15986068
 ] 

Alexander Ellwein commented on PROTON-1381:
-------------------------------------------

I confirm this bug still exists in 0.17, compiled on Arch Linux with OpenSSL 
1.1.0 and got this:
{code}
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector-strong -march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector-strong -march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector-strong -fPIC -Dqpid_proton_EXPORTS -DUSE_ATOLL 
-DUSE_STRERROR_R -DUSE_CLOCK_GETTIME -Ibuild/include 
-I/tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/include 
-I/tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src -c 
/tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.c -o 
build/temp.linux-x86_64-3.6/tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.o
 -std=gnu99
    /tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.c: In 
function ‘get_dh2048’:
    
/tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.c:394:5: 
error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}’
       dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
         ^~
    /tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.c: In 
function ‘ssn_cache_find’:
    
/tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.c:425:3: 
warning: implicit declaration of function ‘lh_SSL_SESSION_doall_arg’ 
[-Wimplicit-function-declaration]
       lh_SSL_SESSION_doall_arg(SSL_CTX_sessions(domain->ctx), 
&SSL_SESSION_visit_caster, ssl_cache_visit_data, &visitor);
       ^~~~~~~~~~~~~~~~~~~~~~~~
    
/tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.c:425:86: 
error: expected expression before ‘ssl_cache_visit_data’
       lh_SSL_SESSION_doall_arg(SSL_CTX_sessions(domain->ctx), 
&SSL_SESSION_visit_caster, ssl_cache_visit_data, &visitor);
                                                                                
          ^~~~~~~~~~~~~~~~~~~~
    In file included from 
/tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.c:45:0:
    /tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.c: In 
function ‘pn_ssl_domain’:
    
/tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.c:455:62: 
warning: passing argument 4 of ‘CRYPTO_get_ex_new_index’ from incompatible 
pointer type [-Wincompatible-pointer-types]
                                                                  
&ssl_session_ex_data_init, NULL, &ssl_session_ex_data_fini);
                                                                  ^
    In file included from /usr/include/openssl/comp.h:16:0,
                     from /usr/include/openssl/ssl.h:47,
                     from 
/tmp/pip-build-c6gug2dg/python-qpid-proton/proton-c/src/ssl/openssl.c:45:
    /usr/include/openssl/crypto.h:178:12: note: expected ‘void (*)(void *, void 
*, CRYPTO_EX_DATA *, int,  long int,  void *) {aka void (*)(void *, void *, 
struct crypto_ex_data_st *, int,  long int,  void *)}’ but argument is of type 
‘int (*)(void *, void *, CRYPTO_EX_DATA *, int,  long int,  void *) {aka int 
(*)(void *, void *, struct crypto_ex_data_st *, int,  long int,  void *)}’
     __owur int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
                ^~~~~~~~~~~~~~~~~~~~~~~
    error: command 'gcc' failed with exit status 1
{code}

> Compiler errors: dereferencing pointer to incomplete type DH {aka struct 
> dh_st}
> -------------------------------------------------------------------------------
>
>                 Key: PROTON-1381
>                 URL: https://issues.apache.org/jira/browse/PROTON-1381
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: 0.14.0, 0.16.0
>         Environment: GCC 6.2.1, OpenSSL 1.1.0c
>            Reporter: Volker Diels-Grabsch
>            Assignee: Andrew Stitcher
>            Priority: Blocker
>              Labels: build, patch
>         Attachments: 
> qpid-proton-0.14.0-fix-dereferencing-pointer-to-incomplete-type.patch
>
>
> Proton-C doesn't build with GCC 6.2.1 and OpenSSL 1.1.0c. The error message 
> is:
> {code:borderStyle=solid}
> [ 51%] Building C object 
> proton-c/CMakeFiles/qpid-proton.dir/src/ssl/openssl.c.o
> /.../proton-c/src/ssl/openssl.c: In function ‘get_dh2048’:
> /.../proton-c/src/ssl/openssl.c:406:5: error: dereferencing pointer to 
> incomplete type ‘DH {aka struct dh_st}’
>    dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
>      ^~
> proton-c/CMakeFiles/qpid-proton.dir/build.make:1102: recipe for target 
> 'proton-c/CMakeFiles/qpid-proton.dir/src/ssl/openssl.c.o' failed
> {code}
> The attached patch fixes this issue for 0.14.0 and also works for 0.16.0.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to