On 15/09/2020 12:22, Gert Doering wrote:
> Hi,
> 
> On Mon, Sep 14, 2020 at 02:27:21PM +0200, David Sommerseth wrote:
>> The sample-plugins have their own set of build/winbuild scripts in each
>> of these plugin directories.  This does not give a good way to reuse
>> various macros the autoconf/automake/configure process enables; which
>> can contain important macros to make some code build without errors or
>> warnings.
> 
> This looks like a step in the right direction, but is not fully working
> yet - I tried both an "in-tree" and "out of tree" build, and it fails
> compilation with
> 
> sample-plugins$ gmake
> test -d `dirname defer/simple.o` || ../../../openvpn/./install-sh -c -d 
> `dirname defer/simple.o`; \
> cc -c -o defer/simple.o -Wall -Wno-unused-parameter -Wno-unused-function -g 
> -O2 -std=c99 -I../../../openvpn -fPIC 
> ../../../openvpn/sample/sample-plugins/defer/simple.c
> ../../../openvpn/sample/sample-plugins/defer/simple.c:58:10: fatal error: 
> 'openvpn-plugin.h' file
>       not found
> #include "openvpn-plugin.h"
>          ^~~~~~~~~~~~~~~~~~
> 1 error generated.
> 
> 
> openvpn-plugin.h is installed if you install openvpn first, but if
> you only build in tree, it seems to need an extra 
> 
>   -I$(top_srcdir)/include
> 
> to find openvpn-plugin.h

Hmmm ... I would have expected that to be picked up automatically, but clearly
didn't watch the compile arguments carefully enough.

> It also needs gmake - running "make" will do "nothing at all", which
> I found surprising, but did not investigate more closely.  This is likely
> due to implicit rules that need to be written differently for BSD make.

Yikes ... I see potentially two issues here.  BSD Make seems to lack support
for $(foreach ...) and it does not grok '%.so : %.o' (which is Make "macro
magic" to simplify rule writing).  To avoid this and make it BSD Make
compatible, we would probably need to go full-fledged automake - pulling in
libtools (and the awkward .libs directories, .la/.lo files, etc, etc).

So if we're fine with reducing this to GNU Make only, the change is trivial.

> I do not think this is a serious issue - just document it in the README,
> and it's still better than 4 individual "build" files, half of it who
> were missing the needed "-I" as well :-)

New updated patch coming very soon.

-- 
kind regards,

David Sommerseth
OpenVPN Inc


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to