Opened 8 years ago

Closed 8 years ago

#802 closed Bug / Defect (duplicate)

crypto.c:843:32: error: invalid application of ‘sizeof’ to incomplete type ‘cipher_ctx_t {aka struct evp_cipher_ctx_st}’

Reported by: actionmystique Owned by:
Priority: major Milestone: release 2.4.0
Component: Packaging Version:
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

Ubuntu 16.10 4.8
OpenVPN sources from https://github.com/OpenVPN/openvpn
Tag v2.4.0

Building with

        echo --------
        echo Cleaning
        echo --------
        cd git-openvpn
        sudo -u actionmystique -H git-reset-clean-pull-checkout.sh $branch $tag

        echo -------------------
        echo "Making ./configure"
        echo -------------------
        export ACLOCAL_AMFLAGS="-I m4"
        sudo -u actionmystique -H autoreconf -v --install

        echo -----------
        echo Configuring
        echo -----------
        sudo -u actionmystique -H ./configure   --build=x86_64-pc-linux-gnu \
                                                --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
                                                --enable-iproute2 \
                                                --enable-systemd

        echo ---------
        echo Compiling
        echo ---------
        sudo -u actionmystique -H make

leads to:

...
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include  -I../../include -I../../src/compat        -g -O2 -std=c99 -MT crypto.o -MD -MP -MF .deps/crypto.Tpo -c -o crypto.o crypto.c
In file included from crypto.h:131:0,
                 from crypto.c:36:
crypto.c: In function ‘init_key_ctx’:
crypto.c:843:32: error: invalid application of ‘sizeof’ to incomplete type ‘cipher_ctx_t {aka struct evp_cipher_ctx_st}’
         ALLOC_OBJ(ctx->cipher, cipher_ctx_t);
                                ^
buffer.h:1013:61: note: in definition of macro ‘ALLOC_OBJ’
         check_malloc_return((dptr) = (type *) malloc(sizeof(type))); \
                                                             ^~~~
crypto.c:867:30: error: invalid application of ‘sizeof’ to incomplete type ‘hmac_ctx_t {aka struct hmac_ctx_st}’
         ALLOC_OBJ(ctx->hmac, hmac_ctx_t);
                              ^
buffer.h:1013:61: note: in definition of macro ‘ALLOC_OBJ’
         check_malloc_return((dptr) = (type *) malloc(sizeof(type))); \
                                                             ^~~~
Makefile:666: recipe for target 'crypto.o' failed

Whole build log is attached.

Attachments (1)

Building 2.4.0.txt (32.3 KB) - added by actionmystique 8 years ago.
Build log

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by actionmystique

Attachment: Building 2.4.0.txt added

Build log

comment:1 Changed 8 years ago by Steffan Karger

Could this be because you're trying to build against OpenSSL 1.1.0? We currently only support OpenSSL upto 1.0.x.

comment:2 Changed 8 years ago by actionmystique

Yes, OK. Any plans to support OpenSSL 1.1.0?

comment:3 Changed 8 years ago by Steffan Karger

Resolution: duplicate
Status: newclosed

Yes, see #759. Can't make any promises (this relies on spare time), but probably 'somewhere in the coming months'.

Closing this ticket as a duplicate of #759.

Note: See TracTickets for help on using tickets.