NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [netbsd-users] Re: How to build /usr/bin/grep?



On Thu, 17 Aug 2023, RVP wrote:
> /usr/src/usr.bin/grep/grep: is the FreeBSD grep (only built if MKBSDGREP=yes)
> /usr/bin/grep: is actually the GNU grep (bec. MKBSDGREP=no; see mk.conf(5))

Wow, you're right! Never checked that myself with --version :-\

> /usr/bin/grep is the GNU grep
> /rescue/grep is the FreeBSD grep

That's...even more confusing. I always thought binaries in /rescue are the 
statically linked counterparts of things in /usr/bin. But it's indeed a 
different version!

So, if /usr/src/usr.bin/grep/ is building the FreeBSD version, where is 
the (old) GNU grep version built from? Ah, and I just found it:

 $ cd /usr/src/external/gpl2/grep/
 $ make
 $ echo foo | ./bin/grep --devices=skip foo || echo FAIL
 FAIL

Bingo!

> Good question. Probably incompatibilities and/or bugs. Other people
> have reported both. I've noticed a few myself.

Hm, there's also textproc/bsdgrep-devel in pkgsrc, maybe that could be 
moved to /usr/src/external/gpl2/grep. 

Anyway, thanks for responding!

Christian.
-- 
BOFH excuse #359:

YOU HAVE AN I/O ERROR -> Incompetent Operator error


Home | Main Index | Thread Index | Old Index