Bug 236686 - BSD grep causes openjdk11 configuration failures
Summary: BSD grep causes openjdk11 configuration failures
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Kyle Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-21 03:07 UTC by tjlegg
Modified: 2019-11-11 19:56 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tjlegg 2019-03-21 03:07:27 UTC
openjdk11 fails during configure.

configure:21890: checking that grep (/usr/bin/grep) -Fx handles empty lines in the pattern list correctly
configure:21907: error: grep does not handle -Fx correctly. 

11.2-STABLE FreeBSD 11.2-STABLE #22 r344491M
Comment 1 Greg Lewis freebsd_committer freebsd_triage 2019-03-21 20:29:53 UTC
Here is what that looks like for me:

checking that grep (/usr/bin/grep) -Fx handles empty lines in the pattern list correctly... yes

This is on FreeBSD 11.2-RELEASE-p7
Comment 2 Michael Zhilin freebsd_committer freebsd_triage 2019-03-22 07:54:43 UTC
Hi,

grep can be different: BSD or GPL. 
Could you please provide output of "grep -V"?

Thanks!
Comment 3 tjlegg 2019-03-23 00:40:39 UTC
(In reply to Michael Zhilin from comment #2)
BINGO! I'd forgotten about that.

$ grep -V
grep (BSD grep, GNU compatible) 2.6.0-FreeBSD

$ grep -i grep /etc/src.conf
WITHOUT_GNU_GREP=true
WITH_BSD_GREP=true
Comment 4 Greg Lewis freebsd_committer freebsd_triage 2019-07-26 19:05:36 UTC
This seems like a bug in BSD grep then rather than something to do with the JDK.

I'll update this accordingly.
Comment 5 ktullavik 2019-08-21 00:08:11 UTC
Any quick workarounds for this?

I tried installing gnugrep and setting
BINARY_ALIAS=   grep=gnugrep
in the makefile. Still getting the error with openjdk 11 and 12
on CURRENT.

checking that grep (/usr/bin/grep) -Fx handles empty lines in the pattern list correctly... configure: error: grep does not handle -Fx correctly. 
configure exiting with result code 1
===>  Script "configure" failed unexpectedly.
Comment 6 ktullavik 2019-08-21 00:28:22 UTC
Well, temporarely swapping in a link to the gnu binary in /usr/bin, like a madman, did the trick.
Comment 7 M. Voorhis 2019-09-08 13:06:56 UTC
I normally use BSD GREP on my 12-stable system and ran into this "grep does not handle -Fx correctly" error.  I did the symlink trick referred to in comment 6 and that worked fine, but then I got hung up because openjdk11 doesn't want me to be using CCACHE.

I went to /etc/make.conf and commented out "WITH_CCACHE_BUILD=yes" that was there.

After running a "make clean" and "make" now still complains about the existence of CCACHE despite its being disabled in /etc/make.conf.  Do I need to physically remove the ccache package from my machine in order for the configure script to be happy.
Comment 8 M. Voorhis 2019-09-08 13:08:17 UTC
(In reply to M. Voorhis from comment #7)

Oh, whoops; this thread is for FreeBSD11?  I'm using '12, so my commentary should be elsewhere.  Sorry about that..
Comment 9 Kyle Evans freebsd_committer freebsd_triage 2019-11-11 19:24:55 UTC
Take; I think I fixed this one already (noticed with another port during PR229925 exp-run testing), but let me verify.
Comment 10 Kyle Evans freebsd_committer freebsd_triage 2019-11-11 19:56:21 UTC
Original fix was committed in r352691, MFC'd to stable/12 in r353138, then just now MFC'd to stable/11 along with a whole host of other fixes in r354628. Unfortunately it will not have made it into any release yet.