Bug 236686 - BSD grep causes openjdk11 configuration failures
Summary: BSD grep causes openjdk11 configuration failures
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-21 03:07 UTC by tjlegg
Modified: 2019-08-21 00:28 UTC (History)
3 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 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 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 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.