On Fri, Aug 12, 2016 at 6:30 AM, David Sommerseth <
open...@sf.lists.topphemmelig.net> wrote:
> On 12/08/16 03:14, Selva Nair wrote:
> >
> >
> > On Thu, Aug 11, 2016 at 2:50 PM, David Sommerseth
> > <open...@sf.lists.topphemmelig.net
> > <mailto:open...@sf.lists.topphemmelig.net>> wrote:
> >
> > -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> >
> >
> > Hi,
> >
> > I noticed a few errors today when building OpenVPN on Fedora 23.
> > The attached patch resolves this. But it breaks 'make' when it
> > reaches ./src/openvpnserv:
> >
> >
> > The patch is obviously useless as it breaks configuring.
> >
> >
> >
> > Makefile:505: ../../src/openvpn/.deps/openvpnserv-block_dns.Po: No
> > such file or directory
> >
> >
> > It is indeed caused by a bug in automake (bug#13928) because of
> > which variables in foo_SOURCES do not get expanded when
> > subdir-objects is specfied. Thus $(top_srcdir) in
> > $(top_srcdir)/src/openvpn/block_dns.c, for example, causes a
> > folder literally named $(top_srcdir) created inside
> > src/openvpnserv/. But make wont find any files there and leads to
> > the missing file issues.
>
> Just thinking a bit around this and avoiding code duplication. This
> might be a bit more hackish alternative, but bear with me :)
>
> If the Makefile.am in src/openvpnsrv has a build-target for the
> block_dns.c file which would just copy the source file to the
> openvpnserv/ directory ... would that work?
>
> Rough (not really tested) example is attached.
This is incomplete but could be made to work with some changes. However,
such a hackery is not needed in this particular case as one could simply
replace
$(top_srcdir)/src/openvpn/block_dns.c $(top_srcdir)/src/openvpn/block_dns.h
in Makefile.am by
../../src/openvpn/block_dns.c ../../src/openvpn/block_dns.h
and use the subdir-objects option without issues.
But the problem is that, its not just these two files, we now have subdir
source references in places like
tests/unit_tests/plugins/auth-pam/Makefile.am as
well. Replacing $(top_srcdir) by something like "../../../../..." in deeply
nested directories would be error-prone and cumbersome. If/when more and
more tests get added this is going to get only worse.
I would say ignore the subdir-objects warning for now and we can
conditionally enable it when a version of automake that supports it without
breaking use of variables in foo_SOURCES becomes widely available. In the
mean time keep testing subdir-objects using a patched automake may be all
that we can do.
Selva
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel