Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 May 2017 12:41:27 -0500
From:      Kyle Evans <kevans91@ksu.edu>
To:        Alastair Hogge <agh@fastmail.fm>, Vladimir Zakharov <zakharov.vv@gmail.com>
Cc:        Ed Maste <emaste@freebsd.org>, <freebsd-current@freebsd.org>, "Dimitry Andric" <dim@freebsd.org>
Subject:   Re: make buildworld broken at r317821 (libsysdecode)
Message-ID:  <CACNAnaGjUgrSSh4niWfEu3wi9OU%2BAfW%2B4j8nt22s2yqU5=q7sQ@mail.gmail.com>
In-Reply-To: <CACNAnaFQ97Likibx9VT1XW0=cgExfbv7f1oPELAX2tHZ09Tx%2BA@mail.gmail.com>
References:  <20170505093141.ulbr7j65gxvzyz6i@vzakharov> <C994B75F-3A74-4102-9888-DFBF8B5A228C@FreeBSD.org> <CACNAnaFQ97Likibx9VT1XW0=cgExfbv7f1oPELAX2tHZ09Tx%2BA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 5, 2017 at 9:31 AM, Kyle Evans <kevans91@ksu.edu> wrote:

> On May 5, 2017 8:39 AM, "Dimitry Andric" <dim@freebsd.org> wrote:
>
>
> This appears to be caused by bsdgrep. :-/ The build for lib/libsysdecode
> uses a shell script, mkioctls, to generate a ioctl.c file at build time.
> This script contains the following fragment:
>
> ioctl_includes=$(
>         cd $includedir
>         find -H -s * -name '*.h' | \
>         egrep -v '(.*disk.*|net/pfvar|net/if_pfsync)\.h' | \
>                 xargs egrep -l \
> '^#[    ]*define[       ]+[A-Za-z_][A-Za-z0-9_]*[       ]+_IO[^a-z0-9_]' |
>                 awk '{printf("#include <%s>\\n", $1)}'
> )
>
> The idea is that all headers are searched for defines of ioctl macros,
> which start with _IO.  The -l option to egrep is used to print only the
> matching filenames, not the matched content itself.
>
> However, this option seems to be broken in bsdgrep, as it *does* display
> the matched content:
>
> $ gnugrep -l printf /usr/include/stdio.h
> /usr/include/stdio.h
>
> $ bsdgrep -l printf /usr/include/stdio.h
> #define __SSTR  0x0200          /* this is an sprintf/snprintf string */
> /usr/include/stdio.h
>
> I did a quick check, and this option seems to have been accidentally
> broken by r317703 [1] ("bsdgrep: fix -w flag matching with an empty
> pattern").
>
> Ed, Kyle, any idea where the problem might be?
>
> -Dimitry
>
> [1] https://svnweb.freebsd.org/base?view=revision&revision=317703
>
>
> Hi,
>
> This is addressed by https://reviews.freebsd.org/D10607
>

FYI- This has now been committed as r317842. Apologies for the breakage,
and thanks for the reports!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaGjUgrSSh4niWfEu3wi9OU%2BAfW%2B4j8nt22s2yqU5=q7sQ>