Opened 10 months ago

Closed 9 months ago

#1308 closed Bug / Defect (fixed)

building with --disable-lzo *and* --disable-lz4 fails compilation

Reported by: Gert Döring Owned by:
Priority: major Milestone:
Component: Generic / unclassified Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: build failure, --disable-lz4
Cc: David Sommerseth


configure with

configure --disable-lzo --disable-lz4

and observe

/rhome/gert/src/openvpn-maint/openvpn/src/openvpn/options.c:5089:33: warning: 'struct compress_options' declared inside parameter list will not be visible outside of this definition or declaration
 5089 | show_compression_warning(struct compress_options *info)
      |                                 ^~~~~~~~~~~~~~~~
/rhome/gert/src/openvpn-maint/openvpn/src/openvpn/options.c: In function 'show_compression_warning':
/rhome/gert/src/openvpn-maint/openvpn/src/openvpn/options.c:5091:9: warning: implicit declaration of function 'comp_non_stub_enabled' [-Wimplicit-function-declaration]
 5091 |     if (comp_non_stub_enabled(info))
      |         ^~~~~~~~~~~~~~~~~~~~~
/rhome/gert/src/openvpn-maint/openvpn/src/openvpn/options.c:5097:19: error: dereferencing pointer to incomplete type 'struct compress_options'
 5097 |         if (!(info->flags & COMP_F_ALLOW_COMPRESS))
      |                   ^~
/rhome/gert/src/openvpn-maint/openvpn/src/openvpn/options.c:5097:29: error: 'COMP_F_ALLOW_COMPRESS' undeclared (first use in this function)

This is quite likely something never tested, as there is no (build related) reason to ever --disable-lz4 - if lz4-dev is not installed, we fall back to our bundled lz4.

Of course there might be strong reasons to just go for an openvpn binary with no compression built in, so that should either work, or error-out in configure right away, with a meaningful error message (maybe it works with "--enable-comp-stub" or some magic of that sort, did not investigate further).

Change History (2)

comment:2 Changed 9 months ago by Gert Döring

Resolution: fixed
Status: newclosed

commit dab34fdd0639c6de8c5ca759cca00b7e60da32f1
Author: Lev Stipakov
Date: Wed Aug 5 06:25:48 2020 +0000

Fix compilation with --disable-lzo and --disable-lz4

Note: See TracTickets for help on using tickets.