Opened 3 years ago

Closed 3 years ago

#896 closed Bug / Defect (duplicate)

error: invalid application of ‘sizeof’ to incomplete type

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

Description

Hello, guys!

I'm trying to build openvpn from the source.
Link: https://github.com/OpenVPN/openvpn
Branch: release/2.4
Environment: Linux 4.10.13-1-ARCH #1 SMP PREEMPT CEST 2017 x86_64 GNU/Linux

Step to reproduce:

git clone https://github.com/OpenVPN/openvpn
cd openvpn
autoreconf -ivf
./configure
make

...
mv -f .deps/comp-lz4.Tpo .deps/comp-lz4.Po                                                                                                                                                             
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include  -I../../include -I../../src/compat       -DPLUGIN_LIBDIR=\"/usr/local/lib/openvpn/plugins\"  -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:855: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:1015:61: note: in definition of macro ‘ALLOC_OBJ’                                                                                                                                             
         check_malloc_return((dptr) = (type *) malloc(sizeof(type))); \                                                                                                                                
                                                             ^~~~                                                                                                                                      
crypto.c:879: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:1015:61: note: in definition of macro ‘ALLOC_OBJ’                                                                                                                                             
         check_malloc_return((dptr) = (type *) malloc(sizeof(type))); \                                                                                                                                
                                                             ^~~~                                                                                                                                      
make[3]: *** [Makefile:673: crypto.o] Error 1                                                                                                                                                          
make[3]: Leaving directory '/home/timur/mcst/openvpn_work/tmp/openvpn/src/openvpn'                                                                                                                     
make[2]: *** [Makefile:429: all-recursive] Error 1                                                                                                                                                     
make[2]: Leaving directory '/home/timur/mcst/openvpn_work/tmp/openvpn/src'                                                                                                                             
make[1]: *** [Makefile:615: all-recursive] Error 1                                                                                                                                                     
make[1]: Leaving directory '/home/timur/mcst/openvpn_work/tmp/openvpn'                                                                                                                                 
make: *** [Makefile:503: all] Error 2 

The log is attached below. Is there any workaround?

Attachments (1)

log (11.9 KB) - added by timfayz 3 years ago.

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by timfayz

Attachment: log added

comment:1 Changed 3 years ago by David Sommerseth

Resolution: duplicate
Status: newclosed

This is a duplicate of ticket #759 ... this is all related to building against OpenSSL-1.1.x. Currently that is not supported.

Note: See TracTickets for help on using tickets.